Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASM
Hello Friends,
This is a quick question.
I want to know that where will be the result of the operation
ADD BX, AX
Stores in?
Is it AX or BX?
This confusion arises since we have instruction
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 15-Sep-12 5:14am
Comments
Tushar Sriv at 15-Sep-12 10:40am
   
Thank you both :-)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Mehdi Gholam at 15-Sep-12 10:36am
   
5'ed, just posted the same.
OriginalGriff at 15-Sep-12 10:55am
   
Great minds and all that!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

ADD AX,BX
add value in bx to value in ax (result in ax)
  Permalink  
v2

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



Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 15 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100