2020-01-25 18:56:36 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2020-01-26 19:36:49 +00:00
|
|
|
|
* A = Type, X = OP
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOP.EXEC jmp (J.CSH.BOPS,x)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.ADD asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.CSH.BOPS.ADDt,x)
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.ADDi8
|
|
|
|
|
CSH.BOPS.ADDu8 clc
|
|
|
|
|
>PULLA
|
|
|
|
|
adc (pStack)
|
|
|
|
|
sta (pStack)
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.ADDi16
|
|
|
|
|
CSH.BOPS.ADDu16 clc
|
|
|
|
|
ldy #1
|
|
|
|
|
>PULLA
|
|
|
|
|
adc (pStack),y
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
>PULLA
|
|
|
|
|
adc (pStack),y
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
CSH.BOPS.ADDi32
|
|
|
|
|
CSH.BOPS.ADDu32 >FPU ADD32
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.ADDf >FPU FADD
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.SUB asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.CSH.BOPS.SUBt,x)
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SUBi8
|
|
|
|
|
CSH.BOPS.SUBu8 sec
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
sbc (pStack)
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SUBi16
|
|
|
|
|
CSH.BOPS.SUBu16 sec
|
|
|
|
|
ldy #2
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
sbc (pStack)
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
ldy #1
|
|
|
|
|
sbc (pStack),y
|
|
|
|
|
inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
CSH.BOPS.SUBi32
|
|
|
|
|
CSH.BOPS.SUBu32 >FPU SUB32
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SUBf >FPU FSUB
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-21 13:24:16 +00:00
|
|
|
|
CSH.BOPS.MUL cmp #CSH.T.FLOAT
|
2020-01-26 19:36:49 +00:00
|
|
|
|
beq .8
|
2020-02-21 13:24:16 +00:00
|
|
|
|
|
2020-02-14 07:21:56 +00:00
|
|
|
|
>FPU MUL32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-26 19:36:49 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 >FPU FMULT
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.DIV cmp #CSH.T.FLOAT
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 >FPU FDIV
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.MOD clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.SHL asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.CSH.BOPS.SHLt,x)
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SHL8 lda (pStack)
|
|
|
|
|
tax
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #1
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
|
|
|
|
|
.1 asl
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
|
|
|
|
|
.8 inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SHL16 lda (pStack)
|
|
|
|
|
tax
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #2
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
.1 asl
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
rol
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
pla
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
|
|
|
|
|
.8 inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
CSH.BOPS.SHL32 lda (pStack)
|
|
|
|
|
tax
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
ldy #4
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
|
|
|
|
|
.1 asl
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldy #5
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
rol
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
rol
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
iny
|
|
|
|
|
lda (pStack),y
|
|
|
|
|
rol
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
pla
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldy #4
|
|
|
|
|
sta (pStack),y
|
|
|
|
|
|
|
|
|
|
.8 inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
inc pStack
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CSH.BOPS.SHR
|
|
|
|
|
CSH.BOPS.L
|
|
|
|
|
CSH.BOPS.G
|
|
|
|
|
CSH.BOPS.LE
|
|
|
|
|
CSH.BOPS.GE
|
|
|
|
|
CSH.BOPS.EQ
|
|
|
|
|
CSH.BOPS.NE
|
|
|
|
|
CSH.BOPS.AND
|
|
|
|
|
CSH.BOPS.OR
|
|
|
|
|
CSH.BOPS.EOR
|
|
|
|
|
CSH.BOPS.LAND
|
|
|
|
|
CSH.BOPS.LOR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-01-25 18:56:36 +00:00
|
|
|
|
EXEC.log >FPU LOG
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.sqr >FPU SQR
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.exp >FPU EXP
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.cos >FPU COS
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.sin >FPU SIN
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.tan >FPU TAN
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.atan >FPU ATAN
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.getchar >SYSCALL GetChar
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.puts >PULLYA
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL PutS
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.printf >SYSCALL PrintF
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.execl >SYSCALL ExecL
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.putenv >SYSCALL PutEnv
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.setenv >SYSCALL SetEnv
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.getenv >SYSCALL GetEnv
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-28 07:21:46 +00:00
|
|
|
|
EXEC.unsetenv >SYSCALL UnsetEnv
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.MD5 >SYSCALL MD5
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EXEC.malloc >PULLYA
|
2020-02-28 07:21:46 +00:00
|
|
|
|
>SYSCALL GetMem
|
2020-01-25 18:56:36 +00:00
|
|
|
|
>PUSHYA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/BIN/CSH.S.EXEC
|
|
|
|
|
LOAD USR/SRC/BIN/CSH.S
|
|
|
|
|
ASM
|