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