x86 32-bit registers

Thread Solved

Join Date: Dec 2008
Posts: 29
Reputation: brando|away is an unknown quantity at this point 
Solved Threads: 0
brando|away brando|away is offline Offline
Light Poster

x86 32-bit registers

 
0
  #1
30 Days Ago
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...)?
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 29
Reputation: brando|away is an unknown quantity at this point 
Solved Threads: 0
brando|away brando|away is offline Offline
Light Poster
 
0
  #2
30 Days Ago
please someone?
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 830
Reputation: wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all wildgoose is a name known to all 
Solved Threads: 94
wildgoose's Avatar
wildgoose wildgoose is offline Offline
Practically a Posting Shark
 
0
  #3
29 Days Ago
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
  1. mov eax,3
  2. 66h mov ax,3

From 16-bit code
  1. 66h mov eax,3
  2. mov ax,3
Last edited by wildgoose; 29 Days Ago at 10:02 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 29
Reputation: brando|away is an unknown quantity at this point 
Solved Threads: 0
brando|away brando|away is offline Offline
Light Poster
 
0
  #4
29 Days Ago
were can i find documentation on something like that?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 133
Reputation: NotNull is an unknown quantity at this point 
Solved Threads: 13
NotNull's Avatar
NotNull NotNull is offline Offline
Junior Poster
 
0
  #5
28 Days Ago
[[[AxxAxLLlaLLLaXBxG]]]]
  1. mov cx, 0x10
  2. mov ax, 0x123
  3. db 0x66
  4. shl ax, cl ; shift 0x123 into high-word of EAX
  5. db 0x66
  6. 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.
----------------------------------------------------------
To control a mind violates a man, and all it has been used for is
hurting and afflicting. Nowonder I progam in assembly...
--->Now available http://dotcoding.netai.net/
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC