mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +00:00
Kernel 0.92+
This commit is contained in:
parent
d19060c13b
commit
dddaf0ff4b
Binary file not shown.
BIN
A2osxLogo.bmp
Normal file
BIN
A2osxLogo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
178
BIN/SH.S.CMD.txt
178
BIN/SH.S.CMD.txt
@ -540,9 +540,170 @@ CMD.BREAK
|
||||
CMD.CONTINUE
|
||||
.9 jmp CMD.Exec.CSYN
|
||||
*--------------------------------------
|
||||
CMD.FOR
|
||||
CMD.FOR lda (ZPArgVBufPtr)
|
||||
beq .9
|
||||
|
||||
>LDYA ZPArgVBufPtr
|
||||
>STYA ZPVarNamePtr
|
||||
|
||||
jsr CORE.ArgV.Next
|
||||
beq .9
|
||||
|
||||
jsr ToUpperCase
|
||||
cmp #'I'
|
||||
bne .9
|
||||
|
||||
ldy #1
|
||||
lda (ZPArgVBufPtr),y
|
||||
beq .9
|
||||
|
||||
jsr ToUpperCase
|
||||
cmp #'N'
|
||||
bne .9
|
||||
|
||||
iny
|
||||
lda (ZPArgVBufPtr),y
|
||||
bne .9
|
||||
|
||||
jsr CORE.ArgV.Next
|
||||
beq .9
|
||||
|
||||
cmp #'`'
|
||||
beq FOR.EXEC
|
||||
|
||||
sec
|
||||
jsr CORE.StkPushPtr Push CmdPtr AFTER FOR
|
||||
bcs .99
|
||||
|
||||
>LDYA ZPArgVBufPtr
|
||||
>SYSCALL strdup
|
||||
bcs .99
|
||||
phy
|
||||
jsr CORE.StkPush
|
||||
ply
|
||||
bcs .99
|
||||
tya
|
||||
jsr CORE.StkPush Push ListPtr
|
||||
bcs .99
|
||||
|
||||
txa
|
||||
jsr CORE.StkPush Push hLIST
|
||||
bcs .99
|
||||
|
||||
lda ZPVarNamePtr
|
||||
jsr CORE.StkPush
|
||||
bcs .99
|
||||
|
||||
lda ZPVarNamePtr+1 Push VARNAME
|
||||
jsr CORE.StkPush
|
||||
bcs .99
|
||||
|
||||
lda #C.FORLIST
|
||||
jsr CORE.StkPush
|
||||
bcs .99
|
||||
|
||||
>LDA.G CORE.Test
|
||||
ora #C.FOR Push FOR
|
||||
jsr CORE.StkPush
|
||||
bcs .99
|
||||
|
||||
jmp CMD.NEXT
|
||||
|
||||
|
||||
clc
|
||||
.99 rts
|
||||
.9 jmp CMD.Exec.CSYN
|
||||
*--------------------------------------
|
||||
FOR.EXEC
|
||||
* lda #$ff
|
||||
* >STA.G bReadMode
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
* stack+7 CmdPtr
|
||||
* stack+5 ListPtr
|
||||
* stack+4 hLIST
|
||||
* stack+2 VARNAME
|
||||
* stack+1 FOR SUB TOKEN
|
||||
* stack FOR TOKEN
|
||||
*--------------------------------------
|
||||
CMD.NEXT jsr CORE.StkGet Y = StkPtr
|
||||
bcs .9
|
||||
tax
|
||||
and #$3F
|
||||
cmp #C.FOR
|
||||
bne .9
|
||||
|
||||
dey
|
||||
lda (pData),y
|
||||
sta ZPVarNamePtr+1
|
||||
|
||||
dey
|
||||
lda (pData),y
|
||||
sta ZPVarNamePtr
|
||||
|
||||
dey skip hLIST
|
||||
|
||||
dey
|
||||
lda (pData),y
|
||||
sta ZPPtr1 get ListPtr
|
||||
|
||||
dey
|
||||
lda (pData),y
|
||||
sta ZPPtr1+1
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.1 iny
|
||||
lda (ZPPtr1)
|
||||
beq .8
|
||||
|
||||
inc ZPPtr1
|
||||
bne .2
|
||||
inc ZPPtr1+1
|
||||
|
||||
.2 cmp #C.SPACE
|
||||
beq .3
|
||||
|
||||
sta (ZPCLBuf),y
|
||||
bra .1
|
||||
|
||||
.3 lda #0
|
||||
sta (ZPCLBuf),y
|
||||
|
||||
tya
|
||||
beq .8
|
||||
|
||||
lda (pData)
|
||||
sec
|
||||
sbc #5
|
||||
tay
|
||||
lda ZPPtr1
|
||||
sta (pData),y
|
||||
iny
|
||||
lda ZPPtr1+1
|
||||
sta (pData),y
|
||||
iny
|
||||
lda (pData),y
|
||||
sta ZPInputBufPtr
|
||||
iny
|
||||
lda (pData),y
|
||||
sta ZPInputBufPtr+1
|
||||
clc
|
||||
rts
|
||||
|
||||
.8 lda (pData)
|
||||
|
||||
sec
|
||||
sbc #9
|
||||
sta (pData)
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 lda #E.NOFOR
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CMD.WHILE
|
||||
CMD.IF jsr CORE.StkGet
|
||||
bcs .1 no context...
|
||||
@ -565,7 +726,8 @@ CMD.IF jsr CORE.StkGet
|
||||
cmp #C.WHILE
|
||||
bne .8
|
||||
|
||||
jsr CORE.StkPushPtr
|
||||
clc
|
||||
jsr CORE.StkPushPtr Push BEFORE WHILE/IF
|
||||
bcs .9
|
||||
|
||||
.8 >LDA.G CORE.Test
|
||||
@ -575,9 +737,6 @@ CMD.IF jsr CORE.StkGet
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CMD.NEXT
|
||||
.9 jmp CMD.Exec.CSYN
|
||||
*--------------------------------------
|
||||
CMD.LOOP jsr CORE.StkPull
|
||||
bcs .9
|
||||
tax
|
||||
@ -652,14 +811,7 @@ CMD.IsSwitch lda (ZPArgVBufPtr)
|
||||
bne .9
|
||||
|
||||
txa
|
||||
cmp #'a'
|
||||
bcc .8
|
||||
cmp #'z'+1
|
||||
bcs .8
|
||||
eor #$20
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
jmp ToUpperCase
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
|
@ -41,7 +41,7 @@ CORE.Quit >LDA.G CORE.hArgVBuf
|
||||
* set hStdIn = hStdOut
|
||||
* set hStdOut = Std
|
||||
*--------------------------------------
|
||||
CORE.Run.CSYN lda #E.CSYN
|
||||
CORE.Run.CSYN lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
|
||||
@ -116,7 +116,7 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
|
||||
sta (pData),y
|
||||
|
||||
jsr CORE.GetNextCharNB skip ". "
|
||||
bcs CORE.Run.RTS nothing to execute...
|
||||
bcs .99 nothing to execute...
|
||||
|
||||
.4 >LDYA L.CMD internal command ?
|
||||
jsr CORE.LookupInputBuf
|
||||
@ -129,9 +129,7 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
|
||||
|
||||
txa
|
||||
>STA.G CORE.IntCmd
|
||||
cmp #C.EXIT
|
||||
bne .42
|
||||
|
||||
|
||||
.42 jsr CORE.StkGet
|
||||
bcs .7 no particular context, exec...
|
||||
tax
|
||||
@ -164,7 +162,7 @@ CORE.Run >LDYA ZPInputBufPtr Save Actual cmd for looping
|
||||
|
||||
.44 jsr CORE.GetNextCharNB Skip EoL char
|
||||
clc
|
||||
rts
|
||||
.99 rts
|
||||
|
||||
.5 >LDYA L.CORE.IO
|
||||
jsr CORE.LookupInputBuf
|
||||
@ -269,13 +267,10 @@ CORE.Lookup >STYA ZPPtr2
|
||||
lda (ZPPtr1),y
|
||||
beq .4 Table Keyword end
|
||||
lda (ZPPtr2),y
|
||||
cmp #'a'
|
||||
bcc .21
|
||||
cmp #'z'+1
|
||||
bcs .21
|
||||
eor #$20
|
||||
|
||||
jsr ToUpperCase
|
||||
|
||||
.21 cmp (ZPPtr1),y
|
||||
cmp (ZPPtr1),y
|
||||
beq .2
|
||||
|
||||
bra .4
|
||||
@ -305,7 +300,7 @@ CORE.Lookup >STYA ZPPtr2
|
||||
lda (ZPPtr1) Array Ending 0, must be an external Cmd....
|
||||
bne .1
|
||||
|
||||
lda #E.CSYN
|
||||
lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -452,7 +447,7 @@ CORE.IO.Open pha Open Mode
|
||||
rts
|
||||
|
||||
.9 pla
|
||||
lda #E.CSYN
|
||||
lda #E.SYN
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -519,10 +514,17 @@ CORE.SkipCharsA clc
|
||||
*--------------------------------------
|
||||
* Stack
|
||||
*--------------------------------------
|
||||
CORE.StkPushPtr lda ZPInputCmdPtr
|
||||
jsr CORE.StkPush
|
||||
CORE.StkPushPtr bcs .1
|
||||
lda ZPInputCmdPtr
|
||||
ldx ZPInputCmdPtr+1
|
||||
bra .2
|
||||
|
||||
.1 lda ZPInputBufPtr
|
||||
ldx ZPInputBufPtr+1
|
||||
|
||||
.2 jsr CORE.StkPush
|
||||
bcs CORE.StkPullPtr.9
|
||||
lda ZPInputCmdPtr+1
|
||||
txa
|
||||
bra CORE.StkPush
|
||||
*--------------------------------------
|
||||
CORE.StkPullPtr jsr CORE.StkPull
|
||||
|
@ -140,7 +140,7 @@ IO.PrintBatchErrMsg
|
||||
|
||||
ldy #S.PS.RC
|
||||
lda (pPs),y
|
||||
cmp #E.CSYN
|
||||
cmp #E.SYN
|
||||
beq .10
|
||||
|
||||
>LDYA ZPInputCmdPtr
|
||||
|
12
BIN/SH.S.txt
12
BIN/SH.S.txt
@ -32,6 +32,9 @@ C.BREAK .EQ 36
|
||||
C.CONTINUE .EQ 38
|
||||
*--------------------------------------
|
||||
C.FOR .EQ 40
|
||||
C.FORLIST .EQ 0
|
||||
C.FORFILE .EQ 2
|
||||
C.FOREXEC .EQ 4
|
||||
C.WHILE .EQ 42
|
||||
C.IF .EQ 44
|
||||
C.NEXT .EQ 46
|
||||
@ -528,6 +531,15 @@ RemoveStrFromArgV
|
||||
bra .2
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
ToUpperCase cmp #'a'
|
||||
bcc .8
|
||||
cmp #'z'+1
|
||||
bcs .8
|
||||
eor #$20
|
||||
|
||||
.8 clc exit CC to allow Jmp to
|
||||
rts
|
||||
*--------------------------------------
|
||||
.INB USR/SRC/BIN/SH.S.CL
|
||||
.INB USR/SRC/BIN/SH.S.HIS
|
||||
|
Loading…
Reference in New Issue
Block a user