mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-18 00:30:40 +00:00
Kernel 0.92, Shell, PAUSE & SLEEP
This commit is contained in:
parent
2d29f081d6
commit
ec6d65ca0e
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -152,33 +152,54 @@ CS.RUN jsr SetPWD
|
|||||||
CS.RUN.LOOP jsr CL.Reset
|
CS.RUN.LOOP jsr CL.Reset
|
||||||
jsr IO.Reset
|
jsr IO.Reset
|
||||||
|
|
||||||
>LDA.G bReadMode READ Command ?
|
.1 jsr CheckSleep
|
||||||
bne .7
|
beq .3
|
||||||
|
|
||||||
>LDA.G bPause
|
>SLEEP
|
||||||
bpl .4
|
|
||||||
|
|
||||||
.2 >SLEEP
|
|
||||||
>SYSCALL GetChar
|
>SYSCALL GetChar
|
||||||
bcc .3
|
bcs .2
|
||||||
tay
|
|
||||||
beq .2 no char
|
|
||||||
rts
|
|
||||||
|
|
||||||
.3 cmp #3 Ctrl-C
|
cmp #3 Ctrl-C
|
||||||
beq .9
|
bne .1
|
||||||
bra .6
|
|
||||||
|
>LDA.G hFileBuf batch mode ?
|
||||||
|
bne .8
|
||||||
|
bra .1
|
||||||
|
|
||||||
|
.2 tay
|
||||||
|
beq .1
|
||||||
|
rts I/O err
|
||||||
|
|
||||||
|
.3 >LDA.G bPause
|
||||||
|
bpl .6
|
||||||
|
|
||||||
|
.4 >SLEEP
|
||||||
|
>SYSCALL GetChar
|
||||||
|
bcc .5 got one
|
||||||
|
tay
|
||||||
|
beq .4 no char
|
||||||
|
rts I/O err
|
||||||
|
|
||||||
|
.5 cmp #3 Ctrl-C
|
||||||
|
bne .60
|
||||||
|
|
||||||
|
>LDA.G hFileBuf batch mode ?
|
||||||
|
bne .8
|
||||||
|
|
||||||
|
.60 cmp #C.CR
|
||||||
|
bne .4
|
||||||
|
|
||||||
>STZ.G bPause
|
>STZ.G bPause
|
||||||
|
|
||||||
.4 jsr CheckSleep
|
.6 >LDA.G bReadMode READ Command ?
|
||||||
bne .2
|
bne .7
|
||||||
|
|
||||||
.6 >LDA.G hFileBuf batch mode ?
|
>LDA.G hFileBuf batch mode ?
|
||||||
beq CS.RUN.INTERCATIVE
|
beq CS.RUN.INTERCATIVE
|
||||||
jmp CS.RUN.BATCH
|
jmp CS.RUN.BATCH
|
||||||
.7 jmp CS.RUN.READ
|
.7 jmp CS.RUN.READ
|
||||||
|
|
||||||
|
.8 lda #3 User Interrupt
|
||||||
.9 sec
|
.9 sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -190,15 +211,15 @@ CS.RUN.INTERCATIVE
|
|||||||
|
|
||||||
.1 >SLEEP
|
.1 >SLEEP
|
||||||
>SYSCALL GetChar
|
>SYSCALL GetChar
|
||||||
bcc .21
|
bcc .2
|
||||||
|
|
||||||
tay
|
tay
|
||||||
beq .1 no char
|
beq .1 no char
|
||||||
|
|
||||||
rts I/O error
|
rts I/O error
|
||||||
|
|
||||||
.21 cmp #C.EOF
|
.2 cmp #C.EOF ....or Ctrl-D
|
||||||
beq .9
|
beq .9 CS
|
||||||
|
|
||||||
jsr CL.CHARIN
|
jsr CL.CHARIN
|
||||||
|
|
||||||
@ -206,11 +227,12 @@ CS.RUN.INTERCATIVE
|
|||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
lda (ZPCMDBuf)
|
lda (ZPCMDBuf)
|
||||||
beq CS.RUN.LOOP Empty line
|
beq .8 Empty line
|
||||||
|
|
||||||
jsr HIS.Add
|
jsr HIS.Add
|
||||||
|
|
||||||
jmp CS.RUN.Exec
|
jmp CS.RUN.Exec
|
||||||
|
.8 jmp CS.RUN.LOOP
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.READ
|
CS.RUN.READ
|
||||||
@ -320,13 +342,16 @@ CS.DOEVENT lda (pEvent)
|
|||||||
beq .9
|
beq .9
|
||||||
|
|
||||||
* ldy #Sleep already set by CheckSleep
|
* ldy #Sleep already set by CheckSleep
|
||||||
|
|
||||||
|
ldx #4
|
||||||
|
|
||||||
clc
|
clc
|
||||||
|
|
||||||
.1 lda (pData),y
|
.1 lda (pData),y
|
||||||
sbc #0
|
sbc #0
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
iny
|
iny
|
||||||
cpy #Sleep+4
|
dex
|
||||||
bne .1
|
bne .1
|
||||||
|
|
||||||
.9 sec
|
.9 sec
|
||||||
|
@ -226,7 +226,11 @@ STDLIB.GetDec jsr STDLIB.32.Clear
|
|||||||
* sec
|
* sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.8 clc
|
.8 tya
|
||||||
|
sec
|
||||||
|
beq .9
|
||||||
|
|
||||||
|
clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
STDLIB.32.T10 ldx #3
|
STDLIB.32.T10 ldx #3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user