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

@@ -50,16 +50,17 @@ LINEDIST = $20 ; Offset in video RAM between two lines
ldx #>load_addr
sta load
stx load+1
lda #<load_size
eor #$FF
sta count ; store (-size - 1)
lda #>load_size
eor #$FF
sta count+1
L1: inc count ; pre-count one's-complement upwards
ldx #<load_size
inx
stx count
ldx #>load_size
inx
stx count+1 ; save size with each byte incremented separately
L1: dec count ; pre-count one's-complement upwards
bnz L2
inc count+1
dec count+1
bze L3
L2: jsr GETCHAR ; (doesn't change .Y)
sta (load),y