30
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
ImageCraft Assembler
3.1.5
Directives
An assembler directive is used to tell the ImageCraft Assembler to take some action during the
assembly process. Directives are not understood by the M8C microcontroller. As such, directives
allow the firmware writer to create code that is easier to maintain. See the
for more information on directives.
3.2
Listing File Format
A
<project name>.lst
file is created each time the ImageCraft Assembler completes without
errors or warnings. The list file may be used to understand how the Assembler has converted the
source code into machine code.
The two lines below represent typical lines found in a listing file. Lines that begin with a four-digit
number in parentheses (“( )”) are source file lines. The number in parentheses is the source file line
number. The text following the right parenthesis is the exact text from the source file. The second
line in the example below begins with a four-digit number followed by a colon. This four-digit number
indicates the ROM address for the first machine code byte that follows the colon. In this example, the
two hexadecimal numbers that follow the colon are two bytes that form the
MOV A, 74
instruction.
Notice that the ImageCraft Assembler converts the constants used in the source file to decimal
values and that the machine code is always show in hexadecimal. In this case the source code
expressed the constant as an octal value (0112), the Assembler represented the same value in
decimal (74), and the machine code uses hexadecimal (4A)
.
3.3
Map File Format
A <project name>.mp file is created each time the ImageCraft Assembler completes without errors
or warnings.
The map file documents where the Assembler has placed areas defined by the AREA assembler
directive and lists the values of global labels (also called global symbols).
The "__data_start" label shows the starting address of the RAM variables. InterruptRAM variables
may overlap the "__data_start" label because "__data_start" is only used as a label by the compiler.
3.4
ROM File Format
A
<project name>.rom
file is created each time the ImageCraft Assembler completes without
errors or warnings. This file is provided as an alternative to the Intel HEX file that is also created by
the Assembler. The ROM file does not contain the user-defined protection settings for the Flash or
the fill value used to initialize unused portions of Flash after the end of user code.
The ROM file is a simple text file with eight columns of data delimited by spaces. The example below
is a complete ROM file for a 47-byte program. The ROM file does not contain any information about
where the data should be located in Flash. By convention, the data in the ROM file starts at address
Example LST File:
(0014)
mov
A,
0112
; Octal constant
01AF: 50 4A MOV A,74
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...