mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-25 18:29:36 +00:00
Kernel 0.94
This commit is contained in:
parent
d43a064a59
commit
16a7463e7d
Binary file not shown.
Binary file not shown.
|
@ -21,32 +21,28 @@ ZS.START
|
||||||
ZPIPCfgPtr .BS 2
|
ZPIPCfgPtr .BS 2
|
||||||
ZPHostPtr .BS 2
|
ZPHostPtr .BS 2
|
||||||
ZPPtr .BS 2
|
ZPPtr .BS 2
|
||||||
|
ArgIndex .BS 1
|
||||||
|
hSocket .BS 1
|
||||||
|
|
||||||
hReqBuf .BS 1
|
hReqBuf .BS 1
|
||||||
ZPReqBufPtr .BS 2
|
ZPReqBufPtr .BS 2
|
||||||
ZPReqBufLen .BS 2
|
ZPReqBufLen .BS 2
|
||||||
|
bResponse .BS 1
|
||||||
|
TimeOut .BS 1
|
||||||
|
bURI .BS 1
|
||||||
|
|
||||||
hEncodedBuf .BS 1
|
hEncodedBuf .BS 1
|
||||||
ZPEncodedBufPtr .BS 2
|
ZPEncodedBufPtr .BS 2
|
||||||
ZPEncodedBufLen .BS 2
|
ZPEncodedBufLen .BS 2
|
||||||
|
|
||||||
ZPRespBufPtr .BS 2
|
|
||||||
ZPRespBufLen .BS 2
|
|
||||||
|
|
||||||
ArgIndex .BS 1
|
|
||||||
hSocket .BS 1
|
|
||||||
|
|
||||||
hSendBuf .BS 1
|
hSendBuf .BS 1
|
||||||
ZPSendBufPtr .BS 2
|
ZPSendBufPtr .BS 2
|
||||||
|
|
||||||
|
hRespBuf .BS 1
|
||||||
|
ZPRespBufPtr .BS 2
|
||||||
|
ZPRespBufLen .BS 2
|
||||||
hFile .BS 1
|
hFile .BS 1
|
||||||
ZPFileName .BS 2
|
ZPFileName .BS 2
|
||||||
|
|
||||||
hRespBuf .BS 1
|
|
||||||
bResponse .BS 1
|
|
||||||
TimeOut .BS 1
|
|
||||||
bURI .BS 1
|
|
||||||
|
|
||||||
ZS.END .ED
|
ZS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
* File Header (16 Bytes)
|
* File Header (16 Bytes)
|
||||||
|
@ -109,9 +105,7 @@ CS.RUN.IPOK ldy #S.IPCFG.IP+3
|
||||||
dex
|
dex
|
||||||
bpl .1
|
bpl .1
|
||||||
|
|
||||||
inc ArgIndex
|
jsr CS.RUN.GETNEXTARG
|
||||||
lda ArgIndex
|
|
||||||
>SYSCALL ArgV
|
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>STYA ZPHostPtr
|
>STYA ZPHostPtr
|
||||||
|
@ -140,15 +134,14 @@ CS.RUN.ESYN lda #E.SYN
|
||||||
sec
|
sec
|
||||||
CS.RUN.RTS rts
|
CS.RUN.RTS rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.HOSTOK inc ArgIndex
|
CS.RUN.HOSTOK jsr CS.RUN.GETNEXTARG
|
||||||
lda ArgIndex
|
|
||||||
>SYSCALL ArgV
|
|
||||||
bcc .10
|
bcc .10
|
||||||
|
|
||||||
.8 jmp CS.RUN.ARGSOK
|
.8 jmp CS.RUN.ARGSOK
|
||||||
|
|
||||||
.10 >STYA ZPPtr
|
.10 >STYA ZPPtr
|
||||||
lda (ZPPtr)
|
lda (ZPPtr)
|
||||||
|
|
||||||
cmp #'-'
|
cmp #'-'
|
||||||
beq .1
|
beq .1
|
||||||
|
|
||||||
|
@ -158,9 +151,7 @@ CS.RUN.HOSTOK inc ArgIndex
|
||||||
|
|
||||||
>STYA SA.REMOTE+S.SOCKADDR.PORT
|
>STYA SA.REMOTE+S.SOCKADDR.PORT
|
||||||
|
|
||||||
inc ArgIndex
|
jsr CS.RUN.GETNEXTARG
|
||||||
lda ArgIndex
|
|
||||||
>SYSCALL ArgV
|
|
||||||
bcs .8
|
bcs .8
|
||||||
|
|
||||||
>STYA ZPPtr
|
>STYA ZPPtr
|
||||||
|
@ -183,9 +174,7 @@ CS.RUN.HOSTOK inc ArgIndex
|
||||||
bit bURI
|
bit bURI
|
||||||
bmi CS.RUN.ESYN
|
bmi CS.RUN.ESYN
|
||||||
|
|
||||||
inc ArgIndex
|
jsr CS.RUN.GETNEXTARG
|
||||||
lda ArgIndex
|
|
||||||
>SYSCALL ArgV
|
|
||||||
|
|
||||||
.9 bcs CS.RUN.ESYN
|
.9 bcs CS.RUN.ESYN
|
||||||
|
|
||||||
|
@ -202,9 +191,7 @@ CS.RUN.HOSTOK inc ArgIndex
|
||||||
bit bURI
|
bit bURI
|
||||||
bmi CS.RUN.ESYN
|
bmi CS.RUN.ESYN
|
||||||
|
|
||||||
inc ArgIndex
|
jsr CS.RUN.GETNEXTARG
|
||||||
lda ArgIndex
|
|
||||||
>SYSCALL ArgV
|
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
>PUSHYA
|
>PUSHYA
|
||||||
|
@ -224,7 +211,7 @@ CS.RUN.HOSTOK inc ArgIndex
|
||||||
jmp CS.RUN.HOSTOK
|
jmp CS.RUN.HOSTOK
|
||||||
|
|
||||||
.3 cmp #'O'
|
.3 cmp #'O'
|
||||||
bcs .9
|
bne .9
|
||||||
|
|
||||||
inc ArgIndex
|
inc ArgIndex
|
||||||
lda ArgIndex
|
lda ArgIndex
|
||||||
|
@ -234,6 +221,12 @@ CS.RUN.HOSTOK inc ArgIndex
|
||||||
>STYA ZPFileName
|
>STYA ZPFileName
|
||||||
jmp CS.RUN.HOSTOK
|
jmp CS.RUN.HOSTOK
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
CS.RUN.GETNEXTARG
|
||||||
|
inc ArgIndex
|
||||||
|
lda ArgIndex
|
||||||
|
>SYSCALL ArgV
|
||||||
|
rts
|
||||||
|
*--------------------------------------
|
||||||
CS.RUN.ARGSOK >PUSHW L.MSG.CONNECT
|
CS.RUN.ARGSOK >PUSHW L.MSG.CONNECT
|
||||||
ldx #0
|
ldx #0
|
||||||
|
|
||||||
|
@ -484,28 +477,10 @@ CS.RUN.RESPONSE jsr Init.TimeOut
|
||||||
|
|
||||||
bra .80
|
bra .80
|
||||||
|
|
||||||
.2 >SYSCALL GetMemPtr
|
.2 jsr CS.RUN.GETRESPONSE
|
||||||
>STYA ZPRespBufPtr
|
|
||||||
|
|
||||||
ldy #S.IP.TOTAL.LENGTH+1
|
lda #"!"
|
||||||
lda (ZPRespBufPtr),y
|
>SYSCALL putchar
|
||||||
sec
|
|
||||||
sbc #S.TCP-S.IP
|
|
||||||
sta ZPRespBufLen
|
|
||||||
|
|
||||||
dey
|
|
||||||
|
|
||||||
lda (ZPRespBufPtr),y
|
|
||||||
sbc /S.TCP-S.IP
|
|
||||||
sta ZPRespBufLen+1
|
|
||||||
|
|
||||||
lda ZPRespBufPtr
|
|
||||||
clc
|
|
||||||
adc #S.TCP
|
|
||||||
sta ZPRespBufPtr
|
|
||||||
bcc .3
|
|
||||||
|
|
||||||
inc ZPRespBufPtr+1
|
|
||||||
|
|
||||||
.3 bit bResponse
|
.3 bit bResponse
|
||||||
bmi .6
|
bmi .6
|
||||||
|
@ -551,6 +526,10 @@ CS.RUN.RESPONSE jsr Init.TimeOut
|
||||||
.7 >SYSCALL FWrite
|
.7 >SYSCALL FWrite
|
||||||
bcs .9
|
bcs .9
|
||||||
|
|
||||||
|
lda hRespBuf
|
||||||
|
stz hRespBuf
|
||||||
|
>SYSCALL FreeMem
|
||||||
|
|
||||||
jmp CS.RUN.RESPONSE
|
jmp CS.RUN.RESPONSE
|
||||||
|
|
||||||
.8 cmp #MLI.E.IO SKT Close ?
|
.8 cmp #MLI.E.IO SKT Close ?
|
||||||
|
@ -566,6 +545,33 @@ CS.RUN.RESPONSE jsr Init.TimeOut
|
||||||
sec
|
sec
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
CS.RUN.GETRESPONSE
|
||||||
|
sta hRespBuf
|
||||||
|
>SYSCALL GetMemPtr
|
||||||
|
>STYA ZPRespBufPtr
|
||||||
|
|
||||||
|
ldy #S.IP.TOTAL.LENGTH+1
|
||||||
|
lda (ZPRespBufPtr),y
|
||||||
|
sec
|
||||||
|
sbc #S.TCP-S.IP
|
||||||
|
sta ZPRespBufLen
|
||||||
|
|
||||||
|
dey
|
||||||
|
|
||||||
|
lda (ZPRespBufPtr),y
|
||||||
|
sbc /S.TCP-S.IP
|
||||||
|
sta ZPRespBufLen+1
|
||||||
|
|
||||||
|
lda ZPRespBufPtr
|
||||||
|
clc
|
||||||
|
adc #S.TCP
|
||||||
|
sta ZPRespBufPtr
|
||||||
|
bcc .8
|
||||||
|
|
||||||
|
inc ZPRespBufPtr+1
|
||||||
|
|
||||||
|
.8 rts
|
||||||
|
*--------------------------------------
|
||||||
CS.DOEVENT lda (pEvent)
|
CS.DOEVENT lda (pEvent)
|
||||||
bpl .9 is it a TIMER event?
|
bpl .9 is it a TIMER event?
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,7 @@ CheckDHCPAck jsr CheckDHCPXID
|
||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.DISCARD sta hFrame
|
CS.RUN.DISCARD lda hFrame
|
||||||
>SYSCALL FreeMem
|
>SYSCALL FreeMem
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user