Logo Foltyn Presentation
Table of Contents Previous Page Next Page
Content-Symbol-Img


Programming Kit COP-8 Logo

Page  1 2 3 4

COP-8
Programming Kit


;------------------- SUBROUTINES ------------------
;------------------ Binary Square -----------------
SQUARE:LDX,#MULTKANDLO
LDB,#MULTKATORLO
LDA,[X+]
XA,[B+]
LDA,[X+]
XA,[B+]
;-------------- Binary Multiplication -------------
MULTIPLY:LDB,#PRODUCTLO
CLRA
XA,[B+]
CLRA
XA,[B+]
LDTEMPCNT1,#011
MULT2:LDB,#PRODUCTHI
LDTEMPCNT2,#4
RC
MULT3:LDA,[B];Shift 4 Productbytes
RRCA
XA,[B-]
DRSZTEMPCNT2
JPMULT3
IFNC
JPMULT5
LDX,#MULTKANDLO
LDB,#PRODUCTLO
LDTEMPCNT2,#2
RC
MULT4:LDA,[X+]
ADCA,[B]
XA,[B+]
DRSZTEMPCNT2
JPMULT4
MULT5:DRSZTEMPCNT1
JPMULT2
RET