mirror of https://github.com/A2osX/A2osX.git
Kernel 0.94+
This commit is contained in:
parent
4c922fed4d
commit
22c28e2f59
Binary file not shown.
Binary file not shown.
|
@ -129,10 +129,17 @@ CORE.Compile jsr CORE.GetChar
|
|||
jsr CORE.GetNextCharNB skip '='
|
||||
bcs .90
|
||||
|
||||
jsr EXP.Eval
|
||||
jsr EXP.Eval ZPTYPE set by CreateOrGetVar
|
||||
bcs .99
|
||||
|
||||
jsr CODE.PULLL2ZPADDR Store Int32 result in DATASEG
|
||||
ldx ZPTYPE
|
||||
beq .4
|
||||
|
||||
|
||||
|
||||
bra .8
|
||||
|
||||
.4 jsr CODE.PULLL2ZPADDR Store Int32 result in DATASEG
|
||||
*--------------------------------------
|
||||
.8 jsr CORE.GetCharNB
|
||||
bcs .99
|
||||
|
@ -156,7 +163,7 @@ CORE.Compile jsr CORE.GetChar
|
|||
CORE.FWREF >LDA.G hFWRefBuf
|
||||
>SYSCALL GetMemPtr
|
||||
>STYA ZPInputBufPtr
|
||||
>DEBUG
|
||||
|
||||
.1 lda (ZPInputBufPtr)
|
||||
beq .8
|
||||
|
||||
|
@ -341,24 +348,17 @@ CORE.2FWRefBuf sta (ZPFWRefBufPtr)
|
|||
.8 rts
|
||||
*--------------------------------------
|
||||
CORE.CreateOrGetVar
|
||||
stz ZPTYPE
|
||||
|
||||
>LDA.G hVars
|
||||
jsr CORE.GetAddr
|
||||
bcc .8
|
||||
bcc .1
|
||||
|
||||
>LDA.G hVars
|
||||
jsr CORE.NewKey
|
||||
bcs .9
|
||||
|
||||
stz ZPTYPE
|
||||
|
||||
jsr CORE.GetChar
|
||||
cmp #'$'
|
||||
bne .1
|
||||
|
||||
sta ZPTYPE
|
||||
jsr CORE.GetNextChar skip $
|
||||
|
||||
.1 >PUSHB.G hVars
|
||||
>PUSHB.G hVars
|
||||
>PUSHW ZPSID
|
||||
>PUSHWI ZPDataBufPtr
|
||||
>PUSHWI 3 3 bytes : ADDR + TYPE
|
||||
|
@ -377,7 +377,15 @@ CORE.CreateOrGetVar
|
|||
adc #0
|
||||
sta ZPDataBufPtr+1
|
||||
|
||||
.8
|
||||
.1 jsr CORE.GetChar
|
||||
cmp #'$'
|
||||
bne .8
|
||||
|
||||
sta ZPTYPE
|
||||
jsr CORE.GetNextChar skip $
|
||||
|
||||
.8 clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CORE.NewKey >PUSHA
|
||||
|
|
|
@ -15,22 +15,33 @@ EXP.Eval lda EXP.AOPS
|
|||
bcs .39
|
||||
|
||||
.11 cmp #'('
|
||||
bne .20
|
||||
bne .12
|
||||
|
||||
jsr CORE.GetNextCharNB skip (
|
||||
bcs .90
|
||||
bcs .39
|
||||
|
||||
jsr EXP.Eval
|
||||
bcs .99
|
||||
bcs .39
|
||||
|
||||
jsr CORE.GetCharNB
|
||||
bcs .90
|
||||
bcs .39
|
||||
|
||||
cmp #')'
|
||||
bne .90
|
||||
|
||||
jsr CORE.GetNextCharNB skip )
|
||||
bra .41
|
||||
|
||||
.12 cmp #'"'
|
||||
bne .20
|
||||
|
||||
lda ZPTYPE
|
||||
beq .90
|
||||
|
||||
jsr EXP.GetString
|
||||
bcs .99
|
||||
|
||||
bra .40
|
||||
*--------------------------------------
|
||||
.20 jsr CORE.IsLetter
|
||||
bcs .30 FN or VAR
|
||||
|
@ -84,9 +95,8 @@ EXP.Eval lda EXP.AOPS
|
|||
>PUSHA
|
||||
|
||||
.63 jsr CORE.GetNextCharNB
|
||||
bcc .11
|
||||
|
||||
bcs .90
|
||||
jmp .11
|
||||
*--------------------------------------
|
||||
.80 >PULLA
|
||||
tax
|
||||
|
@ -117,6 +127,42 @@ EXP.Eval lda EXP.AOPS
|
|||
EXP.FNjmpX jmp (J.ACOS.FN,x)
|
||||
EXP.OPjmpX jmp (J.ACOS.AOPS,x)
|
||||
*--------------------------------------
|
||||
EXP.GetString ldy #0
|
||||
|
||||
.1 jsr CORE.GetNextChar
|
||||
bcs .91
|
||||
|
||||
cmp #'"'
|
||||
beq .2
|
||||
|
||||
sta (ZPConstBufPtr),y
|
||||
iny
|
||||
bne .1
|
||||
|
||||
.2 lda #0
|
||||
sta (ZPConstBufPtr),y
|
||||
|
||||
>PUSHW ZPConstBufPtr
|
||||
|
||||
tya
|
||||
clc
|
||||
adc ZPConstBufPtr
|
||||
sta ZPConstBufPtr
|
||||
bcc .3
|
||||
|
||||
inc ZPConstBufPtr+1
|
||||
|
||||
.3 jsr CORE.GetNextCharNB skip "
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.90
|
||||
|
||||
.91 lda #E.ESYN
|
||||
* sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
EXP.GetOP jsr CORE.IsAOPSChar + - * /
|
||||
bcc .9
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
*--------------------------------------
|
||||
STR.Add
|
||||
*--------------------------------------
|
||||
STR.replace
|
||||
*--------------------------------------
|
||||
STR.Get
|
||||
*--------------------------------------
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/bin/acos.s.str
|
||||
LOAD usr/src/bin/acos.s
|
||||
ASM
|
|
@ -464,6 +464,7 @@ CCODE.FPRINTL.LEN .EQ *-CCODE.FPRINTL
|
|||
.INB usr/src/bin/acos.s.exp
|
||||
.INB usr/src/bin/acos.s.fn
|
||||
.INB usr/src/bin/acos.s.kw
|
||||
.INB usr/src/bin/acos.s.str
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
|
|
|
@ -23,9 +23,11 @@ hFile .BS 1
|
|||
hBuf .BS 1
|
||||
LineNum .BS 2
|
||||
char .BS 1
|
||||
|
||||
bIgnoreCase .BS 1
|
||||
bLineNum .BS 1
|
||||
bInvertMatch .BS 1
|
||||
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
|
@ -119,6 +121,7 @@ CS.RUN.CheckArgs
|
|||
lda (ZPPtr1),y
|
||||
|
||||
ldx #OptionList.Cnt-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
|
||||
|
@ -128,9 +131,9 @@ CS.RUN.CheckArgs
|
|||
bra .97
|
||||
|
||||
.3 txa
|
||||
lsr
|
||||
beq .98
|
||||
|
||||
lsr
|
||||
tax
|
||||
lda #$80
|
||||
sta bIgnoreCase-1,x
|
||||
|
@ -169,6 +172,7 @@ CS.RUN.CheckArgs
|
|||
.9 rts
|
||||
|
||||
.97 lda #E.SYN
|
||||
|
||||
.98 pha
|
||||
>PUSHW L.MSG.USAGE
|
||||
>PUSHBI 0
|
||||
|
@ -181,6 +185,7 @@ CS.RUN.NextArg inc ArgIndex
|
|||
lda ArgIndex
|
||||
>SYSCALL ArgV
|
||||
bcs .9
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
.9 rts
|
||||
|
@ -200,7 +205,7 @@ CS.RUN.PRINT >LDYA ZPBufPtr
|
|||
>STYA ZPPtr1
|
||||
|
||||
.1 lda (ZPPtr1)
|
||||
beq .8
|
||||
beq .4
|
||||
|
||||
ldy #$ff
|
||||
|
||||
|
@ -255,10 +260,13 @@ CS.RUN.PRINT >LDYA ZPBufPtr
|
|||
*--------------------------------------
|
||||
CS.RUN.toUpper bit bIgnoreCase
|
||||
bpl .9
|
||||
|
||||
cmp #'a'
|
||||
bcc .9
|
||||
|
||||
cmp #'z'+1
|
||||
bcs .9
|
||||
|
||||
eor #$20
|
||||
|
||||
.9 rts
|
||||
|
@ -281,7 +289,7 @@ CS.DOEVENT sec
|
|||
*--------------------------------------
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
OptionList .AZ "HhIiNnVv"
|
||||
OptionList .AS "HhIiNnVv"
|
||||
OptionList.Cnt .EQ *-OptionList
|
||||
*--------------------------------------
|
||||
MSG.USAGE .AS "Usage : GREP <pattern> <File> or CMD|GREP <pattern>\r\n"
|
||||
|
|
|
@ -138,7 +138,6 @@ D2.MoveHead.SEI lda D2.CurrentQTrack
|
|||
nop
|
||||
nop
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
rts
|
||||
|
||||
D2.SeekPhOnY and #6
|
||||
|
|
|
@ -408,7 +408,7 @@ XRW.Write bit IO.D2.ReadProt,x (4) PREWRITE MODE
|
|||
|
||||
* nop (2)
|
||||
|
||||
jsr XRW.Write.RTS (12)
|
||||
* jsr XRW.Write.RTS (12)
|
||||
|
||||
sta IO.D2.WriteMode,x (5) goto write mode
|
||||
ora IO.D2.WShift,x (4)
|
||||
|
@ -850,10 +850,9 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
|||
jsr XRW.Wait25600usec
|
||||
|
||||
XRW.SeekPhOff lda IO.D2.Ph0Off,x
|
||||
ldx A2L
|
||||
lda IO.D2.RData,x
|
||||
nop
|
||||
nop
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
clc Exit wit CC (recalibrate)
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
|
Loading…
Reference in New Issue