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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/25/00 12:18
Read: times


 
#1952 - RE: Need help with code
Nir ,

To convert byte (from 00h till 3Bh) in memory to a Decimal Digits you have to use following code fragment

MOV B,#10
DIV AB ;Quotient is in Acc (tens)
ADD A,#30H
MOV R3,A
MOV A,B ;Remainder is in B (ones)
ADD A,#30H
XCH A,R3

That's all.

By the way, the BCD is abbreviation of Binary Coded Decimal and so byte contains decimal digit in each nibble of byte (0,1,..9).

Regards,

George


List of 7 messages in thread
TopicAuthorDate
Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      
RE: Need help with code            01/01/70 00:00      

Back to Subject List