Some of you may remember a couple of my earlier threads asking for some programming advice, well, building this assembler was the reason. I bought one of Vince Briel's Replica 1 kits earlier this year, and wanted to be able to program it in assembly language directly. So I taught myself 6502 assembly (previously I only knew 68K assembly), and proceeded to write an assembler. I have to admit to being a bit nervous presenting my work to the experts on this forum
, but here it is:
http://school.anhb.uwa.edu.au/personalpages/kwessen/apple1/Krusader.htm
In brief, it is a single pass symbolic assembler with an integrated shell, editor, disassembler and debugger/monitor - and it fits in the 3840 free bytes of the Replica 1 ROM. A detailed user manual is provided, as is some self-testing code and various bits of sample code. Although it is was built for a Replica 1, it would be easy to adapt to other simple 6502-based systems.
Full annotated source code is included. It contains a couple of routines from
www.6502.org - from the memory move sample, and from bogax and leeeeee from my earlier threads. The disassembler is based on an old Dr Dobbs article by Steve Wozniak and Alan Baum, and the single step function in the debugger/monitor is based on both the Apple II monitor single stepper and also an article from an issue of Apple Assembly Line. However, the vast majority of the code is mine, and because I learned so much in the process of writing this, my later code is of a much higher standard than my earlier code!
I have extensively revised the code, and the emphasis has been almost completely on size, since I have so little space to work in. This has led to some compromises in code structure and general cleanliness, but I think it still retains quite a good degree of clarity.
Please have a look and try it out if you are interested. The source will run in the Pom 1 Apple 1 emulator (download the bug-fixed version from my site) or in Michal Kowalski's 6502 simulator (set APPLE1 = 0). I would be delighted to hear any suggestions for changes and/or improvements.
Thanks,
Ken