From liporati@brfree.com.br Wed Mar 7 18:44:39 2001 Date: Wed, 7 Mar 2001 10:49:21 -0500 (EST) From: Leonardo H. Liporati To: Multiple recipients of list COREWAR-L Subject: Re: faq "myndzi" wrote: >i was looking through the faq and i noticed an absence of some of the terms >i've been seeing around, i can't seem to find out what a 'd-clear' is or the >difference between a 'q^2' and a 'q^3' scanner (although from some of the >code i've seen i can just about figure it out anyway..) > [...snip...] David Moore´s prediction becomed true. ;-) The first beginner asks about the difference between q^2, q^3, q^4 ... q^n scanners. He, he, he. And as I am one of the people guilty in this case, let me try to explain. ;-) A quickscanner is composed of three pieces: (a) the scan phase; (b) the decision phase; (c) the attack phase. In (a) one CMP (SEQ) instruction or a pair of SNE/SEQ instructions are used to scan core locations. The idea is to attack ASAP the location where something is found. But as we have scanned many locations, in (b) we must decide which location (and its neighborhood) to attack (c). Two of the elements that make a quickscanner better than other are: 1-) The speed of pieces (a) and (b); 2-) The size of pieces (a) and (b). Original quickscanners (q^1???) used the sequence CMP/MOV to scan 2 locations and set a flag if something was found. After a few pairs of CMP/MOV, one JMN instruction were used to check if something was found by the previous CMPs. If YES the jump proceeded to the decode piece, which decided between two locations. This way besides (b) being compact and fast, (a) was long and very slow. Using proper choosen constants in the CMP instructions, field increments/decrements and ADD instructions in (b) is possible to jump directly after a CMP without the need to set a flag with MOV. This produced a quickscanner (q^2) that is much faster than the original. I, while still a beginner, observed that using MUL instead of ADD the decision phase of q^2 could be made still faster, with the help of John Metcalf we produced a quickscanner which we called q^3. David Moore devised that using MUL instruction plus specially choosen constants is possible to made a quickscanner with SNE/SEQ in scan phase that is more compact and still faster than q^3. David called his invention only a quickscanner and pointed out that giving the name q^n, incrementing n for each new (small) improvement is not a good idea and may cause confusion among beginners (which I agree). But, besides this, players often call David´s quickscanner as the q^4. If you are interested in quickscanners I suggest you first read and trace q^1 scanners. After progress to others in order. I started this way. As a beginner you may still trying to memorize the opcodes, familiarize with the circular core and the effects of field modifiers. Q^1 is simpler to understand because few field modifiers are used and no obscure modulo arithmetic is used. Bye, Leonardo. ------------------------------- http://www.brfree.com.br - O primeiro provedor gratuito do Brasil Estamos concorrendo ao iBest entre os TOP10 na categoria provedores de acesso VOTE AQUI: http://www.ibest.com.br/topten/topten.asp?IDSite^Q835&IDCategoria'&NomeSite^?free&Selo^?