And here it is:
boot
sne M*(N+0)+step*0 ,M*(N+0)+step*1
seq M*(N+0)+step*2 ,M*(N+0)+step*3
jmp found
sne (M-1)*(N-1)+step*0 ,(M-1)*(N-1)+step*1
seq (M-1)*(N-1)+step*2 ,(M-1)*(N-1)+step*3
djn.f found ,found
sne M*(N+2)+step*0 ,M*(N+2)+step*1
seq M*(N+2)+step*2 ,M*(N+2)+step*3
jmp 3 ,>found
sne M*(N+1)+step*0 ,M*(N+1)+step*1
seq M*(N+1)+step*2 ,M*(N+1)+step*3
jmp found ,>found
sne M*(N-2)+step*0 ,M*(N-2)+step*1
seq M*(N-2)+step*2 ,M*(N-2)+step*3
jmp 3 ,<found
sne M*(N-1)+step*0 ,M*(N-1)+step*1
seq M*(N-1)+step*2 ,M*(N-1)+step*3
jmp found ,<found
sne N*(M+2)+step*0 ,N*(M+2)+step*1
seq N*(M+2)+step*2 ,N*(M+2)+step*3
jmp 3 ,}found
sne N*(M+1)+step*0 ,N*(M+1)+step*1
seq N*(M+1)+step*2 ,N*(M+1)+step*3
jmp found ,}found
sne N*(M-2)+step*0 ,N*(M-2)+step*1
seq N*(M-2)+step*2 ,N*(M-2)+step*3
jmp 3 ,{found
sne N*(M-1)+step*0 ,N*(M-1)+step*1
seq N*(M-1)+step*2 ,N*(M-1)+step*3
jmp found ,{found
jmp start
steps dat step ,step
found mul.x #M ,#N
add.f found ,ptr1
sne *ptr1 ,@[EMAIL PROTECTED]
add.f steps ,ptr1
sne null ,@[EMAIL PROTECTED]
mov.x ptr1 ,ptr1
ptr1 mov found ,found+step ; if step>100, a-value will
point to a dat 0,0
Cycles to decode:
25% = 4 cycles to decode
50% = 5 cycles to decode
25% = 6 cycles to decode
q4 scan cycles to decode:
50% = 2 cycles to decode
50% = 3 cycles to decode
It can be extended with more jumps and it would run a little faster on
average if you put all the "jmp found' triplets at the top and change
the "jmp 3" triplets to "jmp <name>".
It's nice on several counts:
- scan code is maximally dense, even when extended
- no values to hide in core
- no dependency on positions
- lots of M/N/step choices
- all separations can be > 100
- easier to understand!
Comparing it to q4, the decoder is 3 lines longer, but q4 extended
with q3 scans is also long. It is 1-4 cycles slower to decode but
that won't matter against other qscanners, it may make a difference
against programs that just do a fast boot away from a big decoy, but
even q4 has a hard time interrupting those.
Next we need a little program to identify M/N values.
P. Kline


|