I don't have my head around the math just yet, but it looks cool. I
wouldn't worry about one extra instruction in the decoder if it gets
you more flexibility. I have been playing with decode/attack code
that is pretty slow but gets 3-4 more % wins. Face it, if you locate
your opponent that early in the game, it is worth spending some
cycles.
It does have one of the same constraints that q4 scans do. The seq
uses an offset pointer (tab) which is a precoded value somewhere in
the program. Each value has 4 related scan locations and each value
can only be used once. You have to use some nimble code to get the
decoder to access the correct value and that gets hard above 6 values
which is why most programs resort to q3 code to get above 24 scans.
> qscan =A0 sne =A0 =A0 bptr+(magic1*number1) =A0 ,
bptr+(magic1*number1)+of=
fset
> =A0 =A0 =A0 =A0 seq =A0 =A0 >tab-1 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ,
bptr+(mag=
ic1*(number1+1))+offset
> =A0 =A0 =A0 =A0 jmp =A0 =A0 dec =A0 =A0 =A0 =A0 =A0 =A0 , <ind
Looks like a general formula would be:
sne bptr+fn(number) ,bptr+fn(number)+offset
seq <tabvalue ,bptr+fn(number-1)+offset
or
sne bptr+fn(number) ,bptr+fn(number)+offset
seq >tabvalue ,bptr+fn(number+1)+offset
Maybe there are lots of fn()'s with solutions?
P. Kline


|