datasheetbank_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

CDP1855 View Datasheet(PDF) - Intersil

Part Name
Description
View to exact match
CDP1855 Datasheet PDF : 15 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
CDP1855, CDP1855C
Programming Example for Division
MEMORY
LOCATION
0000
0000
0000
0000
0004
0004
0008
0008
000C
000C
000C
000F
000F
000F
000F
0011
0011
0014
0016
0016
0016
0019
0019
0019
001C
001C
001C
001F
001F
0021
0021
0021
0021
0024
0024
0027
0027
0028
0000
OP
CODE
;
;
;
68C22000;
;
68C33000;
;
68C44000;
;
;
E067F0;
;
;
;
E464;
;
E06600;
E365;
;
;
E067F2;
;
;
E26D60;
;
;
E067F0;
;
E365;
;
;
;
E067F2;
;
E26D60;
;
6E;
;
LINE
NO.
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
ASSEMBLY LANGUAGE
. . Program example for a 16-bit by 8-bit divide using 1 CDP1855 MDU
. . Gives a 16-bit answer with 8-bit remainder
RLDI R2, 2000H
RLDI R3, 3000H
RLDI R4, 4000H
. . Answer is stored at 2000 hex
. . Register 2 points to it
. . Dividend is stored at 3000 hex
. . Register 3 points to it
. . Divisor is stored at 4000 hex
. . Register 4 points to it
SEX R4; OUT 7; DC OF0H
. . Write to the control register to use
. . clock/2; 1MDU; reset sequence
. . counter; and no operation
SEX R4; OUT 4
. . Load the divisor into the X register
SEX R0; OUT 6; DC 0
SEX R3; OUT 5
. . Load 0 into the Y register
. . Load the most significant 8 bits of
. . the dividend into the Z register
SEX R0; OUT 7; DC 0F2H
. . Do the first divide, also resets the
. . sequence counter
SEX R2; INP 5; IRX
. . Read and store the most significant
. . 8 bits of the answer at 2000 hex
SEX R0; OUT 7; DC 0F0H . . Reset the sequence counter
SEX R3; OUT 5
. . Load the 8 least significant 8 bits
. . of the original dividend into the Z
. . register
SEX R0; OUT 7; DC 0F2H . . Do the second division
SEX R2; INP 5; IRX
INP 6
. . Read and store the least significant
. . 8 bits of the answer at 2001 hex
. . Read and store the remainder at 2002
. . hex
For the divide operation (Figure 5), the formula is:
4-56

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]