mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
Kernel version 0.9 : LAN drivers, bugfix and optimization
This commit is contained in:
parent
f2a899c776
commit
d6aefbe613
@ -4,24 +4,23 @@ NEW
|
||||
INC 1
|
||||
AUTO 6
|
||||
ECHO *** A2osX Startup Script ***
|
||||
echo Working Directory:$CD
|
||||
SET PS1='$PWD'
|
||||
# Main Screen
|
||||
INSDRV CONSOLE.DRV
|
||||
STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
# Serial Login
|
||||
#INSDRV SSC.DRV 9600,N,8,1,X
|
||||
INSDRV SSC.I.DRV 9600,N,8,1,X
|
||||
STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
STARTPROC GETTY COM2 ${A2OSX}SBIN/LOGIN
|
||||
#INSDRV PIC.DRV
|
||||
# Network Section
|
||||
INSDRV UTHERNET.DRV 000E3A123456
|
||||
INSDRV UTHERNET2.DRV 0008DC123456
|
||||
#INSDRV LANCEGS.DRV
|
||||
#INSDRV UTHER2.AI.DRV 0008DC123456
|
||||
INSDRV LANCEGS.DRV
|
||||
STARTPROC TCPIP
|
||||
STARTPROC DHCPCLNT
|
||||
STARTPROC TELNETD
|
||||
#INSDRV UTHERNET2.DRV 0008DC123456
|
||||
#STARTPROC TCPIP
|
||||
#STARTPROC DHCPCLNT
|
||||
#STARTPROC TELNETD
|
||||
#STARTPROC HTTPD
|
||||
#NFSMOUNT 192.168.1.5:/A2OSX /MNT/A2OSX
|
||||
#CIFSMOUNT 192.168.1.5:/MSSHARE /MNT/MSSHARE
|
||||
|
@ -16,6 +16,8 @@ AUTO 6
|
||||
.INB /A2OSX.BUILD/INC/LIBTCPIP.I
|
||||
*--------------------------------------
|
||||
ZPTmpPTR .EQ ZPDRV
|
||||
Size .EQ ZPDRV+2
|
||||
Counter .EQ ZPDRV+4
|
||||
*--------------------------------------
|
||||
* File Header (16 Bytes)
|
||||
*--------------------------------------
|
||||
@ -42,15 +44,9 @@ Dev.Detect >STYA Args
|
||||
>SYSCALL CPrintFYA
|
||||
|
||||
ldx #$70
|
||||
ldy #7
|
||||
|
||||
.1 txa IO based detection, avoid scanning in Disk Controller IO!!!!
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
|
||||
lda A2osX.SLOTS,y
|
||||
.1 lda A2osX.SLOTS,y IO based detection, avoid scanning in Disk Controller IO!!!!
|
||||
bne .2
|
||||
|
||||
lda L91C96.BSR+1,x
|
||||
@ -62,6 +58,7 @@ Dev.Detect >STYA Args
|
||||
sec
|
||||
sbc #$10
|
||||
tax
|
||||
dey
|
||||
bne .1
|
||||
|
||||
>LDYA L.MSG.DETECT.KO
|
||||
@ -72,12 +69,6 @@ Dev.Detect >STYA Args
|
||||
rts
|
||||
|
||||
.3 stx DEVSLOTx0
|
||||
txa
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda #A2osX.SLOTS.NET
|
||||
sta A2osX.SLOTS,y
|
||||
|
||||
@ -188,12 +179,18 @@ READBLOCK.RxOK lda #L91C96.2.PTR.RCVD+L91C96.2.PTR.AUTOI+L91C96.2.PTR.READ
|
||||
asl if odd, CS
|
||||
|
||||
lda L91C96.2.DATA,x get lo byte count
|
||||
sbc #5 compute FRAMELEN
|
||||
sta FRAMELEN
|
||||
sbc #5 compute Size
|
||||
sta Size
|
||||
eor #$ff
|
||||
sta Counter
|
||||
tay
|
||||
|
||||
lda L91C96.2.DATA,x get hi byte count
|
||||
sbc #0
|
||||
sta FRAMELEN+1
|
||||
sta Size+1
|
||||
eor #$ff
|
||||
sta Counter+1
|
||||
eor #$ff
|
||||
|
||||
iny
|
||||
bne .1
|
||||
@ -212,26 +209,33 @@ READBLOCK.RxOK lda #L91C96.2.PTR.RCVD+L91C96.2.PTR.AUTOI+L91C96.2.PTR.READ
|
||||
sty .8+3
|
||||
sta .8+5
|
||||
|
||||
lda FRAMELEN
|
||||
lda Size
|
||||
sta (ZPTmpPTR)
|
||||
ldy #1
|
||||
lda FRAMELEN+1
|
||||
lda Size+1
|
||||
sta (ZPTmpPTR),y
|
||||
|
||||
iny
|
||||
|
||||
ldx DEVSLOTx0
|
||||
|
||||
.2 jsr DecFrameLen
|
||||
.2 inc Counter
|
||||
bne .21
|
||||
inc Counter+1
|
||||
beq .4
|
||||
lda L91C96.2.DATA,x
|
||||
|
||||
.21 lda L91C96.2.DATA,x
|
||||
sta (ZPTmpPTR),y
|
||||
iny
|
||||
bne .3
|
||||
inc ZPTmpPTR+1
|
||||
.3 jsr DecFrameLen
|
||||
|
||||
.3 inc Counter
|
||||
bne .31
|
||||
inc Counter+1
|
||||
beq .4
|
||||
lda L91C96.2.DATA,x
|
||||
|
||||
.31 lda L91C96.2.DATA,x
|
||||
sta (ZPTmpPTR),y
|
||||
iny
|
||||
bne .2
|
||||
@ -254,7 +258,11 @@ WRITEBLOCK >STYA ZPTmpPTR
|
||||
sta L91C96.BSR,x
|
||||
|
||||
lda (ZPTmpPTR)
|
||||
sta FRAMELEN
|
||||
sta Size
|
||||
eor #$ff
|
||||
sta Counter
|
||||
eor #$ff
|
||||
|
||||
clc
|
||||
adc #6 3 WORDs more Status, len & Control
|
||||
|
||||
@ -263,7 +271,11 @@ WRITEBLOCK >STYA ZPTmpPTR
|
||||
|
||||
.10 ldy #1
|
||||
lda (ZPTmpPTR),y
|
||||
sta FRAMELEN+1
|
||||
sta Size+1
|
||||
eor #$ff
|
||||
sta Counter+1
|
||||
eor #$ff
|
||||
|
||||
adc #0
|
||||
|
||||
.1 ora #L91C96.2.MMUCR.ALLOC
|
||||
@ -301,31 +313,35 @@ WRITEBLOCK >STYA ZPTmpPTR
|
||||
stz L91C96.2.DATA,x write fake status word
|
||||
stz L91C96.2.DATA,x
|
||||
|
||||
lda FRAMELEN
|
||||
lda Size
|
||||
pha
|
||||
eor #$01
|
||||
lsr
|
||||
pla
|
||||
adc #$05 add 5 if odd, 6 if even
|
||||
sta L91C96.2.DATA,x
|
||||
lda FRAMELEN+1
|
||||
lda Size+1
|
||||
adc #$00
|
||||
sta L91C96.2.DATA,x
|
||||
|
||||
ldy #2
|
||||
|
||||
.5 jsr DecFrameLen
|
||||
.5 inc Counter
|
||||
bne .51
|
||||
inc Counter+1
|
||||
beq .70
|
||||
lda (ZPTmpPTR),y
|
||||
|
||||
.51 lda (ZPTmpPTR),y
|
||||
iny
|
||||
bne .6
|
||||
inc ZPTmpPTR+1
|
||||
|
||||
.6 pha
|
||||
jsr DecFrameLen
|
||||
.6 inc Counter
|
||||
bne .61
|
||||
inc Counter+1
|
||||
beq .71
|
||||
pla
|
||||
sta L91C96.2.DATA,x
|
||||
|
||||
.61 sta L91C96.2.DATA,x
|
||||
lda (ZPTmpPTR),y
|
||||
sta L91C96.2.DATA,x
|
||||
iny
|
||||
@ -338,8 +354,7 @@ WRITEBLOCK >STYA ZPTmpPTR
|
||||
sta L91C96.2.DATA,x
|
||||
bra .8
|
||||
|
||||
.71 pla
|
||||
sta L91C96.2.DATA,x
|
||||
.71 sta L91C96.2.DATA,x
|
||||
lda #%00100000 signal an extra (odd) byte
|
||||
sta L91C96.2.DATA,x
|
||||
|
||||
@ -421,19 +436,9 @@ CLOSE ldx DEVSLOTx0
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DecFrameLen lda FRAMELEN
|
||||
bne .1
|
||||
lda FRAMELEN+1
|
||||
beq .8
|
||||
dec FRAMELEN+1
|
||||
.1 dec FRAMELEN
|
||||
lda #1 Make something NZ
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
DRV.CS.END
|
||||
DEVSLOTx0 .BS 1
|
||||
USERMAC .BS 1
|
||||
FRAMELEN .BS 2
|
||||
*--------------------------------------
|
||||
DEVSTAT .DA #0
|
||||
.BS 3 size
|
||||
|
@ -182,14 +182,15 @@ READBLOCK.RTS rts
|
||||
|
||||
READBLOCK.RxOK >AR.SELECT S0.RX.RD
|
||||
lda W5100.DR,x get the received ptr HI
|
||||
sta offset+1
|
||||
ldy W5100.DR,x get the received ptr LO
|
||||
sty offset
|
||||
|
||||
and /RXTX.MASK
|
||||
ora /RX.BASE
|
||||
sta W5100.AR,x
|
||||
sta offset+1
|
||||
tya
|
||||
sta W5100.AR+1,x
|
||||
sta offset
|
||||
|
||||
ldy #0
|
||||
|
||||
@ -278,9 +279,6 @@ READBLOCK.RxOK >AR.SELECT S0.RX.RD
|
||||
lda Offset+1
|
||||
adc RXTX.Size+1
|
||||
|
||||
and /RXTX.MASK
|
||||
ora /RX.BASE
|
||||
|
||||
sta W5100.DR,x write HI
|
||||
pla
|
||||
sta W5100.DR,x write LO
|
||||
|
@ -44,15 +44,9 @@ Dev.Detect >STYA ARGS
|
||||
>SYSCALL CPrintFYA
|
||||
|
||||
ldx #$70
|
||||
ldy #7
|
||||
|
||||
.1 txa IO based detection, avoid scanning in Disk Controller IO!!!!
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
|
||||
lda A2osX.SLOTS,y
|
||||
.1 lda A2osX.SLOTS,y IO based detection, avoid scanning in Disk Controller IO!!!!
|
||||
bne .2
|
||||
|
||||
lda /PP.ID
|
||||
@ -73,6 +67,7 @@ Dev.Detect >STYA ARGS
|
||||
sec
|
||||
sbc #$10
|
||||
tax
|
||||
dey
|
||||
bne .1
|
||||
|
||||
>LDYA L.MSG.DETECT.KO
|
||||
@ -83,12 +78,6 @@ Dev.Detect >STYA ARGS
|
||||
rts
|
||||
|
||||
.3 stx DEVSLOTx0
|
||||
txa
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda #A2osX.SLOTS.NET
|
||||
sta A2osX.SLOTS,y
|
||||
|
||||
|
@ -181,14 +181,15 @@ READBLOCK ldx DEVSLOTx0
|
||||
|
||||
READBLOCK.RxOK >AR.SELECT S0.RX.RD
|
||||
lda W5100.DR,x get the received ptr HI
|
||||
sta offset+1
|
||||
ldy W5100.DR,x get the received ptr LO
|
||||
sty offset
|
||||
|
||||
and /RXTX.MASK
|
||||
ora /RX.BASE
|
||||
sta W5100.AR,x
|
||||
sta offset+1
|
||||
tya
|
||||
sta W5100.AR+1,x
|
||||
sta offset
|
||||
|
||||
lda W5100.DR,x get RX.Size HI
|
||||
sta RXTX.Size+1
|
||||
@ -247,9 +248,6 @@ READBLOCK.RxOK >AR.SELECT S0.RX.RD
|
||||
lda Offset+1
|
||||
adc RXTX.Size+1
|
||||
|
||||
and /RXTX.MASK
|
||||
ora /RX.BASE
|
||||
|
||||
sta W5100.DR,x write HI
|
||||
pla
|
||||
sta W5100.DR,x write LO
|
||||
|
@ -57,7 +57,7 @@ CS.INIT >SYSCALL GetArgC
|
||||
lda #1 get PTR to ARG[1] (Driver name)
|
||||
>SYSCALL GetArgA
|
||||
|
||||
>SYSCALL LoadDrvYA YA = PTR to ARG[1...n]
|
||||
>SYSCALL LoadDrvYA YA = PTR to ARG[1...n]
|
||||
bcs .99
|
||||
|
||||
lda #0 success, but....
|
||||
|
@ -52,7 +52,7 @@ K.GetMem >PULLB MemMgr.ReqFlags store requested flags
|
||||
bcc .10
|
||||
inx
|
||||
|
||||
.10 >STAX MemMgr.ReqSize
|
||||
.10 >STAX MemMgr.ReqSize
|
||||
|
||||
>LDYAI MemMgr.Table
|
||||
>STYA ZPMemMgrSPtr
|
||||
|
Loading…
Reference in New Issue
Block a user