6
Assembling source code
An example program called “HELLO.ASM” is provided under the \EXAMPLE directory.
You can assemble your source code using command line tools under a DOS prompt by typing:
AS12 HELLO.ASM –LHELLO
Most compilers and assemblers allow many command line options so using a MAKE utility or
batch file is recommended if you use this method. Run AS12 without any arguments to see all
the options, or see the AS12.TXT file on the disk.
The programming utilities provided with this board also contain a simple interface to the free
assembler. Use it by selecting "Build" or “Assembler” from the menu. This will prompt you for
the file to be assembled.
DO NOT
use long path names (> 8 characters). The free assembler is an old DOS tool that
does not recognize them.
If there are no errors in your source code, 2 output files will be created:
HELLO.S19
a Motorola S-Record file that can be programmed into memory
HELLO.LST
a common listing file which shows the relationship between source
and output
The listing file is especially helpful to look at when debugging your program. If your program
has errors, they will be displayed and no output will be generated, otherwise the listing file will
be displayed.
If you prefer a windows integrated programming environment – try the Motorola MCU-EZ
tools. Refer to the MCU-EZ documentation on the disk for more information.
Also, a port for the free GNU C compiler and tools for the HC12 is in the works and may be
finished as you read this. Check www.axman.com or :
http://home.worldnet.fr/~stcarrez/m68hc11_port.html