46 lines
863 B
Text
46 lines
863 B
Text
;author Benji Dial
|
|
;name Epson
|
|
|
|
intrascan_period equ 10
|
|
interscan_period equ 2
|
|
|
|
;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 -intrascan_period, scan_init
|
|
jmp found
|
|
|
|
found_ret
|
|
add.ab #intrascan_period, scan
|
|
seq.ab scan, scan
|
|
jmp scan
|
|
|
|
add.f scan_add, scan
|
|
jmn.a scan, scan
|
|
|
|
clear
|
|
mov the_end, scan - interscan_period
|
|
sub.ab #interscan_period, clear
|
|
|
|
seq.ab #scan_add - 1 - clear - (scan_add - 1 - scan) % interscan_period + interscan_period, clear
|
|
jmp clear
|
|
|
|
mov.ab #scan - interscan_period - clear, clear
|
|
jmp clear
|
|
|
|
scan_add
|
|
dat interscan_period, intrascan_period + scan_init + interscan_period
|
|
|
|
found
|
|
mov bomb, >scan
|
|
mov bomb + 1, @scan
|
|
jmp found_ret, <scan
|
|
|
|
bomb
|
|
spl 1
|
|
jmp bomb
|
|
|
|
the_end
|