- Core Wars
- 15 Mar 2012 12:43:26 am
- Last edited by builderboy2005 on 15 Mar 2012 01:10:10 am; edited 1 time in total
A few weeks ago a friend in my math class introduced me to the game Core Wars, and I immediately decided to port it to the calculator! Core Wars is a two player competitive game, featuring a unique type of gameplay. The two contestants must each write a program in Redcode, which is the programming language of this game. Each program is then inserted into a section of memory called the Core. If either program stops executing, that player loses. Of course it is simple to make a program that never terminates when left on its own, the tricky part is that both programs live in the same memory (the Core) and so can influence each other. The programs must try to find their opposing program and sabotage and destroy it in order to halt it's execution. It's the greatest battle of a programmers ingenuity, as they pit their own programs to destroy others in The Core!
The language RedCode is assembly-line in nature, and features a very small set of instructions. These instructions do, however, have a fair number of variations due to different addressing modes for different arguments, and different modes for each of the instructions. I have detailed some of the syntax changes in the Readme, but for a detailed tutorial on the basics of Redcode, you can check out This online page. Some of the more notable features of Redcode are relative addressing, as well as a circularly mapped memory for the Core.
You can download the Core Wars app and other files Here, although note that this is the first version, and since the app contains both an assembler and an interpreter for Redcode, there is likely going to be a bug or two that I didn't catch Nevertheless, feel free to try it out! The app also comes with a built-in debugger so you can test your programs in a less hostile environment.
The language RedCode is assembly-line in nature, and features a very small set of instructions. These instructions do, however, have a fair number of variations due to different addressing modes for different arguments, and different modes for each of the instructions. I have detailed some of the syntax changes in the Readme, but for a detailed tutorial on the basics of Redcode, you can check out This online page. Some of the more notable features of Redcode are relative addressing, as well as a circularly mapped memory for the Core.
You can download the Core Wars app and other files Here, although note that this is the first version, and since the app contains both an assembler and an interpreter for Redcode, there is likely going to be a bug or two that I didn't catch Nevertheless, feel free to try it out! The app also comes with a built-in debugger so you can test your programs in a less hostile environment.