A251 User's GuideA251 Introduction Assembling Programs Environment Settings Command Prompt ERRORLEVEL Output Files Listing (LST) File Object (OBJ) File Conditional Assembly Directives Reference CASE COND DATE DEBUG DEFINE EJECT ELSE ELSEIF ENDIF ERRORPRINT FIXDRK GEN GENONLY IF INCDIR INCLUDE INTR2 LIST MACRO MODSRC MPL NOAMAKE NOCASE NOCOND NODEBUG NOERRORPRINT NOGEN NOLINES NOLIST NOMACRO NOMPL NOOBJECT NOPRINT NOREGISTERBANK NOSYMBOLS NOSYMLIST NOXREF OBJECT PAGELENGTH PAGEWIDTH PRINT REGISTERBANK REGUSE RESET RESTORE SAVE SET SYMBOLS SYMLIST TITLE XREF Writing Assembly Programs Control Statements Macro Processor Error Messages Appendix
Listing (LST) File
The assembler listing file contains an abundance of information about the assembly process and is composed of a number of sections, each of which is described below in the order in which they appear in the file.
Each listing page includes a header with the assembler version number, date, time, and page number.
A251 MACRO ASSEMBLER ASAMPLE3 05/19/2004 19:57:04 PAGE 1
The entire command line that was used to invoke the assembler is included in the listing file. This often helps diagnose problems with the command line.
MACRO ASSEMBLER A251 V3.52 OBJECT MODULE PLACED IN ASAMPLE3.OBJ ASSEMBLER INVOKED BY: C:\Keil_v5\C251\BIN\A251.EXE ASAMPLE3.A51 MODSRC >> GENONLY FIXDRK REGISTERBANK(0) SET(TINY) DEBUG XREF
The source code is listed along with the generated instruction opcodes.
LOC OBJ LINE SOURCE . . . 148 PUBLIC PUTCHAR 149 ------ 150 CHAR_ROUTINES SEGMENT CODE ------ 151 VAR2 SEGMENT DATA 152 ------ 153 RSEG CHAR_ROUTINES 154 155 ; This routine outputs a character. 156 ; The character is given in A. 000000 157 PUTCHAR: 000000 309900 F 158 JNB TI,$ 000003 C299 159 CLR TI 000005 F599 160 MOV SBUF,A 000007 22 161 RET 162 163 164 ; only for demonstration ------ 165 RSEG VAR2 000000 166 DUMMY: DS 40H 167 168 169 END
Several assembler directives give you flexible control over the details included in the assembler code listing.
The symbol table contains symbolic information obtained while assembling the source file. Included in the table are the symbol name, type, value, and any other attributes. You may use the NOSYMBOLS directive to disable symbol table generation.
SYMBOL TABLE LISTING ------ ----- ------- N A M E T Y P E V A L U E ATTRIBUTES CHAR_IO. . . . . . -- ---- ------- CHAR_ROUTINES. . . C SEG 000008H REL=UNIT, ALN=BYTE DUMMY. . . . . . . D ADDR 0000H R SEG=VAR2 PUTCHAR. . . . . . C ADDR 0000H R SEG=CHAR_ROUTINES VAR2 . . . . . . . D SEG 000040H REL=UNIT, ALN=BYTE
The following characters are used with the indicated type:
The following abbreviations are used with the indicated type:
The value listed is the address of the symbol (for addresses) or the size (for segments). An A following the address indicates the address is absolute or non-relocatable. An R following the address indicates the address is relocatable.
The XREF directive includes cross reference information in the symbol table.
XREF SYMBOL TABLE LISTING ---- ------ ----- ------- N A M E T Y P E V A L U E ATTRIBUTES / REFERENCES CHAR_IO. . . . . . -- ---- ------- 1 CHAR_ROUTINES. . . C SEG 000008H REL=UNIT, ALN=BYTE 150# 153 DUMMY. . . . . . . D ADDR 0000H R SEG=VAR2 166# PUTCHAR. . . . . . C ADDR 0000H R SEG=CHAR_ROUTINES 148 157# VAR2 . . . . . . . D SEG 000040H REL=UNIT, ALN=BYTE 151# 165
The REFERENCES column lists each line number where the specified symbol is accessed. Line numbers followed by the pound character ('#') are the line where the symbol is defined.
Space is reserved (by the linker) for the register banks used in the object module. The register banks used are listed as follows:
REGISTER BANK(S) USED: 0
Warnings and Errors
Problems encountered while assembling a program generate errors and warnings that are output to the screen and to the listing file.
ASSEMBLY COMPLETE. 0 WARNING(S), 0 ERROR(S)
of your data.