Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!cmcl2!nrl-cmf!ukma!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!ubc-cs!alberta!calgary!maloff From: maloff@calgary.UUCP (Sheldon Maloff) Newsgroups: comp.sys.amiga Subject: Re: Core Wars for Amiga Summary: amiga corewars Keywords: can someone tell me where I can get it Message-ID: <1655@vaxb.calgary.UUCP> Date: 4 Jun 88 08:10:51 GMT References: <5605@bloom-beacon.MIT.EDU> Organization: U. of Calgary, Calgary, Ab. Lines: 82 In article <5605@bloom-beacon.MIT.EDU>, rlcarr@athena.mit.edu (Rich Carreiro) writes: > I just downloaded CoreWars 1.1w (Chad_the_Walrus's Amy port of the > 1984 Scientific American version of CoreWars). Any well stocked library will have a back issue. Unfortunately I just lent my copy out today so I don't know what month it was. In the article you could also send for a detailed description of its implementation for a few dollars (loonies in Canada). I recommend getting the article, it had some simple battle programs as examples and was fairly humorous and thought provoking. > So, what I would like is a desciption of each RedCode command does, > what operands it takes, and what addressing modes it uses (and what > they mean in the Redcode implementation.) Corewars pits two programs against each other in core. The supervisor program is called MARS. It loads the two programs into random places in core and the time-shares by excuting first one instruction of the first program, then one of the second, and so on. The first program that causes his enemy to cease operation (execute and illegal instruction) wins. There are only three instructions: (off the top of my head) (keep in mind everything is relative addressing, as the two battle programs are loaded by the system (MARS, I believe) and may never know their absolute location.) MOV x y - move the value located in memory at pc+x, to location pc+y (remember: pc is the program counter and you never know what it is) this is direct addressing mode MOV #x, y - move the value x, into location pc+y (immediate addressing) MOV @x, y - move the value located at pc+(pc+x), to pc+y (indirect addressing, as the location (pc+x) is taken to be an address to the actual location where the data is) JMP x - jump, transfer execution to location pc+x, (I believe JMP does not have any other addressing modes) Offsets may be positive or negative. The last one is DAT, stands for data, and this is where things go weird. In the article any memory location whose contents began with zero was considered to be data, meaning the other two instructions have op codes whose first digit are non-zero. This is where the article comes in handy since it describes the opcodes. Anything that is DAT by the way is an illegal instruction if it gets executed. If corewars is implemented properly it should have an assembler with it, which means you can try this small battle program, called Imp: MOV 0 1 It has the effect of copying the contents of location pc+0 to pc+1. The contents of pc+0 are the move instruction (with arguments) itself, so Imp simply moves through memory one location at a time. The ultimate goal of Imp is to walk over the enemy program and cause it to stop executing. This will never happen of course, since Imp simply turns the enemy program into a second imp (with some thought should be clear). The article is really helpful, but I hope this will wet your appetite. There was a follow up article exactly one year later on Core Wars also in Sci. American relating new developments and some competitions that were held. > Thanks in advance, > Rich > > ARPA: rlcarr@athena.mit.edu > UUCP: ...!mit-eddie!athena.mit.edu!rlcarr > BITNET: rlcarr%athena.mit.edu@mitvma.mit.edu Now my question, I've heard it was available, but where? is it on a Fish Disk? I'm itching to try it. || Sheldon ----========== \\ -----======|| || maloff@calgary.UUCP -----====== // Calgary, Alberta || || {ihnp4!alberta}!calgary!maloff -----== \\ Past Host of the || || .. eventually, we'll all be scaled by zero and ---= // '88 Winter Games || || converge upon the origin ... then we'll party! -= \\ ---==||