mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 20:33:13 +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
|
||||
jsr IO.Reset
|
||||
|
||||
>LDA.G bReadMode READ Command ?
|
||||
bne .7
|
||||
.1 jsr CheckSleep
|
||||
beq .3
|
||||
|
||||
>LDA.G bPause
|
||||
bpl .4
|
||||
|
||||
.2 >SLEEP
|
||||
>SLEEP
|
||||
>SYSCALL GetChar
|
||||
bcc .3
|
||||
tay
|
||||
beq .2 no char
|
||||
rts
|
||||
bcs .2
|
||||
|
||||
.3 cmp #3 Ctrl-C
|
||||
beq .9
|
||||
bra .6
|
||||
cmp #3 Ctrl-C
|
||||
bne .1
|
||||
|
||||
>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
|
||||
|
||||
.4 jsr CheckSleep
|
||||
bne .2
|
||||
.6 >LDA.G bReadMode READ Command ?
|
||||
bne .7
|
||||
|
||||
.6 >LDA.G hFileBuf batch mode ?
|
||||
>LDA.G hFileBuf batch mode ?
|
||||
beq CS.RUN.INTERCATIVE
|
||||
jmp CS.RUN.BATCH
|
||||
.7 jmp CS.RUN.READ
|
||||
|
||||
.8 lda #3 User Interrupt
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -190,15 +211,15 @@ CS.RUN.INTERCATIVE
|
||||
|
||||
.1 >SLEEP
|
||||
>SYSCALL GetChar
|
||||
bcc .21
|
||||
bcc .2
|
||||
|
||||
tay
|
||||
beq .1 no char
|
||||
|
||||
rts I/O error
|
||||
|
||||
.21 cmp #C.EOF
|
||||
beq .9
|
||||
.2 cmp #C.EOF ....or Ctrl-D
|
||||
beq .9 CS
|
||||
|
||||
jsr CL.CHARIN
|
||||
|
||||
@ -206,11 +227,12 @@ CS.RUN.INTERCATIVE
|
||||
bpl .1
|
||||
|
||||
lda (ZPCMDBuf)
|
||||
beq CS.RUN.LOOP Empty line
|
||||
beq .8 Empty line
|
||||
|
||||
jsr HIS.Add
|
||||
|
||||
jmp CS.RUN.Exec
|
||||
.8 jmp CS.RUN.LOOP
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.READ
|
||||
@ -320,13 +342,16 @@ CS.DOEVENT lda (pEvent)
|
||||
beq .9
|
||||
|
||||
* ldy #Sleep already set by CheckSleep
|
||||
|
||||
ldx #4
|
||||
|
||||
clc
|
||||
|
||||
.1 lda (pData),y
|
||||
sbc #0
|
||||
sta (pData),y
|
||||
iny
|
||||
cpy #Sleep+4
|
||||
dex
|
||||
bne .1
|
||||
|
||||
.9 sec
|
||||
|
@ -226,7 +226,11 @@ STDLIB.GetDec jsr STDLIB.32.Clear
|
||||
* sec
|
||||
rts
|
||||
|
||||
.8 clc
|
||||
.8 tya
|
||||
sec
|
||||
beq .9
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
STDLIB.32.T10 ldx #3
|
||||
|
Loading…
Reference in New Issue
Block a user