bcd2bin - 010C ANI 0F E6 ; 010D 0F ; 010E MOV C A 4F ; 010F...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
8085 Machine Code File 0100 LXI SP0300 31 ; This routine converts a BCD number (from 0 to 99) to its binary and displayed as hex in the Accumulator at the end of the routine. 0101 00 ; 0102 03 ; 0103 MVI A 52 3E ; say 52 is the BCD number 0104 52 ; 0105 CALL0109 CD ; 0106 09 ; 0107 01 ; 0108 HLT 76 ; 0109 PUSH B C5 ; 010A PUSH D D5 ; 010B MOV B A 47 ;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 010C ANI 0F E6 ; 010D 0F ; 010E MOV C A 4F ; 010F MOV A B 78 ; 0110 ANI F0 E6 ; 0111 F0 ; 0112 RRC 0F ; 0113 RRC 0F ; 0114 RRC 0F ; 0115 RRC 0F ; 0116 MOV D A 57 ; 0117 XRA A AF ; 0118 MVI E 0A 1E ; 0119 0A ; 011A ADD E 83 ; 011B DCR D 15 ; 011C JNZ 011A C2 ; 011D 1A ; 011E 01 ; 011F ADD C 81 ; 0120 POP D D1 ; 0121 POP B C1 ; 0122 RET C9 ; Data...
View Full Document

Ask a homework question - tutors are online