Archived from groups: rec.games.corewar (
More info?)
Chris Lukas wrote:
> Thanks so much.
<snip>
np.
> whats an spl?
spl stands for split. it makes the process executing this instruction
"split", that is, creates another process at the position pointed to
by its first operand. execution order is such that the original process
executes first. (that is, the instruction directly after the spl)
so basically:
spl 2
dat 0
jmp -2
will create another process executing the
instruction 2 places away from the spl. the original process
will get to execute the dat before the newly spawned one jumps
back to the spl. (too lazy to draw the process queue)
😛
> whats a djn stream? I will also try to look this up
djn.f foo, <-bar
would be a djn stream.
djn stands for "decrement jump not zero"
which basically means that it is going to decrement the a-(.a) and(.f)
/or(.b) the b-field of the location pointed to by its own b-field.
a decrement stream is created by using an inc/decrement indirect
addressing mode:
"{" <- a-field post-decrement indirect (don't get me
wrong.. the indirection takes place after the location being decremented)
"}" <- a-field pre-increment indirect
"<" <- for b-field
">" <- guess
so each time the djn is executed, its b-field will decrement the b-field
at -bar and use it as a pointer to the fields going to be decremented by
the djn. (.f will decrement both fields, .a ... .b .. guess).
if both fields (in case of .f), .a or .b are zero after having been
decremented, djn will not jump. therefore it is a bit more secure to use
..f (a- and b-field of the decremented position have to be 0) apart from
having more destructive potential.
> what is an optimal step size? 3 or 4? (just guessing)
hmm mr karonen has already given you a few hints ^^. (3 or 4 would
nonetheless be an improvement against most warriors..)
good stepsizes find opponents faster, but depend on your warrior too..
> what is the add.f and djn.f?
"add.f" <- add the a- and b-field of the instruction pointed to by its
a-field to the a- and b-field of the instruction pointed to by its
b-field.
"djn.f" <- explained above.
*breathes*
have fun,
Andreas Scholta