Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-09-12 22:48:12 +02:00
parent acdba1900a
commit 1d0be01d26
3 changed files with 33 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -35,6 +35,7 @@ L.MSG.USAGE .DA MSG.USAGE
L.MSG.GREETINGS .DA MSG.GREETINGS L.MSG.GREETINGS .DA MSG.GREETINGS
L.TELNETOPTS .DA TELNETOPTS L.TELNETOPTS .DA TELNETOPTS
L.ENV.TERM .DA ENV.TERM L.ENV.TERM .DA ENV.TERM
L.MSG.DEBUG .DA MSG.DEBUG
.DA 0 End Of Reloc Table .DA 0 End Of Reloc Table
*-------------------------------------- *--------------------------------------
CS.INIT ldy #S.PS.ARGC CS.INIT ldy #S.PS.ARGC
@ -93,19 +94,21 @@ CS.RUN >PUSHWI TELNETOPTS.LEN
jsr Init.Timeout jsr Init.Timeout
CS.RUN.LOOP CS.RUN.LOOP
* >SLEEP >SLEEP
*.1 >SYSCALL GetChar .1 >SYSCALL GetChar
* bcs .2 bcs .2
cmp #IAC
beq CS.RUN.IACMODE
>SYSCALL PutChar
bcc .8
bra CS.RUN.8
* cmp #IAC .2 jsr Wait.Timeout
* beq CS.RUN.IACMODE bcc CS.RUN.LOOP
*.2 jsr Wait.Timeout
* bcc .1
lda #2 .8 lda #2
>SYSCALL GetArg >SYSCALL GetArg
>SYSCALL ExecPS >SYSCALL ExecPS
@ -114,16 +117,22 @@ CS.RUN.LOOP
CS.RUN.8 clc CS.RUN.8 clc
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.IACMODE >SLEEP Wait for IAC VERB (or SB) CS.RUN.IACMODE jsr PrintHEX
>SLEEP Wait for IAC VERB (or SB)
>SYSCALL GetChar >SYSCALL GetChar
bcs CS.RUN.IACMODE bcs CS.RUN.IACMODE
jsr PrintHEX
>STA.G IAC.VERB >STA.G IAC.VERB
.1 >SLEEP Wait for IAC OPT .1 >SLEEP Wait for IAC OPT
>SYSCALL GetChar >SYSCALL GetChar
bcs .1 bcs .1
jsr PrintHEX
>STA.G IAC.OPT >STA.G IAC.OPT
>LDA.G IAC.VERB >LDA.G IAC.VERB
@ -139,6 +148,7 @@ CS.RUN.IACSB
>SYSCALL GetChar >SYSCALL GetChar
bcs .1 bcs .1
jsr PrintHEX
>STA.G IAC.SB >STA.G IAC.SB
lda #0 lda #0
@ -148,6 +158,7 @@ CS.RUN.IACSB
>SYSCALL GetChar >SYSCALL GetChar
bcs .2 bcs .2
jsr PrintHEX
cmp #IAC cmp #IAC
beq .4 end of DATA, go wait SE beq .4 end of DATA, go wait SE
@ -170,6 +181,8 @@ CS.RUN.IACSB
>SYSCALL GetChar >SYSCALL GetChar
bcs .4 bcs .4
jsr PrintHEX
cmp #SE cmp #SE
bne .8 bne .8
@ -217,9 +230,18 @@ Wait.TimeOut sec
clc clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
PrintHEX pha
>PUSHA
>PUSHBI 1
>LDYA L.MSG.DEBUG
>SYSCALL printf
pla
rts
*--------------------------------------
CS.END CS.END
MSG.USAGE .AZ "Usage : GETTY <DEV> <PROGRAM>" MSG.USAGE .AZ "Usage : GETTY <DEV> <PROGRAM>"
MSG.GREETINGS .AZ "\r\nA2osX-GeTTY %d.%d\r\n" MSG.GREETINGS .AZ "\r\nA2osX-GeTTY %d.%d\r\n"
MSG.DEBUG .AZ "{%h}"
*-------------------------------------- *--------------------------------------
TELNETOPTS .DA #IAC,#WILL,#TELOPT.BINARY TELNETOPTS .DA #IAC,#WILL,#TELOPT.BINARY
.DA #IAC,#WILL,#TELOPT.ECHO .DA #IAC,#WILL,#TELOPT.ECHO