Fix sort_ram_cards resaving registers every time outer loop was ran
This commit is contained in:
parent
3efad948f2
commit
9841b30ca8
3
rom.68k
3
rom.68k
@ -102,6 +102,7 @@ farc_done:
|
||||
| Length in d0
|
||||
sort_ram_cards:
|
||||
movem.l d2-d4/a2, -(a7) | Save calle-preserved registers
|
||||
src_outer_loop:
|
||||
move.b #0, d1 | d1 = newlen
|
||||
move.b #1, d2 | d2 = i
|
||||
move.l a0, a1 | a1 holds the pointer to the current pair
|
||||
@ -125,6 +126,6 @@ bra.b src_inner_loop
|
||||
src_inner_loop_done:
|
||||
move.b d1, d0 | len = newlen
|
||||
cmp #1, d0 | if n > 1, branch to outer loop
|
||||
bgt.b sort_ram_cards
|
||||
bgt.b src_outer_loop
|
||||
movem.l (a7)+, d2-d4/a2 | Restore calle-preserved registers
|
||||
rts
|
||||
|
Loading…
Reference in New Issue
Block a user