mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
169 lines
2.2 KiB
Plaintext
169 lines
2.2 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
FN.BYTE
|
||
FN.CLOCK
|
||
FN.DATEd
|
||
FN.FLAG
|
||
FN.CHRd
|
||
FN.INSTR
|
||
FN.KEY
|
||
lda #E.CSYN
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
FN.LEN jsr CORE.CheckOP
|
||
bcs .99
|
||
|
||
jsr EXP.Eval
|
||
bcs .99
|
||
|
||
lda EXP.TYPE
|
||
beq .90
|
||
|
||
jsr CORE.CheckCP
|
||
bcs .99
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.LEN,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.LEN.LEN
|
||
bne .1
|
||
|
||
stz EXP.TYPE
|
||
|
||
clc
|
||
rts
|
||
|
||
.90 lda #E.TMISMATCH
|
||
sec
|
||
.99 rts
|
||
*--------------------------------------
|
||
FN.LEFTd jsr CORE.CheckOP
|
||
bcs .99
|
||
|
||
jsr EXP.Eval
|
||
bcs .99
|
||
|
||
lda EXP.TYPE
|
||
beq .90
|
||
|
||
jsr CORE.CheckComma
|
||
bcs .99
|
||
|
||
jsr EXP.Eval
|
||
bcs .99
|
||
|
||
lda EXP.TYPE
|
||
bne .90
|
||
|
||
jsr CORE.CheckCP
|
||
bcs .99
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.LEFT,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.LEFT.LEN
|
||
bne .1
|
||
|
||
lda #'$'
|
||
sta EXP.TYPE
|
||
|
||
clc
|
||
rts
|
||
|
||
.90 lda #E.TMISMATCH
|
||
sec
|
||
.99 rts
|
||
*--------------------------------------
|
||
FN.MIDd
|
||
FN.PDL
|
||
FN.PEEK
|
||
FN.RANDOM
|
||
FN.RIGHTd
|
||
FN.RNDd
|
||
lda #E.CSYN
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
FN.STRd jsr CORE.CheckOP
|
||
bcs .99
|
||
|
||
jsr EXP.Eval
|
||
bcs .99
|
||
|
||
lda EXP.TYPE
|
||
bne .90
|
||
|
||
jsr CORE.CheckCP
|
||
bcs .99
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.STR,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.STR.LEN
|
||
bne .1
|
||
|
||
lda #'$'
|
||
sta EXP.TYPE
|
||
|
||
clc
|
||
rts
|
||
|
||
.90 lda #E.TMISMATCH
|
||
sec
|
||
.99 rts
|
||
*--------------------------------------
|
||
FN.TIMEd
|
||
lda #E.CSYN
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
FN.VAL jsr CORE.CheckOP
|
||
bcs .99
|
||
|
||
jsr EXP.Eval
|
||
bcs .99
|
||
|
||
lda EXP.TYPE
|
||
beq .90
|
||
|
||
jsr CORE.CheckCP
|
||
bcs .99
|
||
|
||
ldx #0
|
||
|
||
.1 lda CCODE.VAL,x
|
||
jsr CODE.EmitByte
|
||
inx
|
||
cpx #CCODE.VAL.LEN
|
||
bne .1
|
||
|
||
stz EXP.TYPE
|
||
|
||
clc
|
||
rts
|
||
|
||
.90 lda #E.TMISMATCH
|
||
sec
|
||
.99 rts
|
||
*--------------------------------------
|
||
FN.WHENd
|
||
*--------------------------------------
|
||
FN.WIDTH
|
||
lda #E.CSYN
|
||
sec
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/bin/acos.s.fn
|
||
LOAD usr/src/bin/acos.s
|
||
ASM
|