Article 748 of rec.games.corewar: From: ScottNelson@cup.portal.com (Scott - Nelson) Newsgroups: rec.games.corewar Subject: Re: Binary Subdivision bombing Message-ID: <57559@cup.portal.com> Date: Fri, 17 Apr 92 23:27:43 PDT Organization: The Portal System (TM) References: <1992Apr12.233751.8607@mintaka.lcs.mit.edu> Lines: 86 First let me point out that if you want post-increment, you can always do it in two instructions (MOV @stack,b ADD #1,stack). Here is a single-process bomber that bombs with a "binary subdivision". ---- cut ----- ; ;name Binary bomber ; ; basic bomber loop mov bomb, @offsets l2 add @i1, @loop djn loop, @i2 ; now change the parameters add #1, loop add #1, i1 add #1, i2 jmp loop ; i1 dat addvals i2 dat counts ;the table of add values addvals dat #0 dat #4096 dat #2048 dat #1024 dat #512 dat #256 dat #128 dat #64 dat #32 dat #16 dat #8 dat #4 dat #2 ;the table of counts counts dat #1 dat #2 dat #4 dat #8 dat #16 dat #32-1 dat #64-2 dat #128-4 dat #256-8 dat #512-15 dat #1024-30 dat #2048-60 dat #4096-120 ;the table of offsets offsets dat #bomb+4096 dat #bomb+2048 dat #bomb+1024 dat #bomb+512 dat #bomb+256 dat #bomb+128 dat #bomb+64 dat #bomb+32 dat #bomb+16 dat #bomb+8 dat #bomb+4 dat #bomb+2 dat #bomb+1 ; bomb dat #0 ---- end cut ----- Subdividing core in this manor can also be accomplished by having one dwarf for each step size. This is not as bad as it sounds, eleven dwarves, and three mov's accomplish the whole task. (It is actually shorter than "Binary bomber") I suspect that even a perfect binary subdivision program would not perform very well, because of the large tables needed. Until some sort of division instruction exists, I think binary subdividers will take a back seat to the "optima" style of bombing. |+--------------------------------------------------------------+| Half a bee, philosophically, must ipso facto, half not be. <<>>