Saved another byte ;-)

This commit is contained in:
Oliver Schmidt 2013-10-03 22:32:12 +02:00
parent 1698c439c5
commit 7c2f3b3911
2 changed files with 4 additions and 6 deletions

View file

@ -206,9 +206,8 @@ fixup13:lda rxtxreg
jsr adjustcnt jsr adjustcnt
; Is bufsize < cnt ? ; Is bufsize < cnt ?
sec
lda bufsize lda bufsize
sbc cnt cmp cnt
lda bufsize+1 lda bufsize+1
sbc cnt+1 sbc cnt+1
bcs :+ bcs :+
@ -334,6 +333,7 @@ adjustcnt:
adjustptr: adjustptr:
lda cnt lda cnt
ldx cnt+1
eor #$FF ; Two's complement part 1 eor #$FF ; Two's complement part 1
tay tay
iny ; Two's complement part 2 iny ; Two's complement part 2
@ -345,7 +345,6 @@ adjustptr:
lda bufaddr+1 lda bufaddr+1
sbc #$00 sbc #$00
sta ptr+1 sta ptr+1
ldx cnt+1
rts rts
;--------------------------------------------------------------------- ;---------------------------------------------------------------------

View file

@ -248,9 +248,8 @@ fixup20:lda ethdata
sta len+1 sta len+1
; Is bufsize < len ? ; Is bufsize < len ?
sec
lda bufsize lda bufsize
sbc len cmp len
lda bufsize+1 lda bufsize+1
sbc len+1 sbc len+1
bcs :+ bcs :+
@ -389,6 +388,7 @@ exit:
adjustptr: adjustptr:
lda len lda len
ldx len+1
eor #$FF ; Two's complement part 1 eor #$FF ; Two's complement part 1
tay tay
iny ; Two's complement part 2 iny ; Two's complement part 2
@ -400,7 +400,6 @@ adjustptr:
lda bufaddr+1 lda bufaddr+1
sbc #$00 sbc #$00
sta ptr+1 sta ptr+1
ldx len+1
rts rts
;--------------------------------------------------------------------- ;---------------------------------------------------------------------