mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-26 13:49:18 +00:00
151 lines
2.4 KiB
Plaintext
151 lines
2.4 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
CC.BOPS.bMUL
|
||
CC.BOPS.cMUL
|
||
inc pStack
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.bDIV
|
||
CC.BOPS.cDIV
|
||
inc pStack
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.bMOD
|
||
CC.BOPS.cMOD
|
||
inc pStack
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.ADD clc
|
||
>PULLA
|
||
adc (pStack)
|
||
sta (pStack)
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.SUB sec
|
||
ldy #1
|
||
lda (pStack),y
|
||
sbc (pStack)
|
||
sta (pStack),y
|
||
inc pStack
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.SHL >PULLA
|
||
tax
|
||
beq .8
|
||
|
||
lda (pStack)
|
||
|
||
.1 asl
|
||
dex
|
||
bne .1
|
||
|
||
sta (pStack)
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
CC.BOPS.SHR >PULLA
|
||
tax
|
||
beq .8
|
||
|
||
lda (pStack)
|
||
|
||
.1 lsr
|
||
dex
|
||
bne .1
|
||
|
||
sta (pStack)
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
CC.BOPS.L >PULLA
|
||
cmp (pStack)
|
||
bcc .8
|
||
|
||
lda #0
|
||
sta (pStack)
|
||
rts
|
||
|
||
.8 lda #1
|
||
sta (pStack)
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.G >PULLA
|
||
cmp (pStack)
|
||
beq .1
|
||
bcs .8
|
||
|
||
.1 lda #0
|
||
sta (pStack)
|
||
rts
|
||
|
||
.8 lda #1
|
||
sta (pStack)
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.LE >PULLA
|
||
cmp (pStack)
|
||
bcc .8
|
||
beq .8
|
||
|
||
lda #0
|
||
sta (pStack)
|
||
rts
|
||
|
||
.8 lda #1
|
||
sta (pStack)
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.GE >PULLA
|
||
cmp (pStack)
|
||
bcs .8
|
||
|
||
lda #0
|
||
sta (pStack)
|
||
rts
|
||
|
||
.8 lda #1
|
||
sta (pStack)
|
||
rts
|
||
*--------------------------------------
|
||
CC.BOPS.EQ >PULLA
|
||
cmp (pStack)
|
||
beq .8
|
||
|
||
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)
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/bin/cc.s.exec
|
||
LOAD usr/src/bin/cc.s
|
||
ASM
|