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 5 of 8 Topic 2208 of 2343
Post > Topic >>

Re: Slow quick scan ;]

by Roy <roy.van.rijn@[EMAIL PROTECTED] > Feb 18, 2008 at 06:40 PM

Using the same method you described (mul/mod) I created the following
qscan:

empty	equ	dect-10

bomb    dat     >-86            , <2667

magic	equ	5927;3241
magic2	equ	7799;4240
offset	equ	2581;7085

off	dat	offset		, offset

	dat	#26		, #26
dect	dat	#3		, #20

for 30
dat 0,0
rof

qscan	sne	comp+2*magic-offset	, comp+2*magic2-offset
	seq	comp+2*magic		, comp+2*magic2
	jmp	dec			, }dect
	sne	comp+5*magic-offset	, comp+5*magic2-offset
	seq	comp+5*magic		, comp+5*magic2
	jmp	dec			, <dect
	sne	comp+8*magic-offset	, comp+8*magic2-offset
	seq	comp+8*magic		, comp+8*magic2
	jmp	dec
	sne	comp+11*magic-offset	, comp+11*magic2-offset
	seq	comp+11*magic		, comp+11*magic2
	jmp	dec			, >dect
	sne	comp+14*magic-offset	, comp+14*magic2-offset
	seq	comp+14*magic		, comp+14*magic2
	jmp	dec			, {dect

	sne	comp+4*magic-offset	, comp+4*magic2-offset
	seq	comp+4*magic		, comp+4*magic2
	jmp	dec-1			, }dect
	sne	comp+10*magic-offset	, comp+10*magic2-offset
	seq	comp+10*magic		, comp+10*magic2
	jmp	dec-1			, <dect
	sne	comp+16*magic-offset	, comp+16*magic2-offset
	seq	comp+16*magic		, comp+16*magic2
	jmp	dec-1
	sne	comp+22*magic-offset	, comp+22*magic2-offset
	seq	comp+22*magic		, comp+22*magic2
	jmp	dec-1			, >dect
	sne	comp+28*magic-offset	, comp+28*magic2-offset
	seq	comp+28*magic		, comp+28*magic2
	jmp	dec-1			, {dect

	sne	comp+24*magic-offset	, comp+24*magic2-offset
	seq	comp+24*magic		, comp+24*magic2
	jmp	}triple			, >triple

	jmp	#0

triple	dat	#2		, #2
	dat	0		, 0
double	mul.x	-2		, comp

dec	mul.x	dect		, dect
	mod.f	dect-1		, dect
	mul.f	dect		, comp
comp	sne	magic		, magic2 ;find row
	sub.f	off		, comp

comp2	sne	empty		, @[EMAIL PROTECTED]
 ;find a/b-field
	mov.x	comp		, comp

	add.b	comp		, att ;set attack

	mov.i	bomb		, @[EMAIL PROTECTED]
 *comp-att
	sub     #-7             , att
	djn.b	-3		, #20
	jmp	#0

end qscan

I think its pretty neat, but the problem is the decoder... just too
large and slow... But the qscan is very easy to extend, instead of
doing the triple-trick I do in the middle, just add more scans jumping
to dec-2, and doing a triple-multiply.

I'm still pondering about a way to make the decoder smaller..
 




 8 Posts in Topic:
Slow quick scan ;]
"Lukasz Adamowski&qu  2008-02-18 17:31:20 
Re: Slow quick scan ;]
Roy <roy.van.rijn@[EMA  2008-02-18 14:37:33 
Re: Slow quick scan ;]
"Skybuck Flying"  2008-02-19 03:04:47 
Re: Slow quick scan ;]
"Skybuck Flying"  2008-02-19 03:22:20 
Re: Slow quick scan ;]
Roy <roy.van.rijn@[EMA  2008-02-18 18:40:02 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-19 06:27:01 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-19 06:34:19 
Re: Slow quick scan ;]
pauldkline@[EMAIL PROTECT  2008-02-27 07:22:54 

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 3:21:09 CDT 2008.