What resulit of this code?!

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2005
Posts: 26
Reputation: Dabdob is an unknown quantity at this point 
Solved Threads: 0
Dabdob Dabdob is offline Offline
Light Poster

What resulit of this code?!

 
0
  #1
Apr 8th, 2006
This is an Assembly code and i want to know what the result for every instruction: AX and BX

The code is:

Mov ax, 0
Mov bx, -5
100: Inc ax++
Sub bx, ax
Cmp bx, -10
Jb 100
Put ax
Move ax, bx
Put ax
End
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 26
Reputation: Dabdob is an unknown quantity at this point 
Solved Threads: 0
Dabdob Dabdob is offline Offline
Light Poster

Re: What resulit of this code?!

 
0
  #2
Apr 17th, 2006
Is the above program Right or worng? it seems to me there is logical problem?!
what do you think ?!
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 233
Reputation: Lord Soth is an unknown quantity at this point 
Solved Threads: 4
Lord Soth's Avatar
Lord Soth Lord Soth is offline Offline
Posting Whiz in Training

Re: What resulit of this code?!

 
0
  #3
Apr 20th, 2006
Hi,

There is a loop which turns 3 times so 4 of the instructions are called 3 times so you want a 17 by 2 table or the end result ? The last two puts will give 3 and -11 respectively.

Loren Soth
Best regards,
Loren Soth

Crimson K. Software _________________________________________________________________ Crimson K. Blog
Reply With Quote Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the Assembly Forum


Views: 1934 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC