Intel mcs-48 Microscope & Magnifier User Manual


 
APP\,JCATION EXAMPLES
16
x 8 DIVIDE-{ASSEMBLED BY MCS-48 MACRO ASS.E.MBLERSEE AP-49)
ISIS-II
"CS-48/UPI-41
UCRO
ASSE"8LER, Y3.B
LO
C
08
J
BB
48
2A
BB4C
88B8
BB4E 37
B04F
61
8050 37
USI
F65.
BU53
A7
B054
BHF
aD56
61
B057
~7
USB
2A
Be"
F7
USA
2A
USB
F7
BOSC
EH3
USE
37
885F
61
BUB 37
DB.l
BHB
U.3
37
U64
61
LI
NE
SOURCE
STATE"ENT
183
1=
184
1=
185
UNCLUOE('
Fl'
DIYI6)
i.*****.************.*******************.****.***·*···
•••••••••••••••••••••••••
l *
1-
186
It
1=
187
,.
1=
188
1=
18'
He
1 = 1
~B
,.
1=
191
,.
1=
192
'ill
1 =
193
;.
1-
194
,.
1-
195
;.,
1 =
19'
;.
1 = 197
,.
1=
19B
,.
1 =
199
; *
1=
2BB
, .
0lV16
THIS
UTILITY
PROVIDES
AN
16
BY
8
UNSIGNED
~IVIDE
AT
ENTRY'
A =
LOWER
EIGHT
BITS
OF
DESTINATION
OPERAND
XA=
UPPER
EIGHT
BITS
OF
DIVIDEND
RI-
POINTER
TO
DIVISOR
IN
IHTERNAL
"EHORY
AT
EXIT'
A
=
LOWER
EIGHT
BITS
OF
RESULT
XA=
RE"A
INDER
C =
SET
IF
OYERFLOW
ELSE
CLEARED
1=
2Bl
; ......................................•..•••.•••••••..•.•.•.••...••••••.•••.••
1-
282
1-
283
1=
284
1=
285
1=
286
1=
207
I-
28B
1=
2B~
1-
21B
1 = 211
1=
212
1=
213
'1
OIY16'
DIVI6,
XCH
;1
COUNT'=S
nov
COUNT,IS
)
ROUTINE
WORKS
"OSTLY
WITH
81TS
15-8
'1
DIYIDENDI
IS-BI'=DIVIDENDI 15-BI-DIVISOR
CPL
A
ADD
A,
IIRI
CPL
A
'1
IF
BORROW=B
THEN
/.
IT
FITS.I
JC
DIVIA
1=
214
,2
1=
215
SET
OYERFL~W
FLAG
CPL
1-
216
I-
217
1=
218
1=
219
1 =
22
B
1 = 221
1=
222
1 =
223
1=
224
1=
225
1=
226
I-
227
1=
22B
1=
229
1-
23B
1=
231
1=
232
1=
233
1-
234
1=
235
1=
236
1=
237
J"P
DIYIB
) 1
ELSE
OIYIA'
'2
RESTORE
DIVIDEND
A,
@R
I
ADO
'2
REPEAT
OIYILP'
) 4
) 4
,4
DIYIE'
CLR
XCH
RLC
XCH
RLC
JNC
CPL
ADD
cn
JHP
CPL
ADD
DIV!DEND'=DIYIDENO.2
QUOTIEHT,-gUOTIEHT*2
C
A,XA
A
A,
XA
A
DIYIE
A
A,
fRl
A
DIVIC
o
IV
IDEND[
15-8]'
-01
VI
DEND[
IS-81-01V1S0R
A
A,9Rl
5-28