Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/19/01 19:37
Read: times


 
#14218 - RE: converting variable types
The MUL AB produces a 16 bit result, which is what you need.

But, your code doesn't even attempt to do what you say. It adds 12 instead of 22. Then you put "00H" as the first byte of the result, instead of storing the result of the MUL AB, which is B:A.

And you have not done a proper 2 byte addition, by not accounting for possible carry from the A to the B.

So to fix this, you need to add 22, do a carry check to fix b, then store both A and B.


List of 13 messages in thread
TopicAuthorDate
converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      
RE: Andy            01/01/70 00:00      
RE: converting variable types            01/01/70 00:00      

Back to Subject List