Source Listing Example. Freescale Semiconductor sc100
Oglas
Oglas
Freescale Semiconductor, Inc.
SC_Assem.book Page 41 Thursday, September 23, 2004 10:44 AM
SC100 Assembler
Source Listing
According to its default setting, the assembler sends the source listing to the standard output. Options are:
• Sending the source listing to a printer, file, null device, or other such arbitrary destination. For this option, use the I/O redirection facilities of the host operating system.
• Sending the source listing to an argument file of the -l command-line option. If the
-l
option lacks an argument file, the assembler creates a source listing. To name this listing, the assembler adds the .lst extension to the name of the first source file in the command line.
• Inhibiting the source listing, by using the
IL
(inhibit listing) option.
Note that the -b and -l command-line options allow a hyphen as an argument: this directs the corresponding output to the standard output stream. But unpredictable results may occur if your settings send both the object file and the source listing to the same output stream.
The assembler always sends error messages to the standard output, regardless of option settings.
Source Listing Example
Figure 2.2 shows an example source listing. Text immediately after the figure explains areas of interest:
SC100 Assembler User Guide
For More Information: www.freescale.com
41
Freescale Semiconductor, Inc.
SC_Assem.book Page 42 Thursday, September 23, 2004 10:44 AM
SC100 Assembler
Source Listing
Figure 2.2 Assembler Source Listing
Banner
Title
Subtitle
StarCore 100 Assembler Version 6.5.1 spec 0.63 01-05-02 15:31:59 vittbak.asm Page 1
Viterbi Traceback
1 opt cex,mex,mu,svo ; set assembler options
2 page 132,42,0,0,0 ; set listing dimensions
4
5 SIMSETUP macro args
6 m org p:args
7 m DEC_STOR dcb $00,$01,$02,$03,$04,$05,$06,$07
8 m dcb $08,$09,$0a,$0b,$0c,$0d,$0e,$0f
17 m ds 100
18 m ENDM
19
25 SIMSETUP $150
26 + P:00000150 org p:$150
27 d+ P:00000150 00 DEC_STOR dcb $00,$01,$02,$03,$04,$05,$06,$07
d 01
d 02
d 03
d 04
d 05
d 06
d 07
28 d+ P:00000158 08 dcb $08,$09,$0a,$0b,$0c,$0d,$0e,$0f
d 09
0A
1. Line #
2. Indicator 3. Address 4. Location
Counter
5. Statement
Error
51 P:00000212 6D deceq d0 ; adjust value for loop count
64
**** 52 [vittbak.asm 40]: ERROR --- Duplicate destinations in paired instructions.
52 P:00000214 63 [ asrr #3,d0 tfr d0,d1 move.w #5,d0 ]
3C
D0
Message
Counts
1 Errors
0 Warnings
Areas of interest are:
• Banner — The first line of each page. The banner consists of the assembler and version number, the date and time of assembly, the source file name, and the listing page number.
• Titles — Line 2 displays the title and line 3 displays the subtitle, provided that you have defined these titles. (Use the TITLE and STITLE directives.) If you have not defined titles, these lines are blank.
• Line number — The first field of source listing lines shows the line number.
42 SC100 Assembler User Guide
For More Information: www.freescale.com
Preuzimanje
Oglas