[BITS 16] in real mode
[BITS 16] in real mode
Do I have to write [BITS 16] at the beginning of the assembly code because in real mode all the registers in the CPU are only 16-bit, and also so that NASM compiles the code as 16-bit only? Is that correct?
-
- Member
- Posts: 5873
- Joined: Mon Mar 25, 2013 7:01 pm
Re: [BITS 16] in real mode
No. You have to use "bits 16" because instructions are encoded differently in 16-bit mode, 32-bit mode, and 64-bit mode. The same registers are available in 16-bit mode and in 32-bit mode.