From news Thu Oct 19 19:23:08 1995 Received: (from news@localhost) by valhalla.stormking.com (8.6.12/8.6.12) with UUCP id TAA14386 for cbx.rec.games.corewar; Thu, 19 Oct 1995 19:20:20 -0400 Path: news.stormking.com!news2.new-york.net!spcuna!news.wctc.net!chi-news.cic.net!newsfeed.internetmci.com!usenet.eel.ufl.edu!socrates.moe.ac.sg!raffles.technet.sg!nuscc.nus.sg!lohwengk From: lohwengk@iscs.nus.sg (Loh Weng Keong Calvin) Newsgroups: rec.games.corewar Subject: [help] Analysis of Code Date: 17 Oct 1995 05:09:32 GMT Organization: National University of Singapore Lines: 27 Message-ID: <45vdqc$hti@nuscc.nus.sg> NNTP-Posting-Host: lohwengk@sununx.iscs.nus.sg X-Newsreader: TIN [version 1.2 PL2] Apparently-To: cbx.rec.games.corewar Please tell me if this piece of code works. TIA. ;redcode-b ;assert 8000 ;name WindMill3 ;author Calvin Loh ;strategy Scans for enemy code, then bombs them. start dat #1, #1 step1 dat #6, #4006 step2 dat #2004, #6004 bomb1 mov step1, *step1 mov step1, @step1 jmp scan2 bomb2 mov step2, *step2 mov step2, @step2 jmp launch scan1 cmp }step1, >step1 jmp bomb1 scan2 cmp }step2, }step2 jmp bomb2 launch djn scan1, #1988 clear mov start, >start end scan1 -- Calvin Loh From tuc Fri Oct 20 05:38:09 1995 Received: from ifm.liu.se (root@ifm.liu.se [130.236.160.6]) by valhalla.stormking.com (8.6.12/8.6.12) with ESMTP id FAA21767 for ; Fri, 20 Oct 1995 05:38:02 -0400 Received: from bottom.ifm.liu.se (bottom.ifm.liu.se [130.236.162.17]) by ifm.liu.se (8.6.9/8.6.9) with ESMTP id KAA17638 for ; Fri, 20 Oct 1995 10:10:18 +0100 From: Magnus Paulsson Received: (mapau@localhost) by bottom.ifm.liu.se (8.6.9/8.6.9) id KAA02081 for corewar-l@stormking.com; Fri, 20 Oct 1995 10:10:16 +0100 Date: Fri, 20 Oct 1995 10:10:16 +0100 Message-Id: <199510200910.KAA02081@bottom.ifm.liu.se> To: corewar-l@stormking.com X-Sun-Charset: US-ASCII > From corewar-l@stormking.com Fri Oct 20 00:50:05 1995 > Date: Thu, 19 Oct 1995 19:40:30 -0400 > Originator: corewar-l@stormking.com > From: lohwengk@iscs.nus.sg (Loh Weng Keong Calvin) > To: Multiple recipients of list > Subject: [help] Analysis of Code > X-Listprocessor-Version: 6.0b -- ListProcessor by Anastasios Kotsikonas > X-Comment: Usenet News "rec.games.corewar" > > > Please tell me if this piece of code works. TIA. > > ;redcode-b > ;assert 8000 > ;name WindMill3 > ;author Calvin Loh > ;strategy Scans for enemy code, then bombs them. > start dat #1, #1 > step1 dat #6, #4006 > step2 dat #2004, #6004 > bomb1 mov step1, *step1 > mov step1, @step1 > jmp scan2 > bomb2 mov step2, *step2 > mov step2, @step2 > jmp launch > scan1 cmp }step1, >step1 > jmp bomb1 > scan2 cmp }step2, }step2 > jmp bomb2 > launch djn scan1, #1988 > clear mov start, >start > end scan1 > > -- > Calvin Loh > You should try out the debugger in pmars ! (it's described in the man pages that come with pmars (maybee not if you have MacPmars)) start dat #1, #1 ;this line doesn't do much! step1 dat #clear+1,#clear+4001 ;6 ? that would be in your own code step2 dat #clear+2001,#clear+6001 ; bomb1 mov.i step1, *step1 mov.i step1, @step1 jmp scan2 bomb2 mov.i step2, *step2 mov.i step2, @step2 jmp launch scan1 seq.i }step1, >step1 ;use sne/seq (skip if not equal/skip if equal) much clearer what it does jmp bomb1 scan2 seq.i }step2, }step2 jmp bomb2 launch djn scan1, #1900 ;changed to make sure it doesn't selfbomb (you can probably increase this) spl #0,#0 ;make sure you don't die clear mov start,