Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-09-09 10:11:42 +02:00
parent a57ee2791e
commit f3857cd815
10 changed files with 273 additions and 118 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -44,6 +44,8 @@ L.MSG.HOSTOK .DA MSG.HOSTOK
L.MSG.SKTKO .DA MSG.SKTKO L.MSG.SKTKO .DA MSG.SKTKO
L.MSG.SKTOK .DA MSG.SKTOK L.MSG.SKTOK .DA MSG.SKTOK
L.MSG.SKTERR .DA MSG.SKTERR L.MSG.SKTERR .DA MSG.SKTERR
L.MSG.IOERR .DA MSG.IOERR
L.MSG.USER .DA MSG.USER
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
CS.INIT >LDYA L.LIBTCPIP CS.INIT >LDYA L.LIBTCPIP
@ -175,14 +177,16 @@ CS.RUN.LOOP >SLEEP
tay tay
beq .2 no char beq .2 no char
rts jmp CS.RUN.SKTERR
.1 >PUSHYA len .1 >PUSHYA len
* lda #'@'
* >SYSCALL putchar
>PUSHW ZPBufPtr >PUSHW ZPBufPtr
ldy #S.PS.hStdOut ldy #S.PS.hStdOut
lda (pPs),y lda (pPs),y
>SYSCALL write >SYSCALL write
bcs CS.RUN.ERR bcs .11
.2 >PUSHWI BUFSIZE .2 >PUSHWI BUFSIZE
>PUSHW ZPBufPtr >PUSHW ZPBufPtr
@ -191,31 +195,50 @@ CS.RUN.LOOP >SLEEP
>SYSCALL read >SYSCALL read
bcc .3 bcc .3
tay tay
beq CS.RUN.LOOP beq CS.RUN.LOOP no char from STDIN
>PUSHA .11 jmp CS.RUN.IOERR
>PUSHBI 1
>LDYA L.MSG.SKTERR
>SYSCALL printf
rts
.3 >STYA ZPBufLen .3 >STYA ZPBufLen
lda (ZPBufPtr) lda (ZPBufPtr)
cmp #3 Ctrl-C cmp #3 Ctrl-C
beq .9 beq CS.RUN.USER
>PUSHB.G hSocket >PUSHB.G hSocket
>PUSHW ZPBufPtr >PUSHW ZPBufPtr
>PUSHW ZPBufLen >PUSHW ZPBufLen
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write
bcs CS.RUN.ERR bcs CS.RUN.SKTERR
jmp CS.RUN.LOOP jmp CS.RUN.LOOP
.9 lda #0 .9 lda #0
sec sec
CS.RUN.ERR rts rts
*--------------------------------------
CS.RUN.SKTERR pha
>PUSHA
>PUSHBI 1
>LDYA L.MSG.SKTERR
>SYSCALL printf
pla
sec
rts
*--------------------------------------
CS.RUN.IOERR pha
>PUSHA
>PUSHBI 1
>LDYA L.MSG.IOERR
>SYSCALL printf
pla
sec
rts
*--------------------------------------
CS.RUN.USER >LDYA L.MSG.USER
>SYSCALL puts
lda #3
sec
rts
*-------------------------------------- *--------------------------------------
CS.DOEVENT lda (pEvent) CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event? bpl .9 is it a TIMER event?
@ -268,6 +291,8 @@ MSG.HOSTOK .AZ "Connecting to %d.%d.%d.%d:%D (%s) ...\r\n"
MSG.SKTKO .AZ "Failed to Open Socket." MSG.SKTKO .AZ "Failed to Open Socket."
MSG.SKTOK .AZ "Connected." MSG.SKTOK .AZ "Connected."
MSG.SKTERR .AZ "Socket Error : $%h\r\n" MSG.SKTERR .AZ "Socket Error : $%h\r\n"
MSG.IOERR .AZ "I/O Error : $%h\r\n"
MSG.USER .AZ "User interrupt."
*-------------------------------------- *--------------------------------------
Socket .DA #S.SOCKET.SOCK.STREAM Socket .DA #S.SOCKET.SOCK.STREAM
.BS 1 .BS 1

View File

@ -62,14 +62,16 @@ FD.DEV .DA #S.FD.T.CDEV
*-------------------------------------- *--------------------------------------
CURSOR.BLINK.SPEED .EQ 2 CURSOR.BLINK.SPEED .EQ 2
ESCSEQ.MAXLEN .EQ 16 ESCSEQ.MAXLEN .EQ 16
OUTBUF.MAXLEN .EQ 32
IACBUF.MAXLEN .EQ 32
*-------------------------------------- *--------------------------------------
ZPBaseL1 .EQ ZPDRV ZPBaseL1 .EQ ZPDRV
ZPBaseL2 .EQ ZPDRV+2 ZPBaseL2 .EQ ZPDRV+2
ZPTmpWord .EQ ZPDRV+4 ZPTmpWord .EQ ZPDRV+4
ZPTmpBool .EQ ZPDRV+6 ZPTmpBool .EQ ZPDRV+6
ZPBufPtr .EQ ZPDRV+8 ZPIOCTL .EQ ZPDRV+8
ZPCount .EQ ZPDRV+10 ZPBufPtr .EQ ZPDRV+10
ZPIOCTL .EQ ZPDRV+12 ZPCount .EQ ZPDRV+12
*-------------------------------------- *--------------------------------------
DRV.CS.START cld DRV.CS.START cld
jmp (.1,x) jmp (.1,x)
@ -102,6 +104,12 @@ J.EscSequences .DA Esc.DispAttr m
.DA Esc.Scroll r .DA Esc.Scroll r
.DA Esc.Erase K .DA Esc.Erase K
.DA Esc.Home H .DA Esc.Home H
*--------------------------------------
J.COUT.IAC.CMDS .DA COUT.IAC.SB
.DA COUT.IAC.WILL
.DA COUT.IAC.WONT
.DA COUT.IAC.DO
.DA COUT.IAC.DONT
.DA 0 end of relocation .DA 0 end of relocation
*-------------------------------------- *--------------------------------------
STATUS >STYA ZPIOCTL STATUS >STYA ZPIOCTL
@ -178,12 +186,9 @@ CLOSE lda #S.DIB.S.OPENED
*-------------------------------------- *--------------------------------------
READ >STYA ZPIOCTL READ >STYA ZPIOCTL
jsr Char.Out.Get
bcc .8 IF cs,no char in output buffer...
lda A2osX.ASCREEN lda A2osX.ASCREEN
cmp #1 is CON active? cmp #1 is CON active?
bne .9 no....exit bne .6 no....go check flush...
lda A2osX.TIMER16 lda A2osX.TIMER16
and #CURSOR.BLINK.SPEED and #CURSOR.BLINK.SPEED
@ -192,10 +197,10 @@ READ >STYA ZPIOCTL
jsr CURBLNK jsr CURBLNK
.1 lda OPENAPPLE .1 lda OPENAPPLE
bmi .9 Open apple key, not for us... bmi .6 Open apple key, not for us...
lda KBD lda KBD
bpl .9 bpl .6
sta KBDSTROBE sta KBDSTROBE
and #$7F and #$7F
@ -205,37 +210,43 @@ READ >STYA ZPIOCTL
beq .3 beq .3
dex dex
bne .2 bne .2
bra .8 jsr Char.Out.Put no remap....send char....
bra .7 and flush
.3 lda KeyRemappedIdx,x .3 lda KeyRemappedIdx,x
tay tay
.4 lda KeyRemappedTbl,y .4 lda KeyRemappedTbl,y
beq .6 beq .7 end of remap....flush
jsr Char.Out.Put jsr Char.Out.Put
iny iny
bra .4 bra .4
.6 jsr Char.Out.Get .6 lda OutCnt
beq .9 no char in output buffer...
.8 pha .7 stz .8+1
jsr GetPtrsAndCnt
ldy #S.IOCTL.BUFPTR .70 inc ZPCount
lda (ZPIOCTL),y bne .71
inc ZPCount+1
beq .8
sta ZPBufPtr .71 jsr Char.Out.Get
bcs .8
ldy .8+1
sta (ZPBufPtr),y
iny iny
lda (ZPIOCTL),y sty .8+1
sta ZPBufPtr+1 bra .70
pla .8 lda #$ff SELF MODIFIED
sta (ZPBufPtr)
lda #1
ldy #S.IOCTL.BYTECNT ldy #S.IOCTL.BYTECNT
sta (ZPIOCTL),y sta (ZPIOCTL),y
iny iny
dec lda #0
sta (ZPIOCTL),y sta (ZPIOCTL),y
clc clc
@ -247,29 +258,12 @@ READ >STYA ZPIOCTL
*-------------------------------------- *--------------------------------------
WRITE >STYA ZPIOCTL WRITE >STYA ZPIOCTL
ldy #S.IOCTL.BUFPTR jsr GetPtrsAndCnt
lda (ZPIOCTL),y
sta ZPBufPtr
iny
lda (ZPIOCTL),y
sta ZPBufPtr+1
ldy #S.IOCTL.BYTECNT
lda (ZPIOCTL),y
eor #$ff
sta ZPCount
iny
lda (ZPIOCTL),y
eor #$ff
sta ZPCount+1
.2 inc ZPCount .2 inc ZPCount
bne .3 bne .3
inc ZPCount+1 inc ZPCount+1
bne .3 beq .8
clc
rts
.3 lda (ZPBufPtr) .3 lda (ZPBufPtr)
inc ZPBufPtr inc ZPBufPtr
@ -278,14 +272,17 @@ WRITE >STYA ZPIOCTL
.4 jsr WRITE.COUT .4 jsr WRITE.COUT
.5 bra .2 bra .2
.8 clc
rts
*-------------------------------------- *--------------------------------------
WRITE.COUT bit bEscMode WRITE.COUT bit bEscMode
bmi COUT.EscMode bmi COUT.EscMode
bit bIACMode bit bIACMode
bpl .10 bpl .10
jmp COUT.IACMode jmp COUT.IAC
.10 cmp #IAC .10 cmp #IAC
bne .1 bne .1
@ -460,27 +457,48 @@ COUT.ExecEscSeq stz EscSeqParamCnt
.5 jmp (J.EscSequences,x) .5 jmp (J.EscSequences,x)
*-------------------------------------- *--------------------------------------
COUT.IACMode inc IACBuf COUT.IAC inc IACBuf
ldx IACBuf ldx IACBuf
cpx #IACBUF.MAXLEN
beq *
sta IACBuf,x sta IACBuf,x
cpx #1 VERB ? cpx #1 CMD ?
beq .8 yes, wait for additional bytes beq .8 yes, wait for additional bytes
ldy IACBuf+1 get back VERB ldy IACBuf+1 get back CMD
cpy #SB cpy #SB
bne .2 not a SB/SE.... bne .1 not a SB/SE....stop with CMD/SUBCMD
cmp #SE cmp #SE
bne .8 wait for ending SE....keep bIACMode bne .8 wait for ending SE....keep bIACMode
lda IACBuf+2 Get OPT .1 cpy #IAC
cmp #TELOPT.TTYPE beq .9
bne .7
tya
sec
sbc #SB
bcc .9
asl
tax
lda IACBuf+2 Get SUBCMD in A
cpx #10
bcs *
jmp (J.COUT.IAC.CMDS,x)
.9 stz bIACMode
.8 clc
rts
*--------------------------------------
COUT.IAC.SB cmp #TELOPT.TTYPE
bne .9
lda IACBuf+3 lda IACBuf+3
cmp #SB.SEND cmp #SB.SEND
bne .7 bne .9
ldy #0 ldy #0
@ -489,26 +507,87 @@ COUT.IACMode inc IACBuf
iny iny
cpy #SB.IS.TTYPE.LEN cpy #SB.IS.TTYPE.LEN
bne .1 bne .1
bra .7
.2 cpy #DO .9 stz bIACMode
bne .6
cmp #TELOPT.TTYPE clc
bne .7 rts
*--------------------------------------
COUT.IAC.WILL ldx #WILLDO.CNT-1
.1 cmp WILLDO,x
beq .7
dex
bpl .1
ldx #WILLDONT.CNT-1
.2 cmp WILLDONT,x
beq .8
dex
bpl .2
bra .9
.7 ldx #DO
.HS 2C BIT ABS
.8 ldx #DONT
bra COUT.IAC.SendAX
.9 stz bIACMode
clc
rts
*--------------------------------------
COUT.IAC.WONT
.9 stz bIACMode
clc
rts
*--------------------------------------
COUT.IAC.DO ldx #DOWILL.CNT-1
.1 cmp DOWILL,x
beq .7
dex
bpl .1
ldx #DOWONT.CNT-1
.2 cmp DOWONT,x
beq .8
dex
bpl .2
bra COUT.IAC.SendAX.9
.7 ldx #WILL
.HS 2C BIT ABS
.8 ldx #WONT
*--------------------------------------
COUT.IAC.SendAX
pha push CMD
phx
lda #IAC lda #IAC
jsr Char.Out.Put jsr Char.Out.Put
lda #WILL pla
jsr Char.Out.Put jsr Char.Out.Put
lda #TELOPT.TTYPE pla
jsr Char.Out.Put jsr Char.Out.Put
bra .7
.6 COUT.IAC.SendAX.9
stz bIACMode
.7 stz bIACMode clc
rts
*--------------------------------------
COUT.IAC.DONT
.9 stz bIACMode
.8 clc clc
rts rts
*-------------------------------------- *--------------------------------------
RESET jsr CLRSCR RESET jsr CLRSCR
@ -937,7 +1016,7 @@ Char.Out.Put pha
lda OutPtr lda OutPtr
clc clc
adc OutCnt adc OutCnt
and #$0f and #OUTBUF.MAXLEN-1
tax tax
pla pla
sta OutBuffer,x sta OutBuffer,x
@ -953,12 +1032,31 @@ Char.Out.Get sec
pha pha
txa txa
inc inc
and #$0f and #OUTBUF.MAXLEN-1
sta OutPtr sta OutPtr
pla pla
clc clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
GetPtrsAndCnt ldy #S.IOCTL.BUFPTR
lda (ZPIOCTL),y
sta ZPBufPtr
iny
lda (ZPIOCTL),y
sta ZPBufPtr+1
* ldy #S.IOCTL.BYTECNT
iny
lda (ZPIOCTL),y
eor #$ff
sta ZPCount
iny
lda (ZPIOCTL),y
eor #$ff
sta ZPCount+1
rts
*--------------------------------------
DRV.CS.END DRV.CS.END
EscCodes >PSTR "MDc" EscCodes >PSTR "MDc"
EscSeqCmds >PSTR "mnrKH" EscSeqCmds >PSTR "mnrKH"
@ -970,17 +1068,6 @@ SB.IS.TTYPE.LEN .EQ *-SB.IS.TTYPE
BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0 BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07 BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
*-------------------------------------- *--------------------------------------
CH .BS 1
CV .BS 1
INVFLG .BS 1
SCROLLTOP .BS 1
SCROLLBOT .BS 1
CURON .BS 1
CURCHAR .BS 1
OutBuffer .BS 16
OutPtr .BS 1
OutCnt .BS 1
*--------------------------------------
KeyRemapped .HS 05080A0B0D15 L,D,U,CR,R KeyRemapped .HS 05080A0B0D15 L,D,U,CR,R
KeyRemappedIdx .HS 050004080C0F KeyRemappedIdx .HS 050004080C0F
KeyRemappedTbl .EQ * KeyRemappedTbl .EQ *
@ -992,10 +1079,30 @@ KeyRemappedRGHT .HS 1B5B4300 esc[C
TelnetOpt .DA #IAC,#DO,#TELOPT.ECHO TelnetOpt .DA #IAC,#DO,#TELOPT.ECHO
.DA #0 .DA #0
*-------------------------------------- *--------------------------------------
CtrlChars.Cnt .EQ 7 WILLDO .DA #TELOPT.BINARY,#TELOPT.SGA,#TELOPT.NAWS
WILLDO.CNT .EQ *-WILLDO
WILLDONT .DA #TELOPT.TSPEED,#TELOPT.LINEMODE
WILLDONT.CNT .EQ *-WILLDONT
DOWILL .DA #TELOPT.BINARY,#TELOPT.SGA,#TELOPT.NAWS
DOWILL.CNT .EQ *-DOWILL
DOWONT .DA #TELOPT.NEWENVIRON
DOWONT.CNT .EQ *-DOWONT
*--------------------------------------
CtrlChars .HS 05080A0C0D151B CtrlChars .HS 05080A0C0D151B
CtrlChars.Cnt .EQ *-CtrlChars
*--------------------------------------
CH .BS 1
CV .BS 1
INVFLG .BS 1
SCROLLTOP .BS 1
SCROLLBOT .BS 1
CURON .BS 1
CURCHAR .BS 1
OutBuffer .BS OUTBUF.MAXLEN
OutPtr .BS 1
OutCnt .BS 1
bIACMode .BS 1 bIACMode .BS 1
IACBuf .BS 33 IACBuf .BS OUTBUF.MAXLEN+1
bEscMode .BS 1 bEscMode .BS 1
bEscModeCSI .BS 1 bEscModeCSI .BS 1
bEscSeqInNum .BS 1 bEscSeqInNum .BS 1

View File

@ -8,6 +8,8 @@ TCP.PORT.TELNET .EQ 23
*-------------------------------------- *--------------------------------------
SE .EQ 240 $F0 SE .EQ 240 $F0
SB .EQ 250 $FA SB .EQ 250 $FA
SB.IS .EQ 0
SB.SEND .EQ 1
WILL .EQ 251 $FB WILL .EQ 251 $FB
WONT .EQ 252 $FC WONT .EQ 252 $FC
DO .EQ 253 $FD DO .EQ 253 $FD
@ -56,8 +58,5 @@ TELOPT.ENCRYPT .EQ 38 Encryption option
TELOPT.NEWENVIRON .EQ 39 New - Environment variables TELOPT.NEWENVIRON .EQ 39 New - Environment variables
TELOPT.EXOPL .EQ 255 extended-options-list TELOPT.EXOPL .EQ 255 extended-options-list
*-------------------------------------- *--------------------------------------
SB.IS .EQ 0
SB.SEND .EQ 1
*--------------------------------------
MAN MAN
SAVE /A2OSX.BUILD/INC/NET.TELNET.I SAVE /A2OSX.BUILD/INC/NET.TELNET.I

View File

@ -258,6 +258,20 @@ TCP.IN.JMP.ESTBLSH
ora #S.TCP.OPTIONS.ACK ACK the FIN.... ora #S.TCP.OPTIONS.ACK ACK the FIN....
sta (ZPPtrSKT),y sta (ZPPtrSKT),y
jsr SKT.GetTCB
ldx #3
ldy #S.TCP.ACKNUM+3
sec
.3 lda SKT.TCBCache+S.TCB.OUTACKNUM,x
adc #0
sta SKT.TCBCache+S.TCB.OUTACKNUM,x
dey
dex
bpl .3
jsr TCP.OUT.I SKT.GetTCB called, try to ACK the FIN jsr TCP.OUT.I SKT.GetTCB called, try to ACK the FIN
bcs .9 bcs .9
@ -275,8 +289,8 @@ TCP.IN.JMP.CLWAIT
TCP.IN.JMP.LASTACK TCP.IN.JMP.LASTACK
ldy #S.TCP.OPTIONS only accept ACK packet ldy #S.TCP.OPTIONS only accept ACK packet
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
cmp #S.TCP.OPTIONS.ACK bit #S.TCP.OPTIONS.ACK
bne .8 beq .8
jmp SKT.Destroy jmp SKT.Destroy
@ -318,8 +332,8 @@ TCP.IN.JMP.FINWT2.1
TCP.IN.JMP.CLOSING TCP.IN.JMP.CLOSING
ldy #S.TCP.OPTIONS only accept ACK packet ldy #S.TCP.OPTIONS only accept ACK packet
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
cmp #S.TCP.OPTIONS.ACK bit #S.TCP.OPTIONS.ACK
bne .1 beq .1
ldy #S.SOCKET.TCP.STATUS ldy #S.SOCKET.TCP.STATUS
lda #S.SOCKET.TCP.STATUS.TIMEWT lda #S.SOCKET.TCP.STATUS.TIMEWT
@ -331,8 +345,7 @@ TCP.IN.JMP.CLOSING
TCP.IN.JMP.TIMEWT TCP.IN.JMP.TIMEWT
*-------------------------------------- *--------------------------------------
TCP.IN.JMP.CLOSED TCP.IN.JMP.CLOSED
clc jmp SKT.Destroy
rts
*-------------------------------------- *--------------------------------------
TCP.IN.SetDataInPtrAndLen TCP.IN.SetDataInPtrAndLen
ldy #S.IP.TOTAL.LENGTH+1 ldy #S.IP.TOTAL.LENGTH+1

View File

@ -60,13 +60,12 @@ CL.CHARIN tax
.9 clc .9 clc
rts rts
*-------------------------------------- *--------------------------------------
CL.CHARIN.CTRL cpx #13 CR CL.CHARIN.CTRL cpx #C.CR
bne .10 bne .10
txa >PUSHBI 0
>SYSCALL PutChar >LDYA L.MSG.ECHOCRLF
lda #10 >SYSCALL printf
>SYSCALL PutChar
>LDA.G CmdBufPtr >LDA.G CmdBufPtr
tay tay
@ -80,7 +79,7 @@ CL.CHARIN.CTRL cpx #13 CR
clc clc
rts rts
.10 cpx #$1B esc .10 cpx #C.ESC
bne .11 bne .11
lda #$ff lda #$ff
@ -165,7 +164,7 @@ CL.BS >LDA.G CmdBufPtr
dec dec
sta (pData),y sta (pData),y
lda #8 lda #C.BS
>SYSCALL PutChar >SYSCALL PutChar
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
@ -176,7 +175,7 @@ CL.NAK >LDA.G CmdBufPtr
inc inc
>STA.G CmdBufPtr >STA.G CmdBufPtr
lda #21 lda #C.FS
>SYSCALL PutChar >SYSCALL PutChar
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
@ -196,7 +195,7 @@ CL.DEL >LDA.G CmdBuflen
>LDA.G CmdBufPtr >LDA.G CmdBufPtr
beq CL.PrintEOL.8 beq CL.PrintEOL.8
lda #8 lda #C.BS
>SYSCALL PutChar >SYSCALL PutChar
>DEC.G CmdBufPtr >DEC.G CmdBufPtr
@ -242,13 +241,13 @@ CL.PrintEOL >LDA.G CmdBufPtr
pha pha
lda #8 lda #C.BS
>SYSCALL PutChar >SYSCALL PutChar
pla pla
inc inc
bra .3 bra .3
.4 lda #8 .4 lda #C.BS
>SYSCALL PutChar >SYSCALL PutChar
CL.PrintEOL.8 clc CL.PrintEOL.8 clc

View File

@ -46,6 +46,7 @@ CS.START cld
L.MSG.GREETINGS .DA MSG.GREETINGS L.MSG.GREETINGS .DA MSG.GREETINGS
L.MSG.PROMPT .DA MSG.PROMPT L.MSG.PROMPT .DA MSG.PROMPT
L.MSG.ECHO .DA MSG.ECHO L.MSG.ECHO .DA MSG.ECHO
L.MSG.ECHOCRLF .DA MSG.ECHOCRLF
L.MSG.ERROR .DA MSG.ERROR L.MSG.ERROR .DA MSG.ERROR
L.MSG.PRINTENV .DA MSG.PRINTENV L.MSG.PRINTENV .DA MSG.PRINTENV
L.MSG.CSHERR .DA MSG.CSHERR L.MSG.CSHERR .DA MSG.CSHERR
@ -358,7 +359,8 @@ INTCMDS .AZ "CD"
*-------------------------------------- *--------------------------------------
MSG.GREETINGS .AZ "\r\nA2osX-Shell %d.%d\r\n\r\n" MSG.GREETINGS .AZ "\r\nA2osX-Shell %d.%d\r\n\r\n"
MSG.PROMPT .AZ "$ " MSG.PROMPT .AZ "$ "
MSG.ECHO .AZ ">%s\r\n" MSG.ECHO .AS ">%s"
MSG.ECHOCRLF .AZ "\r\n"
MSG.ERROR .AZ "[$%h]:%S.\r\n" MSG.ERROR .AZ "[$%h]:%S.\r\n"
MSG.PRINTENV .AZ "%s=%s\r\n" MSG.PRINTENV .AZ "%s=%s\r\n"
MSG.CSHERR .AZ "^\r\nLine #%D:" MSG.CSHERR .AZ "^\r\nLine #%D:"

View File

@ -429,8 +429,18 @@ BIN.RelDrv ldy #H.BIN.DRV.REL.TABLE
.1 lda (ZPPtr1),y Start Relocate JMP table .1 lda (ZPPtr1),y Start Relocate JMP table
tax LO in X tax LO in X
iny iny
ora (ZPPtr1),y ORA with HI lda (ZPPtr1),y HI in A
beq .2 $0000 = end of table beq .2 $00xx = end of table
cpx BIN.R.CS.Start
sbc BIN.R.CS.Start+1
bcc .11 addr < BIN.R.CS.Start, out of range
txa Get back LO
cpx BIN.R.End
lda (ZPPtr1),y Get HI
sbc BIN.R.End+1
bcs .11 addr > BIN.R.End, out of range
dey dey
txa get back LO txa get back LO
@ -443,7 +453,7 @@ BIN.RelDrv ldy #H.BIN.DRV.REL.TABLE
adc BIN.R.Offset+1 adc BIN.R.Offset+1
sta (ZPPtr1),y sta (ZPPtr1),y
iny .11 iny
bra .1 bra .1
*-------------------------------------- *--------------------------------------