Sample code for Krusader

2 posts / 0 new
Last post
Offline
Last seen: 3 years 8 months ago
Joined: Jun 22 2005 - 21:06
Posts: 48
Sample code for Krusader

(This is a copy of a post I just made over at the Replica 1 forums. I am cross-posting it since some of you here may also be interested.)

I have just made some changes to the Krusader sample code available at http://school.anhb.uwa.edu.au/personalpages/kwessen/apple1/krusader.htm. Included in the samples.zip download are source and assembled versions of the games NIM, Microchess, Mastermind, Sum to 100, and PasArt (and there's also a little 16 bit checksum utility). The most important change is that all these games now have their entry point as their first address - much easier to remember, and they also all terminate on hitting escape.

I always run these from within the Krusader environment - I use it like a shell, so the RTS at the end of the games returns me to the shell. Also, for debugging it is easy to assemble in a BRK and look at what's going on under the hood.

Two other programs are included - SourceManager and ProgramManager. I use these to manage the source and assembled code for these programs, and have included their source, and also their code assembled to run from $A000. That's because I use an EEPROM at $A000-BFFF for storage. I just put in the chip with one of these programs, and type R $A000 from the Krusader shell, and it gives me a menu that can be used to load the source for the selected game into the assembler (SourceManager) or the game into memory (ProgramManager). I find it quite handy (though unfortunately the MicroChess source is too large to manage this way).

Ken

Offline
Last seen: 3 years 8 months ago
Joined: Jun 22 2005 - 21:06
Posts: 48
I thought I should also add a

I thought I should also add a quick description. NIM, MicroChess and Mastermind are all well known games. Sum to 100 is just a player and computer taking it in turns to add a number between 1 and 10 (inclusive) to a running sum, the winner being the player who makes the sum equal 100 exactly. PasArt is the latest addition to the samples, and is described here: http://www.brielcomputers.com/phpBB2/viewtopic.php?t=185

Ken

Log in or register to post comments