GitXplorerGitXplorer
t

a51

public
13 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
1faf13ca4e2c5030575cc5cb7819d8bbf904ebb5

Include unistd.h if available

ttmikov committed 2 years ago
Unverified
734268d3606816a4fa9c0661b98a245c28920d67

objdump5/objdump.c: use strerror()

ttmikov committed 8 years ago
Unverified
4ada90a39f0660195e8d2d3e3013cba94f81227b

a51/generr.c: use fgets() instead of gets()

ttmikov committed 8 years ago
Unverified
daeb5bc48d044791616652a96c704eb2b69f5789

lib/common/debug.c: use strerror() instead of sys_errlist

ttmikov committed 8 years ago
Unverified
8f42b4f9db59bcaa2b8c039c1ff8a656879be741

objdump5: fix printf format bugs

ttmikov committed 10 years ago
Unverified
dbaac89b40b243d598c49c5208aa07bcd2ba6fa7

Check and configure for <malloc.h>

ttmikov committed 10 years ago

README

The README file for this repository.

= 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:


mkdir build cd build cmake -DGENERATE_SRC=0 .. make

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:


export BUILD=$PWD/build cd examples make

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