944,006 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 451
  • Assembly RSS
May 10th, 2009
0

Help..!!

Expand Post »
If the following code executed, what will be the result of it?

Assembly Syntax (Toggle Plain Text)
  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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
keasub is offline Offline
1 posts
since May 2009
May 10th, 2009
0

Re: Help..!!

What do you think the result will be?

Nevermind, the answer is 42.
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: Assembly Help
Next Thread in Assembly Forum Timeline: Checking an equality condition using BEQ in MIPS





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC