Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello Friends,
This is a quick question.
I want to know that where will be the result of the operation
ASM
ADD BX, AX

Stores in?
Is it AX or BX?
This confusion arises since we have instruction
ASM
ADD AX, BX
which stores the result in AX. I thought, where will be the result store when we interchange the two operands AX and BX?

Please Answer this query if you know the answer with reason.
Thank you.

Regards
Tushar Srivastava
Posted
Comments
Er. Tushar Srivastava 15-Sep-12 10:40am    
Thank you both :-)

BX
The destination is always on the left.

The syntax of ADD is:

add <destreg>,<reg>
add <destreg>,<mem>
add <destmem>,<reg>
add <destreg>,<con>
add <destmem>,<con>
And the destination always comes first.
 
Share this answer
 
Comments
Mehdi Gholam 15-Sep-12 10:36am    
5'ed, just posted the same.
OriginalGriff 15-Sep-12 10:55am    
Great minds and all that!
ADD AX,BX
add value in bx to value in ax (result in ax)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900