Chapter 5. MC14500 assembler and disassembler

The assembler and disassembler have been written using python3.

mc14500.py --help or mc14500.py -h will show all the command line options for the assembler.

mc14500dis.py --help or mc14500dis.py -h will show all the command line options for the disassembler.

mc14500gui.py is a gui for both the assembler and disassembler

Figure 5.1. MC14500 Gui

MC14500 Gui


The following file extensions are used:

Table 5.1. assembler disassembler file extensions

ASM Assembly file
DIS Assembly file produced by the disassembler. It uses an other extension to not accidentally overwrite assembly files
LST List file


Important

The following options need to be adjusted to the hardware implementation.

  1. ilsb defines where the 4bit MC14500 instruction is located in the command.

  2. bigendian defines that the program memory uses big endian. Default is little endian. This is important if more than one address is required for a command.

  3. iowidth defines the number of IO-address lines

  4. pcwidth defines the width of the program counter that is equal to the number of program memory address lines

Important

All numbers for IO-addresses and program counters are interpreted as hexadecimal

As alternative to adjust the hardware using command line parameters the adjustments can be done in the ASM file:

OPT  ILSB
OPT  PCwidth 8
OPT  IOwidth 10

Aliases can be assigned to IO addresses or other aliases

    RR     EQU 000  Pin RR is wired to input 0
IN0    EQU RR
IN1    EQU 001

Lines containing comments and not being assembled have to start with the * character

* this is a comment line

Files can be included by using the filename without file extension. Possible file extensions are: ASM, INI, INC. The init.asm can be included as

INIT

The ORG command has been implemented for backward reasons. It allows to set the program counter and have instruction placed on defined locations in the program memory. Since almost every MC14500 design can not jump over memory addresses it makes no sense to use it and it has the potential danger that the program memory can overlap and undefined holes are created. Depending on the output format certain checks are performed that can create warnings and errors.


Linurs Servernest startpage