“FF Bombs” competition

In CSC 387 Foundations of Computer Science, we were offered an extra-credit assignment to form teams of two students, and develop programs for a game called FF Bombs, which is similar to Core Wars.  The programs need to run on a simulator for the sample architecture defined in Appendix C of Brookshear’s Computer Science: An Overview, 9th Edition.  (Note that the simulator includes extensions beyond Appendix C, and the competition rules do not allow use of those instructions.)

I teamed up with Luke, and I think we’ve got a good entry.  I think there are only two other teams.  Today is the due date for the program; I’m looking forward to finding out the competition results, and comparing programs with the other students.

The textbook suggests as an exercise writing a program that copies itself to a different memory location and jumps to the copy, which would then repeat that process.  It is challenging to write such a program for the Appendix C machine because it only has absolute addressing.  The program has to be modified as it is copied, or after it is copied, so that loads, stores, and jumps use the new addresses.  My first attempt used the extra instructions available in the simulator, before I was told that they were not allowed.  Without those instructions, it was a much harder problem, but I have a working program.

This entry was posted in Computer Science. Bookmark the permalink.

Leave a Reply