2021-12-02 21:28:26 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.bMUL
|
|
|
|
|
CC.BOPS.cMUL
|
2022-01-30 21:47:08 +00:00
|
|
|
|
inc pStack
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.bDIV
|
|
|
|
|
CC.BOPS.cDIV
|
2022-01-30 21:47:08 +00:00
|
|
|
|
inc pStack
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.bMOD
|
|
|
|
|
CC.BOPS.cMOD
|
2022-01-30 21:47:08 +00:00
|
|
|
|
inc pStack
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.BOPS.ADD clc
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>PULLA
|
|
|
|
|
adc (pStack)
|
|
|
|
|
sta (pStack)
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.BOPS.SUB sec
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
sbc (pStack)
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.BOPS.SHL >PULLA
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tax
|
|
|
|
|
beq .8
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
lda (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
.1 asl
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
sta (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.8 rts
|
2021-12-02 21:28:26 +00:00
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.BOPS.SHR >PULLA
|
2021-12-02 21:28:26 +00:00
|
|
|
|
tax
|
|
|
|
|
beq .8
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
lda (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
.1 lsr
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
sta (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.L >PULLA
|
|
|
|
|
cmp (pStack)
|
|
|
|
|
bcc .8
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 lda #1
|
|
|
|
|
sta (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2022-01-30 21:47:08 +00:00
|
|
|
|
CC.BOPS.G >PULLA
|
|
|
|
|
cmp (pStack)
|
|
|
|
|
beq .1
|
|
|
|
|
bcs .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
.1 lda #0
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 lda #1
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.LE >PULLA
|
|
|
|
|
cmp (pStack)
|
|
|
|
|
bcc .8
|
|
|
|
|
beq .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 lda #1
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.GE >PULLA
|
|
|
|
|
cmp (pStack)
|
|
|
|
|
bcs .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 lda #1
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.EQ >PULLA
|
|
|
|
|
cmp (pStack)
|
|
|
|
|
beq .8
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2022-01-30 21:47:08 +00:00
|
|
|
|
lda #0
|
|
|
|
|
sta (pStack)
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.NE >PULLA
|
|
|
|
|
eor (pStack)
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.LAND
|
|
|
|
|
CC.BOPS.AND >PULLA
|
|
|
|
|
and (pStack)
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.LOR
|
|
|
|
|
CC.BOPS.OR >PULLA
|
|
|
|
|
ora (pStack)
|
|
|
|
|
sta (pStack)
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CC.BOPS.EOR >PULLA
|
|
|
|
|
eor (pStack)
|
|
|
|
|
sta (pStack)
|
2021-12-02 21:28:26 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/bin/cc.s.exec
|
|
|
|
|
LOAD usr/src/bin/cc.s
|
|
|
|
|
ASM
|