Category:8086 Assembly: Difference between revisions
m
→Data Registers: added example of separate registers
Puppydrum64 (talk | contribs) m (→Data Registers: Fixed inaccurate info and added example of multiplication) |
Puppydrum64 (talk | contribs) m (→Data Registers: added example of separate registers) |
||
Line 24:
mov al, 30h
mov ah, 0h</lang>
Commands that alter the contents of a single register will not affect the other half.
<lang asm>mov ax,00FFh
inc al</lang>
If we had executed <code>INC AX</code>, then <code>AX</code>AX would have been incremented to 0x100. Since we only incremented <code>AL</code>, only <code>AL</code> was incremented in this case, and <code>AH</code> '''still equals 0x00!'''
Generally speaking, the 8086's registers serve the following purposes:
|