diff options
Diffstat (limited to 'warriors/epson.red')
-rw-r--r-- | warriors/epson.red | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/warriors/epson.red b/warriors/epson.red index eeceee1..688ad8d 100644 --- a/warriors/epson.red +++ b/warriors/epson.red @@ -1,16 +1,20 @@ ;author Benji Dial ;name Epson -period equ 10 +intrascan_period equ 10 +interscan_period equ 2 -scan_init equ the_end - (the_end - scan) % period + period +;interscan period must divide intrascan period +;intrascan period must divide 8000 + +scan_init equ the_end - scan - (the_end - scan) % intrascan_period + intrascan_period scan - seq.i -period, scan_init + seq.i -intrascan_period, scan_init jmp found found_ret - add.ab #period, scan + add.ab #intrascan_period, scan seq.ab scan, scan jmp scan @@ -18,17 +22,17 @@ found_ret jmn.a scan, scan clear - mov the_end, - 1 - sub.ab #2, clear + mov the_end, scan - interscan_period + sub.ab #interscan_period, clear - seq.ab #the_end - clear - (the_end - clear) % 2 + 3, clear + seq.ab #scan_add - 1 - clear - (scan_add - 1 - scan) % interscan_period + interscan_period, clear jmp clear - mov.ab #-1, clear + mov.ab #scan - interscan_period - clear, clear jmp clear scan_add - dat 2, period + scan_init + 2 + dat interscan_period, intrascan_period + scan_init + interscan_period found mov bomb, >scan |