Re: Uniform spacing of labels in MASM32
- From: Tim Roberts <spamtrap@xxxxxxxxxx>
- Date: Fri, 23 Dec 2005 05:00:16 GMT
"randyhyde@xxxxxxxxxxxxx" <spamtrap@xxxxxxxxxx> 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))
Umm, won't
org ExecStart + 40h
do exactly the same thing with a lot less typing?
--
- Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- 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: Page flipping on LFB in protected mode...how??!?!
- Next by Date: Re: Page flipping on LFB in protected mode...how??!?!
- Previous by thread: Re: Uniform spacing of labels in MASM32
- Next by thread: EGA/VGA set pixel comments
- Index(es):
Relevant Pages
|