LanCEGS:fix a bug in buffer size computation

This commit is contained in:
Rémy GIBERT 2016-03-24 18:02:50 +01:00
parent ea649a8711
commit f8be97559d

View File

@ -1,6 +1,6 @@
PR#3 PR#3
PREFIX /A2OSX.SRC PREFIX /A2OSX.SRC
NEW LOMEM $C00
INC 1 INC 1
AUTO 6 AUTO 6
.LIST OFF .LIST OFF
@ -378,12 +378,17 @@ SEND >PULLW ZPTmpPTR
sta FRAMELEN sta FRAMELEN
clc clc
adc #6 3 WORDs more Status, len & Control adc #6 3 WORDs more Status, len & Control
sta FRAMELEN6
pha pha
ldy #1 ldy #1
lda (ZPTmpPTR),y lda (ZPTmpPTR),y
sta FRAMELEN+1 sta FRAMELEN+1
adc #0 adc #0
ply sta FRAMELEN6+1
beq .1 DIV 256=0, write "0 pages", MOD256 is > 0
ply if MOD 256=0, save one empty page
bne .1 bne .1
dec dec
@ -398,8 +403,6 @@ SEND >PULLW ZPTmpPTR
dey dey
bne .2 bne .2
bra *
lda #ERR.DEV.NOBUFFER lda #ERR.DEV.NOBUFFER
sec sec
rts rts
@ -502,6 +505,7 @@ DRV.CS.END
DEVSLOTx0 .BS 1 DEVSLOTx0 .BS 1
USERMAC .BS 1 USERMAC .BS 1
FRAMELEN .BS 2 FRAMELEN .BS 2
FRAMELEN6 .BS 2
*-------------------------------------- *--------------------------------------
DEVINFO .DA #S.DEVINFO.TYPE.NET DEVINFO .DA #S.DEVINFO.TYPE.NET
DEVFLAGS .DA #0 DEVFLAGS .DA #0