Article View: rec.games.corewar
Article #227RE: DAT 0, 0 vs DAT #0, #0
From: Mark Allen Durham
Date: Fri, 02 Oct 1992 11:00
Date: Fri, 02 Oct 1992 11:00
27 lines
1729 bytes
1729 bytes
RE: Is it DAT 0, 0 or DAT #0, #0? How do I compare to core? Under ICWS'88 rules, core is initialized to DAT 0, 0. This is an "illegal" instruction under ICWS'88 and strictly compliant assemblers (such as KotH) will not let you write a DAT 0, 0 instruction - only DAT #0, #0. The MADgic Core assembler - ASR - is not strictly compliant in that it allows all grammatically-correct instructions and does not flag any so called "illegal" instructions. It is left up to the programmer not to use illegal instructions when developing code for KotH or ICWS tournaments. On the other hand, if you want to experiment with MOV #a, #b you can do so. This feature merely reflects my bias against illegal instructions. So the question is "How to compare instructions to see if one is empty core?". The answer is, most likely the instruction before your first instruction and/or the instruction after your last instruction are both DAT 0, 0. You can use them, or any other likely unmodified instructions, for comparisons. In fact, in KotH, if the number of instructions in your program is N, all of the instructions from N to 99 (relative to your first instruction at location 0) are guaranteed to be DAT 0, 0 at the beginning of the battle. This is because KotH allots 100 instructions to your warrior, whether you use all 100 or not, and guarantees warriors will not overlap. Mark A. Durham MAD
Technical Details
Message-ID:
<67052@cup.portal.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!portal!cup.portal.com!durhamShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!portal!cup.portal.com!durham From: durham@cup.portal.com (Mark Allen Durham) Newsgroups: rec.games.corewar Subject: RE: DAT 0, 0 vs DAT #0, #0 Message-ID: <67052@cup.portal.com> Date: Fri, 2 Oct 92 04:00:40 PDT Organization: The Portal System (TM) Distribution: world Lines: 27