= README Tzvetan Mikov tmikov@gmail.com
== a51
- +a51+ is a portable assembler for 8051, written in C.
- +link51+ is the companion linker capable of producing .bin and .hex files.
- +objdump5+ decodes an object file into human-readable form.
== Building
+a51+ builds under Linux and Windows using CMake. It can also be built for DOS with Borland C 3.1 and Borland Make.
The build produces several executables:
- +a51+ is the assembler.
- +link51+ is the linker
- +mlink+ is a minilinker used to test the assembler - it produces a usable binary from a single object file.
- +objdump5+ is self explanatory
=== Linux and Windows
You will need +CMake+ 2.6 or later. +Bison+ is optionally required for generating the parser, but a pre-generated parser is included in the source.
To build, enter the project directory and execute the following commands:
To re-generate the Bison parser (and other internal tables), change the +cmake+ command line above to +-DGENERATE_SRC=1+.
On Windows, omit the last +make+. CMake on Windows generates a Visual Studio project file, which can be open it with Visual Studio and built normally normally from there. CMake can also generate an +NMake+ makefile and other formats (see the CMake documentation).
=== DOS
The source includes makefiles for Borland C 3.1 for DOS. They will likely also work with different Borland C versions, but as of this writing have only been tested with that version (inside DOSBOX).
To build, enter the project directory. Examine and possibly change +lib/common/makefile.bc+ - it contains a reference to the installation directory of Borland C, which may be different. Then execute the following commands:
cd lib/common make -f makefile.bc cd .. cd mlink make -f makefile.bc cd .. cd a51 make -f makefile.bc cd .. cd link51 make -f makefile.bc
The option to re-generate the parser and other tables has been disabled in the DOS build because of practical inability to test it. It requires installing DJGPP and Bison for DOS, which goes beyond this author's pain threshold.
+objdump51+ can easily be compiled for DOS, but at this time there is no makefile.
== Assembling The Examples
The directory +examples/+ contains simple examples to demonstrate the usage of the assembler and linker. There is a GNU Makefile to assemble and link them. It needs the variable +BUILD+ to point to the project build directory.
From the project root:
On non-Unix OSes the examples can be assembled manually by directly invocing +a51+ and +link51+.
== License
- +link51+ is licensed under BSD 3-clause license. See LICENSE-BSD
- Everything else is licensed under GPL v2. See LICENSE-GPLv2
Copyright (c) 1997-2014 Tzvetan Mikov tmikov@gmail.com
Copyright (c) 1997 Petar Marinov efravia@gmail.com