A2osX/BIN/CC.S.EXEC.txt
2022-06-12 22:42:22 +02:00

151 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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