Since I began computing the machine language was my main interest. OK, it was around 1980 and for hobbyists there was nothing else... I wrote my first useable assembler as a tool for my dissertation. Later came some derivatives.
Looking back to the work in the early nineties I decided to write an universal assembler. The destination language was defined in a table which could be created by the users. But I never reached the stage of real linking - all versions assembled absolute code.
I now recommend to use ASxxxx. It's not so simple to create an assembler for another CPU but it has a real linker. The author works on it - that's the best message. But if you need an assembler for a machine for which none exists, try A²!
a2.zip ZIP with Selfextracting archive with program, tables, and doc, 131KB.
Please read the documents supplied with the program. There is a main text describing the common aspects and a text for every table. Additionally there's a description how to generate new tables. Tables added are for: RCA 1802, Rockwell 6502, Intel 8080, Intel 8085, Zilog Z80, Hitachi HD64180, Motorola 6800, Intel 8048, Intel 8051, SGS Thomson ST6, and NEC 78K3.
You call the assembler with some arguments on the command line. The source code will be tokenized (the tokens can be saved and read back), symbols are allocated, and binary code is generated. You'll get a listing if you wish. The assembler makes as many passes as are necessary to do to resolve all expressions. If you save tokenized files and create a main source which includes them, you have a kind of linking behaviour.
Back to my home page.
Comments and such stuff go to: email@example.com