Use more compact loops.

This commit is contained in:
Sven Michael Klose
2020-11-01 22:59:07 +01:00
committed by greg-king5
parent 99c0815cdb
commit f59cb9af06
13 changed files with 90 additions and 94 deletions

View File

@@ -94,11 +94,12 @@ _read:
; popax - fd, must be == to the above one
; return -1+__oserror or number of bytes read
eor #$ff
sta ptr1
txa
eor #$ff
sta ptr1+1 ; -(# of bytes to read)-1
inx
stx ptr1+1
tax
inx
stx ptr1 ; save count with each byte incremented separately
jsr popax
sta ptr2
stx ptr2+1 ; buffer ptr
@@ -152,9 +153,9 @@ _read:
beq @done ; yes, we're done
jmp __mappederrno ; no, we're screwed
@L3: inc ptr1 ; decrement the count
@L3: dec ptr1 ; decrement the count
bne @L0
inc ptr1+1
dec ptr1+1
bne @L0
@done: