ANNOUNCE: The One Page Assembler
Posted: Thu Apr 01, 2010 8:31 pm
Version 1.0 of The One Page Assembler, a symbolic cross assembler written in 256 bytes of 6502 assembly, has been released! You need only supply the input routine. (Merely waiting for a keypress and returning it the accumulator will suffice.) It can assemble itself from its own source code! Considering its size, the source code it assembles is surprisingly readable. For example, the ubiquitous Hello World program:
Features of The One Page Assembler:
Available separately are opcode tables for the NMOS 6502 and SWEET16 interpreter, a relocation utility for installing it on virtually any typical 6502-based system (and many exotic systems as well), a utility for processing a new "hex" file format more flexible than the Intel .hex and Motorola S-record formats, and a couple dozen bytes of bootstrapping code for installing all of these wonderful and exciting new utilities!
Install it now! You know you want to!
http://www.lowkey.comuf.com/
Code: Select all
10 @ 'BPL'
20 @ 'JSR'
60 @ 'RTS'
A2 @ 'LDX #'
B5 @ 'LDA ,X'
CA @ 'DEX'
F000 @ 'OUTPUT' (a system-dependent address, of course)
1000 @
'LDX #',11,
00* 'LDA ,X','STRING',,
'JSR','OUTPUT'
'DEX',
'BPL',00=<
'RTS'
'STRING';;
(DB) 21,64,6C,72,6F,47,20,69,48,20,20,21,6D,6F,4D,20,69,48
- Single pass assembly
- In-place: object code stored directly in memory
- "Global" (define once) and "local" (redefinable) labels
- Multiple origins
- Nestable commenting
- Free-form source code
- Fault-tolerant: unrecognized commands are ignored (consequently it doesn't bother you with any pesky error messages)
Available separately are opcode tables for the NMOS 6502 and SWEET16 interpreter, a relocation utility for installing it on virtually any typical 6502-based system (and many exotic systems as well), a utility for processing a new "hex" file format more flexible than the Intel .hex and Motorola S-record formats, and a couple dozen bytes of bootstrapping code for installing all of these wonderful and exciting new utilities!
Install it now! You know you want to!
http://www.lowkey.comuf.com/