Damage--my new scanner

G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

Any comments/suggestions? It's a Blur/Hazy Lazy type scanner, but with
the .75c scanner implemented out of the latest CW. (This was
suggested as a possibility in Something Strange.) So...suggestions?
;redcode-94nop
;name Damage
;author Andrew Hunter
;strategy Blur-style scanner .6/.2 scan/clear
;assert CORESIZE==8000
off equ 4670
first equ ptr+step
step equ 290;2936;632;24,632,328,936,952,968
gate equ ptr
cptr mov.b ptr, #-3154
clr mov.i sbmb,>-1
sub incr,ptr
ptr sne first+step,first
sub.x incr,ptr
jmz.f clr,@ptr
jmn.b cptr,ptr
sbmb incr spl #-2*step,<-step
mov.i bmb,>gate
djn.f -1,>gate
bmb dat <2667,bmb+1-gate
boot mov bmb,off
for bmb-cptr-1
mov {boot,<boot
rof
spl @boot
mov {boot,<boot
dat <boot,<boot
for (MAXLENGTH-CURLINE)/2
spl.b #1,1
spl.x @1,<1
rof
end boot
 
G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

Looks intresting, but if I'm reading the code correctly the following
is the active code loop:

clr mov.i sbmb, >-1
sub incr, ptr
ptr sne first+step, first
sub.x incr, ptr
jmz.f clr, @ptr
jmn.b cptr, ptr

which will jump to cptr (updates the bombing pointer) if the B-field
of ptr points to something non-zero. This is fine if the jmz.f scan
has found something, but if the sne scan's A-field is the non-zero
instruction won't it miss this?


> Any comments/suggestions? It's a Blur/Hazy Lazy type scanner, but
with
> the .75c scanner implemented out of the latest CW. (This was
> suggested as a possibility in Something Strange.) So...suggestions?
<SNIP>
> cptr mov.b ptr, #-3154
> clr mov.i sbmb,>-1
> sub incr,ptr
> ptr sne first+step,first
> sub.x incr,ptr
> jmz.f clr,@ptr
> jmn.b cptr,ptr
> sbmb incr spl #-2*step,<-step
> mov.i bmb,>gate
> djn.f -1,>gate
> bmb dat <2667,bmb+1-gate
<SNIP>
 
G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

Hi Andrew,

With the .75c scan loop, if you leave the scan loop and wish to
re-enter it (i.e. you're not a one-shot), you need to reset the
pointers. MOV.BA ptr, ptr above the scan loop should be sufficient.

This is due to the way it handles finding something through the
a-field of ptr. (yes, it really does work! ;-)

Good luck,

John