3 ms·
This is so insane, I had no idea such a thing was possible: 16 vs 32 bit It is possible to use 32-bit instructions in the real-address mode, they just need to
by jacobush 7y ago
This is so insane, I had no idea such a thing was possible:
16 vs 32 bit
It is possible to use 32-bit instructions in the real-address mode, they just need to be marked with address-size and operand-size prefixes. The -m16 option for clang/gcc, and .code16 directive in GNU assembler, do exactly that. The resulting code is 32-bit, only marked everywhere with those prefixes. It's not compatible with actual 16-bit CPUs.
"Unfortunately the 32-bit addresses still cannot exceed the boundary of the segment (65535), otherwise they'll trigger an exception. QEMU doesn't emulate this behaviour, so it's useful to occasionally test with Bochs."
- deleted 7y ago[deleted]