yeah i can't find this on google but
i understand how to output data using 16bit (with int 21h/ah=02)
say im doing some math calculations, how can i output something in a 32bit register (eax, edx...)?
yeah i can't find this on google but
i understand how to output data using 16bit (with int 21h/ah=02)
say im doing some math calculations, how can i output something in a 32bit register (eax, edx...)?
please someone?
You aren't being very clear!
If you are using a more recent computer but somehow using an old DOS interface and not in an emulator, then you can use 32-bit instructions in Real Mode. An operand size instruction 66h is inserted before an instruction to command the processor to do a 32-bit operation instead of a 16-bit instruction. BUT this allows you to do 32-bit math. Memory addressing is done with a 67h but not applicable as in 16-bit mode when in Real mode.
From 32-bit code
mov eax,3
66h mov ax,3
From 16-bit code
66h mov eax,3
mov ax,3
were can i find documentation on something like that?
[[[AxxAxLLlaLLLaXBxG]]]]
mov cx, 0x10
mov ax, 0x123
db 0x66
shl ax, cl ; shift 0x123 into high-word of EAX
db 0x66
shr ax, cl ; shift back into low-word of EAX, that is, AX
You would need to use bitshifting to extract the values
of the registers 32-bit counterpart's high-words.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.