Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Core War > Re: Slow quick ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 11 Topic 2222 of 2343
Post > Topic >>

Re: Slow quick scan ;]

by pauldkline@[EMAIL PROTECTED] Feb 29, 2008 at 05:53 AM

On Feb 28, 2:53=A0am, Roy <roy.van.r...@[EMAIL PROTECTED]
> wrote:
> ...
> ptr1 dat 0,step

OK, just so we are talking about the same code, here is what it looks
like to me:

pGo [ boot code here ]
     for 30
         dat     0,0
     rof
qM       equ     6600
qN       equ     2275
qStep    equ     111

qGo
        sne     qPtr+qM*(qN+0)+qStep*0 ,qPtr+qM*(qN+0)+qStep*1
        seq     qPtr+qM*(qN+0)+qStep*2 ,qPtr+qM*(qN+0)+qStep*3
        jmp     qPtr
        sne     qPtr+(qM-1)*(qN-1)+qStep*0 ,qPtr+
(qM-1)*(qN-1)+qStep*1
        seq     qPtr+(qM-1)*(qN-1)+qStep*2 ,qPtr+
(qM-1)*(qN-1)+qStep*3
        djn.f   qPtr ,qPtr
        sne     qPtr+qM*(qN+2)+qStep*0 ,qPtr+qM*(qN+2)+qStep*1
        seq     qPtr+qM*(qN+2)+qStep*2 ,qPtr+qM*(qN+2)+qStep*3
        jmp     3    ,>qPtr
        sne     qPtr+qM*(qN+1)+qStep*0 ,qPtr+qM*(qN+1)+qStep*1
        seq     qPtr+qM*(qN+1)+qStep*2 ,qPtr+qM*(qN+1)+qStep*3
        jmp     qPtr ,>qPtr
        sne     qPtr+qM*(qN-2)+qStep*0 ,qPtr+qM*(qN-2)+qStep*1
        seq     qPtr+qM*(qN-2)+qStep*2 ,qPtr+qM*(qN-2)+qStep*3
        jmp     3    ,<qPtr
        sne     qPtr+qM*(qN-1)+qStep*0 ,qPtr+qM*(qN-1)+qStep*1
        seq     qPtr+qM*(qN-1)+qStep*2 ,qPtr+qM*(qN-1)+qStep*3
        jmp     qPtr ,<qPtr
        sne     qPtr+qN*(qM+2)+qStep*0 ,qPtr+qN*(qM+2)+qStep*1
        seq     qPtr+qN*(qM+2)+qStep*2 ,qPtr+qN*(qM+2)+qStep*3
        jmp     3    ,}qPtr
        sne     qPtr+qN*(qM+1)+qStep*0 ,qPtr+qN*(qM+1)+qStep*1
        seq     qPtr+qN*(qM+1)+qStep*2 ,qPtr+qN*(qM+1)+qStep*3
        jmp     qPtr ,}qPtr
        sne     qPtr+qN*(qM-2)+qStep*0 ,qPtr+qN*(qM-2)+qStep*1
        seq     qPtr+qN*(qM-2)+qStep*2 ,qPtr+qN*(qM-2)+qStep*3
        jmp     3    ,{qPtr
        sne     qPtr+qN*(qM-1)+qStep*0 ,qPtr+qN*(qM-1)+qStep*1
        seq     qPtr+qN*(qM-1)+qStep*2 ,qPtr+qN*(qM-1)+qStep*3
        jmp     qPtr ,{qPtr
        jmp     pGo

null     dat     0,0
qSteps  dat     qStep*2 ,qStep*2
;break
qDec    mul.x   #qM     ,#qN

        add.f   qDec    ,qPtr           ;
        sne     *qPtr   ,@[EMAIL PROTECTED]
        ; 3 more lines than q4
        add.f   qSteps  ,qPtr          ;

        sne     null    ,@[EMAIL PROTECTED]
        mov.x   qPtr    ,qPtr
qPtr    mov     0       ,{qStep
        mov     null    ,>qPtr
        jmn.f   qPtr    ,>qPtr
        jmp     pGo

        end     qGo

I marked the three lines in the decoder that are not required in q4.

> But indeed the decoder is a big problem. I'm actually thinking of
> another qscan-prototype that gives up one scan, but gains a lot of
> decoding speed:
> ...
> OTOH, if you are going to do this.. why bother, its almost like a q4
> anyway, which does these things more effective.

Yes, q4 is very efficient up to 24 locations (6*4).  Beyond that it is
just q3 in which NumberOfScans =3D LinesOfCode.  Is there no way to scan
> 24 locations using sne/seq/jmp triplets without sacrificing speed?

Even more dense code might look like:
   seq  A,B
   jmn.f dec,C

Three scans in two lines, but I don't see how it can be made to work.

P. Kline
 




 11 Posts in Topic:
Re: Slow quick scan ;]
"Lukasz Adamowski&qu  2008-02-25 13:20:58 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-26 07:00:37 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-26 08:18:44 
Re: Slow quick scan ;]
Roy <roy.van.rijn@[EMA  2008-02-26 12:56:47 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-27 06:27:24 
Re: Slow quick scan ;]
Roy <roy.van.rijn@[EMA  2008-02-28 00:53:53 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-29 05:53:03 
Re: Slow quick scan ;]
Roy <roy.van.rijn@[EMA  2008-02-29 08:16:21 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-29 13:24:13 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-29 13:29:27 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-03-01 04:38:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 11:08:18 CDT 2008.