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 8 of 11 Topic 2222 of 2343
Post > Topic >>

Re: Slow quick scan ;]

by Roy <roy.van.rijn@[EMAIL PROTECTED] > Feb 29, 2008 at 08:16 AM

> > ...
> > ptr1 dat 0,step
>
> OK, just so we are talking about the same code, here is what it looks
> like to me:

Yes!! :)

But there is just a little bug now, you jump to qPtr instead of the
qDec (the decoder)...!! But thats easily fixed. I also added a couple
of more scans (12) to show its so easy to extend it, without adding
something to the decoder, and it still goes the same speed. A good
thing indeed is to put all the direct jumps to qDec on top, the slower
scans to the bottom, got me some extra points.

pGo jmp #0,0
     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     qDec
        sne     qPtr+(qM-2)*(qN-1)+qStep*0 ,qPtr+
(qM-2)*(qN-1)+qStep*1
        seq     qPtr+(qM-2)*(qN-1)+qStep*2 ,qPtr+
(qM-2)*(qN-1)+qStep*3
        jmp     9 ,{qDec
        sne     qPtr+(qM-1)*(qN-2)+qStep*0 ,qPtr+
(qM-1)*(qN-2)+qStep*1
        seq     qPtr+(qM-1)*(qN-2)+qStep*2 ,qPtr+
(qM-1)*(qN-2)+qStep*3
        jmp     6 ,<qDec
        sne     qPtr+(qM-2)*(qN-2)+qStep*0 ,qPtr+
(qM-2)*(qN-2)+qStep*1
        seq     qPtr+(qM-2)*(qN-2)+qStep*2 ,qPtr+
(qM-2)*(qN-2)+qStep*3
        djn.f   3 ,qDec
        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   qDec ,qDec
        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    ,>qDec
        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     qDec ,>qDec
        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    ,<qDec
        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     qDec ,<qDec
        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    ,}qDec
        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     qDec ,}qDec
        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    ,{qDec
        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     qDec ,{qDec
        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


btw. Now that I see your bombing engine at work, I like it :)

> Even more dense code might look like:
> =A0 =A0seq =A0A,B
> =A0 =A0jmn.f dec,C
>
> Three scans in two lines, but I don't see how it can be made to work.
>

I think thats impossible. The problem is the first scan, you can't
really change the flow it follows.. But who knows, maybe some clever
redirection will make it possible!

Roy
 




 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 Fri Jul 25 22:03:26 CDT 2008.