Article View: rec.games.corewar
Article #244Re: WARNING :: Bug in CoreWarsDeluxe
From: William Shubert
Date: Tue, 13 Oct 1992 22:52
Date: Tue, 13 Oct 1992 22:52
27 lines
1819 bytes
1819 bytes
gt7804b@prism.gatech.EDU (Wayne Edward Sheppard) noticed: >I have just found a bug in CoreWarsDeluxe for the PC. It involves >the MOV ADD and SUB commands when using predecrement in the B-field. >Here's how I found it: > > mov 2,<2 > jmp -1 > dat #1 > >What happens is when CWD reads the A field, it goes ahead and grabs >a copy of what it is going to move. Then if the B field decrements >that same instruction, the mov works as normal except that it uses >the copy of the instruction that has not been decremented. This is not a bug. The specification for corewar is very vague; it simply states that the a-field is interpreted first, then the b-field. However, it does NOT say whether "interpreted" means that the address is calculated, that the value is actually read in, or what. Both CoreWarsDeluxe and KotH use "in-register" evaluation; that is, when the a-field is interpreted, the value is read into an internal register of the MARS and stored. Then the b-field is read in. The result is calculated and written back. I think I remember Mark Durham saying that the latest version of MADgic corewar has a switch where you can select between "in-register" evaluation (such as above) and "in-memory" evaluation (which you apparently expected to see). -Bill (wms@iwarp.intel.com)
Technical Details
Message-ID:
<1992Oct13.225240.22358@iWarp.intel.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!eff!iWarp.intel.com|wmsReferences:
<71121@hydra.gatech.EDU>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.corewar Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!sol.ctr.columbia.edu!eff!iWarp.intel.com|wms From: wms@ssd.intel.com (William Shubert) Subject: Re: WARNING :: Bug in CoreWarsDeluxe Message-ID: <1992Oct13.225240.22358@iWarp.intel.com> Sender: news@iWarp.intel.com Nntp-Posting-Host: e26.iwarp.intel.com Organization: Supercomputer Systems Division (SSD), Intel References: <71121@hydra.gatech.EDU> Date: Tue, 13 Oct 1992 22:52:40 GMT Lines: 27