6.1. Processor CDP1802

Propis procesoru CDP1802

Vlastnosti

Tabulka 6.1. CDP1802 Opcodes řazeno podle operačních kódů

CODEMNEMOInstrukceCyclePopis
00IDLIdle2Wait for DMA or interrupt; M[R0)→BUS
0NLDNLoad via N2M(RN)→D; For N not 0
1NINCIncrement Reg. N2RN+1→RN
2NDECDecrement Reg. N2RN-1→RN
30BRShort Branch2M[RP]→RP.0
31BQShort Branch if Q=12If Q=1 Then M[RP]→RP.0 Else RP+1→RP
32BZShort Branch if D=02If D=0 Then M[RP]→RP.0 Else RP+1→RP
33BDFShort Branch if DF=12If D=1 Then M[RP]→RP.0 Else RP+1→RP
33BGEShort Branch if Equal or Greater2If D=1 Then M[RP]→RP.0 Else RP+1→RP
33BPZShort Branch if Pos. or Zero2If D=1 Then M[RP]→RP.0 Else RP+1→RP
34B1Short Branch if EF1=12If EF1=1 Then M[RP]→RP.0 Else RP+1→RP
35B2Short Branch if EF2=12If EF2=1 Then M[RP]→RP.0 Else RP+1→RP
36B3Short Branch if EF3=12If EF3=1 Then M[RP]→RP.0 Else RP+1→RP
37B4Short Branch if EF4=12If EF4=1 Then M[RP]→RP.0 Else RP+1→RP
38NBRNo Short Branch (See SKP)2RP+1→RP
38SKPShort Skip (See NBR)2RP+1→RP
39BNQShort Branch if Q=02If Q=1 Then M[RP]→RP.0 Else RP+1→RP
3ABNZShort Branch if D not 02If D not 0 Then M[RP]→RP.0 Else RP+1→RP
3BBMShort Branch if Minus2If D=0 Then M[RP]→RP.0 Else RP+1→RP
3BBNFShort Branch if DF=02If D=0 Then M[RP]→RP.0 Else RP+1→RP
3BBPLShort Branch if Less2If D=0 Then M[RP]→RP.0 Else RP+1→RP
3CBN1Short Branch if EF1=02If EF1=0 Then M[RP]→RP.0 Else RP+1→RP
3DBN2Short Branch if EF2=02If EF2=0 Then M[RP]→RP.0 Else RP+1→RP
3EBN3Short Branch if EF3=02If EF3=0 Then M[RP]→RP.0 Else RP+1→RP
3FBN4Short Branch if EF4=02If EF4=0 Then M[RP]→RP.0 Else RP+1→RP
4NLDALoad Advance2M(RN)→D; RN+1→RN
5NSTRStore via N2D→M(RN)
60IRXIncrement Reg. X2RX+1→RX
61OUT 1Output 12M[RX]→BUS; RX+1→RX; N Lines=1
62OUT 2Output 22M[RX]→BUS; RX+1→RX; N Lines=2
63OUT 3Output 32M[RX]→BUS; RX+1→RX; N Lines=3
64OUT 4Output 42M[RX]→BUS; RX+1→RX; N Lines=4
65OUT 5Output 52M[RX]→BUS; RX+1→RX; N Lines=5
66OUT 6Output 62M[RX]→BUS; RX+1→RX; N Lines=6
67OUT 7Output 72M[RX]→BUS; RX+1→RX; N Lines=7
69INP 1Input 12BUS→M[RX]; BUS→D; N Lines=1
6AINP 2Input 22BUS→M[RX]; BUS→D; N Lines=2
6BINP 3Input 32BUS→M[RX]; BUS→D; N Lines=3
6CINP 4Input 42BUS→M[RX]; BUS→D; N Lines=4
6DINP 5Input 52BUS→M[RX]; BUS→D; N Lines=5
6EINP 6Input 62BUS→M[RX]; BUS→D; N Lines=6
6FINP 7Input 72BUS→M[RX]; BUS→D; N Lines=7
70RETReturn2M[RX]→(X,P); RX+1→RX, 1→IE
71DISDisable2M[RX]→(X,P); RX+1→RX, 0→IE
72LDXALoad via X and Advance2M(RX)→D; RX+1→RX
73STXDStore via X and Decrement2D→M(RX); RX-1→RX
74ADCAdd with Carry2M[RX]+D+DF→(DF,D)
75SDBSubtract D with Borrow2M[RX]-D-(not DF)→(DF,D)
76RSHRRing Shift Right2shift D right, LSB(D)→DF, DF→MSB(D)
76SHRCShift Right with Carry2shift D right, LSB(D)→DF, DF→MSB(D)
77SMBSubtract Memory with Borrow2D-M[RX]-(not DF)→(DF,D)
78SAVSave2T→M[RX]
79MARKPush X,P to Stack2(X,P)→T;(X,P)→M[R2]; P→X; R2-1→R2
7AREQReset Q20→Q
7BSEQSet Q21→Q
7CADCIAdd with Carry, Immediate2M[RP]+D+DF→(DF,D); RP+1→RP
7DSDBISubtract D with Borrow, Immediate2M[RP]-D-(not DF)→(DF,D); RP+1→RP
7ERSHLRing Shift Left2shift D left, MSB(D)→DF, DF→LSB(D)
7ESHLCShift Left with Carry2shift D left, MSB(D)→DF, DF→LSB(D)
7FSMBISubtract Memory with Borrow, Immediate2D-M[RP]-(not DF)→(DF,D); RP+1→RP
8NGLOGet low Reg. N2RN.0→D
9NGHIGet low Reg. N2RN.1→D
ANPLOPut low Reg. N2D→RN.0
BNPHIPut low Reg. N2D→RN.1
C0LBRLong Branch3M[RP]→RP.1; M[RP+1]→RP.0
C1LBQLong Branch if Q=13If Q=1 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
C2LBZLong Branch if D=03If D=0 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
C3LBDFLong Branch if DF=13If DF=1 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
C4NOPNo Operation3Continue
C5LSNQLong Skip if Q=03If Q=0 Then RP+2→RP Else Continue
C6LSNZLong Skip if D not 03If D not 0 Then RP+2→RP Else Continue
C7LSNFLong Skip if DF=03If DF=0 Then RP+2→RP Else Continue
C8LSKPLong Skip (See NLBR)3RP+2→RP
C8NLBRNo Long (See LSKP)3RP+2→RP
C9LBNQLong Branch if Q=03If Q=0 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
CALBNZLong Branch if D not 03If D not 0 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
CBLBNFLong Branch if DF=03If DF=0 Then M[RP]→RP.1; M[RP+1]→RP.0 Else RP+2→RP
CCLSIELong Skip if IE=13If IE=1 Then RP+2→RP Else Continue
CDLSQLong Skip if Q=13If Q=1 Then RP+2→RP Else Continue
CELSZLong Skip if D=03If D=0 Then RP+2→RP Else Continue
CFLSDFLong Skip if DF=13If DF=1 Then RP+2→RP Else Continue
DNSEPSet P2N→P
ENSEXSet X2N→X
F0LDXLoad via X2M(RX)→D
F1OROr2M[RX] OR D →D
F2ANDAnd2M[RX] and D →D
F3XORExclusive Or2M[RX] xor D →D
F4ADDAdd2M[RX]+D→(DF,D)
F5SDSubtract D2M[RX]-D→(DF,D)
F6SHRShift Right2shift D right, LSB(D)→DF, 0→MSB(D)
F7SMSubtract Memory2D-M[RX]→(DF,D)
F8LDILoad Immediate2M(RP)→D; RP+1→RP
F9ORIOr Immediate2M[RP] OR D →D; RP+1→RP
FAANIAnd Immediate2M[RP] and D →D; RP+1→RP
FBXRIExclusive Or Immediate2M[RP] xor D →D; RP+1→RP
FCADIAdd Immediate2M[RP]+D→(DF,D); RP+1→RP
FDSDISubtract D Immediate2M[RP]-D→(DF,D); RP+1→RP
FESHLShift Left2shift D left, MSB(D)→DF, 0→LSB(D)
FFSMISubtract Memory Immediate2D-M[RP]→(DF,D); RP+1→RP

Tabulka 6.2. CDP1802 Opcodes řazeno podle operačních kódů

H\L0123            
0IDLLDN R1LDN R2LDN R3LDN R4LDN R5LDN R6LDN R7LDN R8LDN R9LDN RALDN RBLDN RCLDN RDLDN RELDN RF
1INC R0INC R1INC R2INC R3INC R4INC R5INC R6INC R7INC R8INC R9INC RAINC RBINC RCINC RDINC REINC RF
2DEC R0DEC R1DEC R2DEC R3DEC R4DEC R5DEC R6DEC R7DEC R8DEC R9DEC RADEC RBDEC RCDEC RDDEC REDEC RF
3BRBQBZBDFB1B2B3B4NBRBNQBNZBMBN1BN2BN3BN4
4LDA R0LDA R1LDA R2LDA R3LDA R4LDA R5LDA R6LDA R7LDA R8LDA R9LDA RALDA RBLDA RCLDA RDLDA RELDA RF
5STR R0STR R1STR R2STR R3STR R4STR R5STR R6STR R7STR R8STR R9STR RASTR RBSTR RCSTR RDSTR RESTR RF
6IRXOUT 1OUT 2OUT 3OUT 4OUT 5OUT 6OUT 7INP 1INP 2INP 3INP 4INP 5INP 6INP 7
7RETDISLDXASTXDADCSDBRSHRSMBSAVMARKREQSEQADCISDBIRSHLSMBI
8GLO R0GLO R1GLO R2GLO R3GLO R4GLO R5GLO R6GLO R7GLO R8GLO R9GLO RAGLO RBGLO RCGLO RDGLO REGLO RF
9GHI R0GHI R1GHI R2GHI R3GHI R4GHI R5GHI R6GHI R7GHI R8GHI R9GHI RAGHI RBGHI RCGHI RDGHI REGHI RF
APLO R0PLO R1PLO R2PLO R3PLO R4PLO R5PLO R6PLO R7PLO R8PLO R9PLO RAPLO RBPLO RCPLO RDPLO REPLO RF
BPHI R0PHI R1PHI R2PHI R3PHI R4PHI R5PHI R6PHI R7PHI R8PHI R9PHI RAPHI RBPHI RCPHI RDPHI REPHI RF
CLBRLBQLBZLBDFNOPLSNQLSNZLSNFNLBRLBNQLBNZLBNFLSIELSQLSZLSDF
DSEP R0SEP R1SEP R2SEP R3SEP R4SEP R5SEP R6SEP R7SEP R8SEP R9SEP RASEP RBSEP RCSEP RDSEP RESEP RF
ESEX R0SEX R1SEX R2SEX R3SEX R4SEX R5SEX R6SEX R7SEX R8SEX R9SEX RASEX RBSEX RCSEX RDSEX RESEX RF
FLDXORANDXORADDSDSHRSMLDIORIANIXRIADISDISHLSMI


[1] jen procesor CDP1805