diff --git a/xmas_2018/ball.s b/xmas_2018/ball.s index e39520c7..f02b89da 100644 --- a/xmas_2018/ball.s +++ b/xmas_2018/ball.s @@ -242,7 +242,7 @@ ball_done: rts ; 6 -.include "gr_scroll.s" -greets: -.incbin "greets.raw.lz4t" -greets_end: +;.include "gr_scroll.s" +;greets: +;.incbin "greets.raw.lz4t" +;greets_end: diff --git a/xmas_2018/delay_a.s b/xmas_2018/delay_a.s index 2d0802da..62c4b1b6 100644 --- a/xmas_2018/delay_a.s +++ b/xmas_2018/delay_a.s @@ -5,6 +5,7 @@ ; The branches must not cross page boundaries! ; +delay_begin: ; Cycles Accumulator Carry flag ; 0 1 2 3 4 5 6 (hex) 0 1 2 3 4 5 6 @@ -23,3 +24,7 @@ dly2: bne dly3 ; 2 2 3 00 00 01 0 1 0 dly3: rts ; 6 6 6 6 6 6 6 00 00 00 00 01 01 01 0 1 1 1 0 0 1 ; ; Total cycles: 25 26 27 28 29 30 31 + +delay_end: + +.assert >delay_begin = >delay_end, error, "delay_a crosses page" diff --git a/xmas_2018/gr_fast_clear.s b/xmas_2018/gr_fast_clear.s index 796b985a..9b1d73ff 100644 --- a/xmas_2018/gr_fast_clear.s +++ b/xmas_2018/gr_fast_clear.s @@ -91,7 +91,9 @@ no_draw_bottom: bpl clear_top_fast_loop ; 2nt/3 rts ; 6 +clear_top_end: +.assert >clear_top = >clear_top_end, error, "clear_top crosses page" diff --git a/xmas_2018/gr_putsprite.s b/xmas_2018/gr_putsprite.s index 2b54c6e1..18bb37cb 100644 --- a/xmas_2018/gr_putsprite.s +++ b/xmas_2018/gr_putsprite.s @@ -69,4 +69,6 @@ put_sprite_pixel: ; -1 rts ; return ; 6 +put_sprite_end: +.assert >put_sprite_no_transparency = >put_sprite_end, error, "put_sprite crosses page" diff --git a/xmas_2018/gr_scroll.s b/xmas_2018/gr_scroll.s index 3b78fb6b..f167a022 100644 --- a/xmas_2018/gr_scroll.s +++ b/xmas_2018/gr_scroll.s @@ -63,3 +63,5 @@ no_wrap: done_wrap: rts ; 6 + +.assert >scroll_loop = >done_wrap, error, "gr_scroll crosses page" diff --git a/xmas_2018/play_music.s b/xmas_2018/play_music.s index df7c1f10..8b2b2093 100644 --- a/xmas_2018/play_music.s +++ b/xmas_2018/play_music.s @@ -242,9 +242,13 @@ mb_done_change: rts ; 6 ;======= ; 21 +play_music_end: + +.assert >play_music = >play_music_end, error, "play_music crosses page" .align $100 -.include "mockingboard.s" + +pattern_begin: ; patterns 8 long mal_pattern: @@ -264,6 +268,6 @@ mnl_pattern: mnh_pattern: .byte >mnh00,>mnh01,>mnh02,>mnh03,>mnh04,>mnh05,>mnh06,>mnh07 +pattern_end: - - +.assert >pattern_begin = >pattern_end, error, "pattern crosses page" diff --git a/xmas_2018/vapor_lock.s b/xmas_2018/vapor_lock.s index fb9ceb3b..e965999a 100644 --- a/xmas_2018/vapor_lock.s +++ b/xmas_2018/vapor_lock.s @@ -238,3 +238,6 @@ done_vapor_lock: ; language on the Apple II computer. ; Cavanagh and Anstis: Visual psychophysics on the ; Apple II: Getting started + +.assert >vapor_lock_loop = >done_vapor_lock, error, "vapor_lock crosses page" + diff --git a/xmas_2018/xmas2018.s b/xmas_2018/xmas2018.s index 39949706..242cddf1 100644 --- a/xmas_2018/xmas2018.s +++ b/xmas_2018/xmas2018.s @@ -180,20 +180,27 @@ game_over_man: .align $100 .include "wreath.s" .include "ball.s" - .include "gr_offsets.s" - .include "gr_hline.s" - .include "gr_fast_clear.s" - .include "vapor_lock.s" .include "gr_putsprite.s" - .include "delay_a.s" + .include "gr_offsets.s" + .include "vapor_lock.s" + .include "gr_fast_clear.s" .include "play_music.s" + .include "delay_a.s" + .include "gr_scroll.s" + .include "mockingboard.s" + ; Things here alignment doesn't matter + .include "gr_hline.s" .include "wait_keypress.s" .include "merry.s" .include "lz4_decode.s" .include "rts.s" +greets: +.incbin "greets.raw.lz4t" +greets_end: + ; filename to open is 30-character Apple text: wreath_filename: ; .byte "WREATH.LZ4",0 .byte 'W'|$80,'R'|$80,'E'|$80,'A'|$80,'T'|$80,'H'|$80,'.'|$80,'L'|$80