flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
The first register is taken as the base, and the second register as the index.
EBP can only be encoded as a base register with an offset. fasm doesn't reorder the registers, even when the offset is zero. |
|||
![]() |
|
revolution
I forgot to add that the reason for not swapping the register order is because of the different segment register used. EBP uses SS, EAX uses DS.
For Win32 this makes no difference normally, but fasm isn't only for Win32. |
|||
![]() |
|
macomics
ProMiNick wrote: not resolved into Code: mov eax,dword[eax+ebp] ; 4 bytes: $17,$8B,$04,$28 |
|||
![]() |
|
revolution
If you define the segment register then you get this:
Code: use32 mov eax,[ds:ebp+eax] ; 0x8b, 0x04, 0x28 mov eax,[ds:eax+ebp] ; 0x8b, 0x04, 0x28 mov eax,[ss:ebp+eax] ; 0x8b, 0x44, 0x05, 0x00 mov eax,[ss:eax+ebp] ; 0x8b, 0x44, 0x05, 0x00 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.