Kernel 0.9.1 : Code reorganization & move to CSTR : GETTY,LOGIN

This commit is contained in:
Rémy GIBERT 2017-09-15 08:37:15 +02:00
parent 4eb13cc475
commit 3ceb61c354
9 changed files with 37 additions and 90 deletions

Binary file not shown.

Binary file not shown.

View File

@ -254,7 +254,7 @@ SYS.CreateProcessNewEnvYA .EQ $A4
SYS.CreateProcessYA .EQ $A6
* .EQ $A8
* .EQ $AA
SYS.Sleep .EQ $AC
* .EQ $AC
* .EQ $AE
SYS.GetArgC .EQ $B0
@ -286,6 +286,8 @@ SYS.LoadStkObj.YA .EQ $D8
SYS.GetStkObj.A .EQ $DA
SYS.FreeStkObj.A .EQ $DC
* .EQ $DE
SYS.Sleep .EQ $E0
*--------------------------------------
* ProDOS ERROR CODES : $00->$5F
* Lib ERROR CODES : $80->$BF

View File

@ -45,7 +45,6 @@ CS.INIT ldy #S.PS.ARGC
cmp #2
bne .9
>DEBUG
lda #1
>SYSCALL GetArg.A
@ -85,7 +84,7 @@ CS.INIT ldy #S.PS.ARGC
.9 rts
*--------------------------------------
CS.RUN jsr Init.Timeout
.66 >SYSCALL Sleep
>SYSCALL GetChar
bcc .1
@ -114,8 +113,6 @@ CS.RUN jsr Init.Timeout
ldy #IAC.VERB
sta (pData),y
* jsr PRINT.DEBUG
.12 >SYSCALL Sleep
>SYSCALL GetChar
bcs .12
@ -123,8 +120,6 @@ CS.RUN jsr Init.Timeout
ldy #IAC.OPT
sta (pData),y
* jsr PRINT.DEBUG
ldy #IAC.VERB
lda (pData),y
cmp #SB
@ -231,56 +226,6 @@ CS.QUIT ldy #hBinName
clc
rts
*--------------------------------------
PRINT.DEBUG phx
phy
pha
lda #2
>SYSCALL GetDevByID.A
bcs .9
>STYA ZPTmp1
lda (ZPTmp1)
sta PRINT.DEBUG.JMP+1
ldy #1
lda (ZPTmp1),y
sta PRINT.DEBUG.JMP+2
lda #'{'
ldx #DEVMGR.WRITE
jsr PRINT.DEBUG.JMP
pla
pha
lsr
lsr
lsr
lsr
tax
lda PRINT.DEBUG.CHAR,x
ldx #DEVMGR.WRITE
jsr PRINT.DEBUG.JMP
pla
pha
and #$0F
tax
lda PRINT.DEBUG.CHAR,x
ldx #DEVMGR.WRITE
jsr PRINT.DEBUG.JMP
lda #'}'
ldx #DEVMGR.WRITE
jsr PRINT.DEBUG.JMP
.9 pla
ply
plx
rts
PRINT.DEBUG.JMP jmp $ffff
*--------------------------------------
Init.Timeout ldy #TimeOut
lda #TIMEOUT.MAX
sta (pData),y

View File

@ -38,8 +38,7 @@ L.MSG.PASSWORD .DA MSG.PASSWORD
L.SHELL .DA SHELL
.DA 0
*--------------------------------------
CS.INIT >DEBUG
lda (pPs)
CS.INIT lda (pPs)
ora #S.PS.F.EVENT Now accept events
sta (pPs)
clc Tell TskMgr To stay in memory
@ -191,7 +190,7 @@ INPUT.LINEIN ldy #INPUT.Status
CS.END
MSG.LOGIN >CSTR "\r\nlogin:"
MSG.PASSWORD >CSTR "\r\npassword:"
SHELL >PSTR "${A2OSX}SBIN/SHELL"
SHELL >CSTR "${A2OSX}SBIN/SHELL"
*--------------------------------------
.DUMMY
.OR 0

View File

@ -150,8 +150,9 @@ CS.RUN >LDA.G bReadMode READ Command ?
lda #0 reset it
sta (ZPCMDBuf)
>STA.G bCmdBufexec
>STA.G bSecureRead Clear password mode
.12 jsr PrintPrompt
bcs CS.RUN.EXIT.RTS
@ -318,11 +319,7 @@ CS.CHARIN tax Save Char
rts
* interactive mode
.10 >LDA.G hCmdBuf
>SYSCALL GetMemPtr.A
>STYA ZPCMDBuf
>LDA.G bEscMode
.10 >LDA.G bEscMode
beq .13
cpx #'['

View File

@ -481,6 +481,29 @@ CORE.DestroyEvent
sta (pEvent)
dec EvtMgr.Count
.9 rts
*/--------------------------------------
* # Sleep
* Make current process suspend until next RUN
* ## In :
* (none)
* ## Out :
* (none)
*\--------------------------------------
K.Sleep pla get PC LO
sec
sbc pCode
ldy #S.PS.PC
sta (pPs),y
pla get PC HI
sbc pCode+1
iny
sta (pPs),y
lda (pPs)
ora #S.PS.F.SLEEP
sta (pPs)
clc No error,
rts back to Kernel
*--------------------------------------
TskMgr.Idx .BS 1
TSKMGR.EVENTCNT .BS 1

View File

@ -106,7 +106,7 @@ K.SYSCALL.JMP .DA 0 $00
.DA K.CreateProcess.YA
.DA 0
.DA 0
.DA K.Sleep
.DA 0
.DA 0
.DA K.GetArgC $B0
@ -137,6 +137,8 @@ K.SYSCALL.JMP .DA 0 $00
.DA K.GetStkObj.A
.DA K.FreeStkObj.A
.DA 0
*--------------------------------------
.DA K.Sleep $E0
*--------------------------------------
* LO Byte :
* #RRAMWRAMBNK1,#RRAMWRAMBNK2
@ -382,6 +384,8 @@ K.SYSCALL.BANK .DA #RRAMWRAMBNK1 $00
.DA 0
.DA 0
.DA 0
*--------------------------------------
.DA 0 $E0
*--------------------------------------
PullPtr1Ptr2Ptr3
sec

View File

@ -4,29 +4,6 @@ LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* # Sleep
* Make current process suspend until next RUN
* ## In :
* (none)
* ## Out :
* (none)
*\--------------------------------------
K.Sleep pla get PC LO
sec
sbc pCode
ldy #S.PS.PC
sta (pPs),y
pla get PC HI
sbc pCode+1
iny
sta (pPs),y
lda (pPs)
ora #S.PS.F.SLEEP
sta (pPs)
clc No error,
rts back to Kernel
*/--------------------------------------
* # ExecProcessNewEnv.YA
* # ExecProcess.YA (Blocking Parent PID)
* # CreateProcessNewEnv.YA