mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-12 01:30:36 +00:00
SH: Bug Fix for PAUSE, EXIT ....
This commit is contained in:
parent
87b9078877
commit
84a784807d
Binary file not shown.
@ -523,6 +523,7 @@ CMD.SLEEP.RTS rts
|
||||
*--------------------------------------
|
||||
CMD.PAUSE lda #bState.Pause
|
||||
tsb bState
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -820,7 +821,8 @@ CMD.EXIT.FILE jsr STK.PullFree Code buffer
|
||||
ldy #S.PS.RC
|
||||
lda (pPS),y
|
||||
|
||||
clc
|
||||
cmp #1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CMD.BREAK jsr STK.GetCtx Get context in CORE.TestResult
|
||||
|
@ -311,10 +311,11 @@ CORE.Run.6 lda bState
|
||||
tsb CORE.PSFlags
|
||||
|
||||
.3 jsr CORE.ExecCmd
|
||||
|
||||
bcs CORE.Run.Exit
|
||||
|
||||
lda bState
|
||||
bit #bState.PipeIn+bState.PipeOut
|
||||
beq .8
|
||||
|
||||
.5 bit #bState.PipeIn
|
||||
beq .6
|
||||
@ -347,6 +348,9 @@ CORE.Run.6 lda bState
|
||||
trb bState
|
||||
|
||||
.7 jmp CORE.Run.1 Loop with Pipe IN
|
||||
|
||||
.8 lda #0
|
||||
clc
|
||||
*--------------------------------------
|
||||
CORE.Run.Exit php
|
||||
pha
|
||||
|
@ -163,6 +163,7 @@ IO.PrintBatchErrMsg
|
||||
|
||||
ldy #S.PS.RC
|
||||
lda (pPS),y
|
||||
|
||||
cmp #E.SYN
|
||||
beq .10
|
||||
|
||||
|
34
BIN/SH.S.txt
34
BIN/SH.S.txt
@ -89,7 +89,7 @@ bState.ExitOnEOF .EQ %10000000
|
||||
bState.Pause .EQ %01000000
|
||||
bState.PipeIn .EQ %00100000
|
||||
bState.PipeOut .EQ %00010000
|
||||
bState.PipeOutInt .EQ %00001000
|
||||
|
||||
bState.SET.C .EQ %00000100
|
||||
bState.SET.E .EQ %00000010
|
||||
bState.SET.X .EQ %00000001
|
||||
@ -283,7 +283,7 @@ CS.RUN jsr CL.Init
|
||||
CS.RUN.LOOP >SLEEP
|
||||
|
||||
.1 jsr CheckSleep
|
||||
beq .2
|
||||
beq .3
|
||||
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
@ -297,33 +297,24 @@ CS.RUN.LOOP >SLEEP
|
||||
bcs .9 I/O err
|
||||
|
||||
cmp #3 Ctrl-C
|
||||
bne .11
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
lda (pData) batch mode ?
|
||||
beq CS.RUN.LOOP
|
||||
|
||||
lda bState
|
||||
and #bState.SET.C
|
||||
beq .8
|
||||
|
||||
bra CS.RUN.LOOP
|
||||
|
||||
.11 cmp #19 test Ctrl-s
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
lda #bState.Pause
|
||||
tsb bState
|
||||
bra CS.RUN.LOOP
|
||||
*--------------------------------------
|
||||
.8 lda #3 User Interrupt
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
.2 lda bState
|
||||
.3 lda bState
|
||||
and #bState.Pause
|
||||
beq .6
|
||||
|
||||
.3 >SYSCALL GetChar
|
||||
>SYSCALL GetChar
|
||||
bcs .9 I/O err
|
||||
|
||||
cmp #3 Ctrl-C
|
||||
@ -338,13 +329,16 @@ CS.RUN.LOOP >SLEEP
|
||||
|
||||
bra .5
|
||||
|
||||
.4 tax
|
||||
lda bState
|
||||
and #bState.Pause
|
||||
beq .5 not from PAUSE command
|
||||
.4 cmp #19 test Ctrl-S
|
||||
bne .40
|
||||
|
||||
cpx #C.CR
|
||||
lda #bState.Pause
|
||||
tsb bState
|
||||
bra CS.RUN.LOOP
|
||||
|
||||
.40 cmp #C.CR
|
||||
bne .5
|
||||
|
||||
jsr CheckLFAfterCR Check for any extra LF
|
||||
bcs .9
|
||||
|
||||
@ -440,6 +434,7 @@ CS.RUN.LOOP.END ldy #S.PS.RC
|
||||
bne CS.RUN.LOOP.80
|
||||
|
||||
.1 jsr STK.Get
|
||||
bcs .8
|
||||
cmp #$C0+C.CLEXEC
|
||||
beq .8
|
||||
|
||||
@ -484,6 +479,7 @@ CS.DOEVENT lda (pEvent)
|
||||
* ldy #Sleep already set by CheckSleep
|
||||
ldx #4
|
||||
clc
|
||||
|
||||
.1 lda (pData),y
|
||||
sbc #0
|
||||
sta (pData),y
|
||||
|
Loading…
x
Reference in New Issue
Block a user