KRUSADER
Ken's Rather Useless Symbolic Assembly Development Environment for the Replica 1
or is that "Reasonably Useful"? You decide!
Ken Wessen, Version 1.3, page last updated: August 14, 2009
KRUSADER is a program written to allow assembly language development on the
Replica 1 -- an Apple 1 clone
designed by Vince Briel, and described in the book
Apple 1 Replica Creation: Back to the Garage by Tom Owad.
KRUSADER includes a simple shell and editor, a single-pass symbolic assembler,
a disassembler, and an interactive debugger, and fits in just under 4K (so it is
small enough to fit in the 8K of Replica 1 ROM along with the monitor and Apple BASIC).
Although designed for the Replica 1/Apple 1, there is very little system dependent
code, and since full source code is provided, KRUSADER can easily be adapted
to any other 6502 based system.
However, its limitations may mean it is not an appropriate tool in many cases
(for example, it has no concept of a file-system and so would not be particularly
suitable for use on an Apple II).
KRUSADER can assemble for either the 6502 or the 65C02, and handles a fairly standard
and expressive syntax for its assembly source code.
For users who are unfamiliar with the 6502 instruction set, I recommend this
introduction by Andrew John Jacobs.
On a Replica 1, KRUSADER can assemble over 200 lines of code per second, and given
its 32K or RAM, the defaults provide space for up to 20K of tokenised source code,
8K of generated code, and up to 256 global symbols.
Downloads
- Assembler package - version 1.3 - includes source,
binaries and test code.
- Samples - some sample programs as both source text, and as
hex for upload to Krusader.
- Assembler package - version 1.2 - this is the version
released with the A-one.
- Assembler package - version 1.1 - this is the version
released with the Replica 1 SE.
- User Manual
- Tokeniser - C source and Windows executable for a program that
can translate fairly general 6502 assembly source into the tokenised form used by the
assembler. (This is an updated version that manages the different binary formats for tokenised source used
by the 6502 and 65C02 versions of the assembler.)
- Emulator - a modified version of the Pom 1 emulator for the Apple 1,
that correctly runs the assembler, and has a few extra features, such as pasting text and the ability to optionally.
emulate the 65C02 found in the Replica 1.
- The KRUSADER Toolkit (March 2009 prerelease version - some additional configuration options added)
The Krusader Toolkit is a 3 part software package, containing an assembly source editor, a terminal window and a Apple-1 emulator (requires a Java 1.5 runtime).
|
- Editor:
- The editor automatically formats source as required for Krusader, and lets you save it as text, or in the Krusader internal format as binary, Woz-monitor hex or Intel hex. It has some simple format validation as well. It is able to interpret some more general source formats automatically upon loading or pasting and converts them on the fly. You can run it connected to the Replica 1 serial port (either the built in one or using fsastrom's faster serial port) and it will transfer the source data between the computer and the editor. This feature can also be used to transfer the source directly to the built-in emulator where it can be assembled and tested before sending it to the actual computer.
- Terminal:
- This is a simple terminal pane for connecting to the Replica 1.
- Emulator:
- The core of the integrated emulator is based on my version of the Pom-1 emulator, but now you can scroll the window, and both copy and paste text,
as well as link directly to the associated editor.
|
Some Hardware Extensions
I have also built an add-on board for my Replica 1 to give it a number of additional features, such as a power switch and LED, fast (19.2k) serial I/O, sound, an IRQ interrupt button, 512K of Flash memory and 8 LEDs for blinkenlights.
Full details, including schematic, are available here.
Pictures
I have my Replica-1 connected up to an old Apple IIc monitor. As can be seen int he following pictures, there are some problems syncing, but it is pretty manageable. When I connect it up to a TV, the output is much improved. This first picture shows the listing of some assembly language source in Krusader.
And, after assembly, we can examine the assembled code using the in-built disassembler.
This particular program produces patterns based on Pascal's triangle, and is included in the assembler's sample code collection. Here is an example of the output.
And finally, here is a picture of my hardware - showing the wonderful "Happy Hacking" keyboard, and a simple EEPROM burner connected to the expansion interface.
Computer Collection