Re: Uniform spacing of labels in MASM32
- From: "Chris Martens" <spamtrap@xxxxxxxxxx>
- Date: 21 Dec 2005 13:52:08 -0800
Silly me... it's been like 6 months since I coded using an assembler...
imagine forgetting something like 'org'? Yikes... I'm embarrassed...
But thank you so much, Randy. It works beautifully.
....just one question... how the heck does it work?
- Craig
randyhyde@xxxxxxxxxxxxx wrote:
> Chris Martens wrote:
> >
> > [MASM32 CODE]
> >
> > mov ebx, offset Instruction
> > sub ebx, 2 ; Each instruction is two bytes wide (WORD)
> >
> > LoopStart:
> > add ebx, 2
> > xor edx, edx
> > mov dx, WORD PTR [ebx]
> > sal edx, 6
> > add edx, offset ExecStart
> > jmp edx
> >
> > ExecStart:
> > ; Instruction 0x0000 code
> > jmp LoopStart
> >
> > ExecStart + 40h:
>
> Instead, use:
>
> org $+(40h-($-ExecStart))
>
> > ; Instruction 0x0001 code
> > jmp LoopStart
> >
> > [END MASM32 CODE]
>
>
> Cheers,
> Randy Hyde
.
- References:
- Uniform spacing of labels in MASM32
- From: Chris Martens
- Re: Uniform spacing of labels in MASM32
- From: randyhyde@xxxxxxxxxxxxx
- Uniform spacing of labels in MASM32
- Prev by Date: Re: Uniform spacing of labels in MASM32
- Next by Date: Re: Uniform spacing of labels in MASM32
- Previous by thread: Re: Uniform spacing of labels in MASM32
- Next by thread: Re: Uniform spacing of labels in MASM32
- Index(es):