Help..!!

Reply

Join Date: May 2009
Posts: 1
Reputation: keasub is an unknown quantity at this point 
Solved Threads: 0
keasub keasub is offline Offline
Newbie Poster

Help..!!

 
0
  #1
May 10th, 2009
If the following code executed, what will be the result of it?

  1. Intel chips use the LITTLE ENDIAN convention. Data transfer between RAM and CPU registers attaches the LOW byte of RAM to the LOW 8 bits of a register. Please refer to the Instruction Set of Intel 8086.
  2. In all of these assignments you are given that bytes in memory starting at address 200 are
  3.  
  4. Adress : 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 20A, 20B..
  5. Value : 12, 34, 56, 78, AB, CD, EF, 12, 34, 56, 78, 90
  6.  
  7. CODE for executed
  8.  
  9. MOV BX, 200
  10. MOV AX, [BX]
  11. MOV CX, [BX + 1]
  12. CMP AX, CX
  13. JB cxismax
  14. SUB AX, CX
  15. MOV DX, AX
  16. JMP storeresult
  17. cxismax: SUB CX, AX
  18. MOV DX, CX
  19. storeresult: MOV [BX+5], DX
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Help..!!

 
0
  #2
May 10th, 2009
What do you think the result will be?

Nevermind, the answer is 42.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Assembly Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC