Article View: rec.games.corewar
Article #198Re: Max DAT Value
From: Kent Peterson
Date: Fri, 06 Nov 1992 23:31
Date: Fri, 06 Nov 1992 23:31
29 lines
1901 bytes
1901 bytes
In <+|#@byu.edu> $dougn@sasb.byu.edu writes: > Hi there, fellow warriors! Hi. > What is the maximum value a DAT can hold? The size of the core minus one. Therefore, this will vary depending on what coresize you're playing with - for example in a coresize of 8192, the maximum value would be 8191, and in a coresize of 8000, the maximum value would be 7999. These would both be treated as -1 for all practical purposes. However, this does not mean that you cannot add a number to this value; the result will be the remainder gotten after division by the coresize. For instance, adding 456 to 7999 in a coresize of 8000 would give you 8455, which gets turned into 455. > Also, what > does DAT #0, #0 do? (How can a DAT hold two values?) It doesn't do anything, except kill any process that tries to execute it. DATs have A- and B-fields just like all other Redcode instructions, however "ADD #x, y", "SUB #x, y", and pre-decrement only change the B-field. To change the A-field, you need to add or subtract an entire instruction to the DAT, like "ADD x, y" or "SUB x, y". Also, indirect addressing uses only the B-field. For these reasons, when DATs are used as pointers, it is often easier to use only the B-field and ignore the A-field. Kent Peterson
Technical Details
Message-ID:
<1992Nov6.183106.2476@drycas.club.cc.cmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!drycas.club.cc.cmu.edu!drycas.club.cc.cmu.edu!newsReferences:
<+|#@byu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!drycas.club.cc.cmu.edu!drycas.club.cc.cmu.edu!news Newsgroups: rec.games.corewar Subject: Re: Max DAT Value Message-ID: <1992Nov6.183106.2476@drycas.club.cc.cmu.edu> From: KENT@dirac.physics.jmu.edu (Kent Peterson) Date: 6 Nov 92 18:31:05 -0500 References: <+|#@byu.edu> Distribution: world Organization: JMU Physics Dept. Nntp-Posting-Host: dirac.physics.jmu.edu X-News-Reader: VMS NEWS 1.24 In-Reply-To: $dougn@sasb.byu.edu's message of 5 Nov 92 23:58:33 GMT Lines: 30