Programming the 8085
Home
Graphics
C++
Data Structures
Friday, August 13, 2010
Binary to BCD
20. Convert binary to bcd.
4100 21 00 50 LXI H,5000H 4103 7E MOV A,M 4104 CD 08 41 CALL PWRTEN 4107 76 HLT 4108 23 PWRTEN: INX H 4109 06 64 MVI B,64H 410B CD 15 41 CALL BINBCD 410E 06 0A MVI B,0AH 4110 CD 15 41 CALL BINBCD 4113 77 MOV M,A 4114 C9 RET 4115 36 FF BINBCD: MVI M,0FFH 4117 34 NXTBUF: INR M 4118 90 SUB B 4119 D2 17 41 JNC NXTBUF 411C 80 ADD B 411D 23 INX H 411E C9 RET
Sample Output
Before execution 5000--> 48h After execution 5001-->00 5002-->07 5003-->02
1 comment:
Unknown
September 6, 2018 at 8:54 AM
not proper presentation cant see codes properly
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
not proper presentation cant see codes properly
ReplyDelete