0

Am I allowed to use E*X registers in 16 bit mode? If not how am I supposed to store and use 32 and 64 bit values (DWORDS and QWORDS). I know about using ax and dx together to store a 32 bit value, but how do I address memory like that? I don't think I can do push [ax dx], or can I?

Any information how do this is greatly appreciated, I looked online and it seems I am just to uneducated to figure it out because nobody seems to have the same question as I...

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
  • First of all, `[ax dx]` isn't a valid addressing mode, and 16-bit addressing modes can't use either AX or DX as base or index. IDK what you wanted that to do, but maybe `push dx` ; `push ax` (two separate push instruction of register *values*, not memory source operands) is what you wanted to put 32-bit DX:AX on the stack. Or `shl edx, 16` / `mov dx, ax` / `push edx`. You can also merge with `or edx, eax` if you know the upper 16 bits of EAX are zero. – Peter Cordes Jul 13 '19 at 05:01
  • 64-bit operand-size for general-purpose integer registers (rax..rdi) requires 64-bit long mode. Operand-size prefixes in 16-bit mode only get you 32-bit operand-size and/or address-size (introduced by 386) – Peter Cordes Jul 13 '19 at 05:03

1 Answers1

0

Is it possible to use 32 bits registers/instructions in real mode?

The link above solved my question... I was just wording the issue wrongly in google.