diff options
-rw-r--r-- | programs/sub-suite/subeditor.s | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/programs/sub-suite/subeditor.s b/programs/sub-suite/subeditor.s index 1053790..aa9482a 100644 --- a/programs/sub-suite/subeditor.s +++ b/programs/sub-suite/subeditor.s @@ -68,19 +68,16 @@ init_tables: clr_arr: - pha.q ; Preserve A. - and #0 ; Reset A. + pha.q ; Preserve A. + and #0 ; Reset A. @loop: - mov.q (d), a ; Clear 16 bytes. - mov.q (d+8), a ; - add d, #$10 ; Increment the pointer by 16. - sub s, #$10 ; Subtract 16 from the size. - bcc @end ; We've reached the end of the array, so we're done. - beq @end ; - bra @loop ; Keep looping. + mov.q (d+s), a ; Clear 16 bytes. + mov.q (d+s+8), a ; + sub s, #16 ; Subtract 16 from the size. + bcs @loop ; We haven't reached the end, so keep looping. @end: - pla.q ; Restore A. - rts ; End of clr_arr. + pla.q ; Restore A. + rts ; End of clr_arr. pnt_strt: |