5 ms·
> A 32-bit assembler (like gas) will turn `mov %esp,%ebp` into `89 e5` while `mov %sp,%bp` becomes `66 89 e5` -- the former being correct when actually in 16-bi
by mkup 10y ago
> A 32-bit assembler (like gas) will turn `mov %esp,%ebp` into `89 e5` while `mov %sp,%bp` becomes `66 89 e5` -- the former being correct when actually in 16-bit.
He is using nasm with "bits 16" directive, so 66 prefix will be emitted for "mov ebp,esp". gas with 32-bit target is totally unrelated to this discussion.
> http://wiki.osdev.org/Unreal_Mode http://wiki.osdev.org/Unreal_Mode
So what? MBR runs in 16-bit real mode.
- geocar 10y ago> He is using nasm with "bits 16" directive So he is! I had to download nasm to check, but that sounds useful.