Kernel version 0.9 : Bug Fix in SSC.I.DRV

This commit is contained in:
Rémy GIBERT 2017-02-03 08:33:50 +01:00
parent 41b21d8091
commit b0fd171a06
5 changed files with 67 additions and 63 deletions

Binary file not shown.

Binary file not shown.

View File

@ -21,8 +21,8 @@ INSDRV UTHERNET.DRV 000E3A123456
#INSDRV UTHERNET2.DRV 0008DC123456
#INSDRV UTHER2.AI.DRV 0008DC123456
#INSDRV LANCEGS.DRV
#STARTPROC TCPIP
#STARTPROC DHCPCLNT
STARTPROC TCPIP
STARTPROC DHCPCLNT
#STARTPROC HTTPD
#TELNETD
#NFSMOUNT 192.168.1.5:/A2OSX /MNT/A2OSX

View File

@ -70,9 +70,7 @@ Dev.Detect sta hArgs
rts
.4 lda ZPTmpPtr1+1
* sta DEVSLOTCn
and #$0F
sta DEVSLOT0n
ora #$30
sta DEV.HEADER.NAME+4
asl
@ -80,9 +78,6 @@ Dev.Detect sta hArgs
asl
asl
sta DEVSLOTn0
clc
adc #SSC.DATA+1
sta DEV.DATA.BFFF
>PUSHW L.DEV.HEADER.NAME
>LDYA L.MSG.DETECT.OK
@ -140,10 +135,10 @@ OPEN php
stz SSC.RESET,x
stz INBUF.PTR
stz INBUF.CNT
stz OUTBUF.PTR
stz OUTBUF.CNT
stz INBUF.HEAD
stz INBUF.TAIL
stz OUTBUF.HEAD
stz OUTBUF.TAIL
lda #SSC.CTL.CLKINT+SSC.CTL.B9600
sta SSC.CTL,x
@ -168,20 +163,20 @@ CLOSE php
*--------------------------------------
READ php
sei
lda INBUF.CNT
ldx INBUF.TAIL
cpx INBUF.HEAD
beq .9
ldx INBUF.PTR
ldy INBUF,x
lda INBUF,x
txa
inc
and #BUF.MASK
sta INBUF.PTR
dec INBUF.CNT
inx
cpx #BUF.SIZE
bne .1
ldx #0
.1 stx INBUF.TAIL
tya
plp
clc
rts
@ -194,13 +189,14 @@ READ php
WRITE php
sei
tay save char in Y
* ldx DEVSLOTn0
* lda SSC.STATUS,x
* bit #SSC.STATUS.DCD+SSC.STATUS.DSR true when 0
* bne .9
ldx OUTBUF.CNT Buffer Empty?
ldx OUTBUF.HEAD
cpx OUTBUF.TAIL Buffer Empty?
bne .11 not empty, queue char
ldx DEVSLOTn0
@ -216,22 +212,21 @@ WRITE php
clc
rts
.10 ldx OUTBUF.CNT
.10 ldx OUTBUF.HEAD
.11 cpx #BUF.SIZE
.11 inx
cpx #BUF.SIZE
bne .12
ldx #0
.12 cpx OUTBUF.TAIL
beq .9 Buffer Full!!
lda OUTBUF.PTR
clc
adc OUTBUF.CNT
and #BUF.MASK
tax
stx OUTBUF.TAIL
tya
sta OUTBUF,x
inc OUTBUF.CNT
* ldx DEVSLOTn0
* lda #SSC.CMD.TEIRQ+SSC.CMD.DTR
* sta SSC.CMD,x
@ -253,25 +248,26 @@ IRQ stz .8+1
* bpl .9 IRQ from this device ? no, exit !!!!Applewin bug #308!!!!
bit #SSC.STATUS.RDRF incoming char?
beq .3
beq .4
*------------ IRQ In
ldy SSC.DATA,x read data to clear IRQ
lda INBUF.CNT
ldx INBUF.HEAD
txa
inc
cmp #BUF.SIZE
bne .2
lda #0
.2 cmp INBUF.TAIL
beq .8 buffer full, discard and exit
clc
adc INBUF.PTR
and #BUF.MASK
tax
tya get back data
sta INBUF.HEAD
tya
sta INBUF,x
inc INBUF.CNT
lda #$ff
sta .8+1
@ -279,27 +275,30 @@ IRQ stz .8+1
*------------ IRQ Out
.2 ldx DEVSLOTn0
.3 ldx DEVSLOTn0
lda SSC.STATUS,x
.3 bit #SSC.STATUS.TDRE
.4 bit #SSC.STATUS.TDRE
beq .8 no transmition possible....
lda OUTBUF.CNT something to transmit ?
ldy OUTBUF.TAIL something to transmit ?
cpy OUTBUF.HEAD
beq .8
ldy OUTBUF.PTR
lda OUTBUF,y
sta SSC.DATA,x
dec OUTBUF.CNT
tya get back OUTBUF.PTR
inc
and #BUF.MASK
sta OUTBUF.PTR
iny
cpy #BUF.SIZE
bne .5
ldy #0
bra .2
.5 sty OUTBUF.TAIL
lda #$ff
sta .8+1
bra .3
.8 lda #$ff did we finally handle and IRQ condtion ?
beq .9
@ -310,14 +309,11 @@ IRQ stz .8+1
rts
*--------------------------------------
DRV.CS.END
DEVSLOT0n .BS 1
*DEVSLOTCn .BS 1
DEV.DATA.BFFF .BS 1
DEVSLOTn0 .BS 1
INBUF.PTR .BS 1
INBUF.CNT .BS 1
OUTBUF.PTR .BS 1
OUTBUF.CNT .BS 1
INBUF.TAIL .BS 1
INBUF.HEAD .BS 1
OUTBUF.TAIL .BS 1
OUTBUF.HEAD .BS 1
INBUF .BS BUF.SIZE
OUTBUF .BS BUF.SIZE
*--------------------------------------

View File

@ -73,10 +73,18 @@ CS.INIT >SYSCALL GetArgC
clc
.9 rts
*--------------------------------------
CS.RUN lda #13 try send a CR...
>SYSCALL PutCA Device Is Ready ?
CS.RUN lda #255 IAC
>SYSCALL PutCA
bcs .8
* lda #254 DONT
* >SYSCALL PutCA
bcs .8 no..loop...
lda #251 WILL
>SYSCALL PutCA
lda #1 ECHO
>SYSCALL PutCA
>PUSHYA
>LDYA L.MSG.GREETINGS