Divide - 20 011B UserMod 01 011C ADD C 81 011D JMP 0121 C3...

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

View Full Document Right Arrow Icon
8085 Machine Code File 0100 LHLD 0300 2A ; Divide 16 bit by 8 bit using shift and subtract 0101 00 ; 0102 03 ; 0103 XCHG EB ; 0104 LXI H 0302 21 ; 0105 02 ; 0106 03 ; 0107 MOV C M 4E ; 0108 MVI B 10 06 ; 0109 10 ; 010A XRA A AF ; 010B MOV H A 67 ; 010C MOV L A 6F ; 010D DAD H 29 ; 010E XCHG EB ; 010F STC 37 ; 0110 CMC 3F ; 0111 RAL 17 ; 0112 DAD H 29 ; 0113 JNC 0117 D2 ; 0114 UserMod 17 ; 0115 UserMod 01 ; 0116 INR A 3C ; 0117 XCHG EB ; 0118 SUB C 91 ; 0119 JNC 0120 D2 ; 011A UserMod
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 20 ; 011B UserMod 01 ; 011C ADD C 81 ; 011D JMP 0121 C3 ; 011E UserMod 21 ; 011F UserMod 01 ; 0120 INX H 23 ; 0121 DCR B 05 ; 0122 JNZ 010D C2 ; 0123 0D ; 0124 01 ; 0125 SHLD 0303 22 ; 0126 03 ; 0127 03 ; 0128 STA 0305 32 ; 0129 05 ; 012A 03 ; 012B HLT 76 ; Data 0300 56 ;The 16 bit dividend in this and next byte (say 0654) 0301 06 ; 0302 2D ;The 8 bit divisor (say 2D) 0303 24 ;The 16 bit result in this and next byte 0304 00 ; 0305 02 ;The 8 bit remainder stored here....
View Full Document

This document was uploaded on 01/12/2011.

Ask a homework question - tutors are online