A2osX/BIN/CC.S.EXEC.txt

152 lines
2.4 KiB
Plaintext
Raw Normal View History

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
CC.BOPS.bMUL
CC.BOPS.cMUL
2022-01-30 21:47:08 +00:00
inc pStack
clc
rts
*--------------------------------------
CC.BOPS.bDIV
CC.BOPS.cDIV
2022-01-30 21:47:08 +00:00
inc pStack
clc
rts
*--------------------------------------
CC.BOPS.bMOD
CC.BOPS.cMOD
2022-01-30 21:47:08 +00:00
inc pStack
clc
rts
*--------------------------------------
2022-01-30 21:47:08 +00:00
CC.BOPS.ADD clc
>PULLA
adc (pStack)
sta (pStack)
clc
rts
*--------------------------------------
2022-01-30 21:47:08 +00:00
CC.BOPS.SUB sec
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
tax
beq .8
2022-01-30 21:47:08 +00:00
lda (pStack)
.1 asl
dex
bne .1
2022-01-30 21:47:08 +00:00
sta (pStack)
2022-01-30 21:47:08 +00:00
.8 rts
*--------------------------------------
2022-01-30 21:47:08 +00:00
CC.BOPS.SHR >PULLA
tax
beq .8
2022-01-30 21:47:08 +00:00
lda (pStack)
.1 lsr
dex
bne .1
2022-01-30 21:47:08 +00:00
sta (pStack)
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)
rts
*--------------------------------------
2022-01-30 21:47:08 +00:00
CC.BOPS.G >PULLA
cmp (pStack)
beq .1
bcs .8
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
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
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
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)
rts
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.exec
LOAD usr/src/bin/cc.s
ASM