From news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!mozz.unh.edu!christa.unh.edu!cpa Mon Jan 22 11:58:55 1996 Article: 3605 of rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!mozz.unh.edu!christa.unh.edu!cpa From: Chris Arguin Newsgroups: rec.games.corewar Subject: SLT and PMARS.8 Date: Sat, 20 Jan 1996 21:47:56 -0500 Organization: University of New Hampshire - Durham, NH Lines: 45 Message-ID: NNTP-Posting-Host: christa.unh.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII WARNING: The code that follows is ugly. Keep in mind that I've only started this stuff a week ago. I'm sure it has plenty of bugs in it. I've been trying to write a bomber in PMars ver .8. According to the FAQ file that gets posted here, all address get converted to positive numbers, right? And right in the FAQ, it says something about how nothing is less than zero. I was orginially depending on that, and when my program still wasn't working correctly, I changed the instruction that wasn't working (an SLT) so that it would test against a zero. In Theory, it should never skip the next instruction, right? It did. The complete code is below: ;redcode-94 ;name Sample Bomber ;author Chris Arguin ;assert CORESIZE==8000 org start s dat #5333, #5333 ; Start in thirds, don't hit MY third start mov.i -1, 2666 ; Bomb Address add.ab #2666, start ; Get ready to hit next location slt #0, s ; If we aren't at about to kill ourselves jmp start ; Return to hit again div.ab #2, start ; Increase hitting area mov.ba start, start+1 ; Decrease Increment size mov.b start+2, 0 ; Get ready to calculate add.b start, -1 ; Find out maximum size mov.b -2, s ; Set the guard paramater mov.b start, -2 ; Reset a paramater exuent jmp start end Any clue? Am I misunderstanding something? -- Chris Arguin | "I realize, of course, that it's no shame to cpa@hopper.unh.edu | be poor... But it's no great honor either!" http://leonardo.sr.unh.edu/ | - The Fiddler on the Roof arguin/home.html |