| NSASM User Manual: COP8 Assembly Tools Documentation | ||
|---|---|---|
| Prev | Chapter 21. Examples | |
This is the same as the previous example except that the /h option was specified to display any normally "hidden" information.
The file header now shows additional information. It indicates the number of sections in the file and the number of symbols. It also shows some flags, which are described in the COFF manual.
The optional header is shown next. This is also described in the COFF manual. The only fields in the optional header used by the COP8 software are the magic number, the version number, and the starting address.
On the first line of each bank entry, some index numbers are shown. These are the starting and ending symbol table index numbers for the local and global symbols, respectively. The symbol table index numbers are shown in the symbol table display. The final number preceded by a # is the index number of the start of any line number entries for this bank. A minus one indicates no entries.
For the section display, there is some additional information shown such as "Flags." This is described in the COFF manual.
For the symbol table entries, each entry is now shown with its symbol table index number on the left of each entry. These values are in hexadecimal. An index number containing a "+" indicates that this entry contained an auxiliary symbol entry which took up the next entry. Hence the next index number is two larger.
There are some symbols shown in the symbol table, e.g., .bf and .ef, that did not appear in the previous example. These are assembler generated symbols used for debugging purposes. The use of these types of symbols are explained in the COFF manual.
File: sample1.cof
File Header
Creation Date: Aug 28 13:24:02 1992
Magic Number: COP8MAGIC (0542o)
Number of Sections: 2
Number of Symbols: 31
Size Of Optional Header: 40 (bytes)
Flags: RELFLG,EXEC,AR32WR
Optional Header
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 ........
===================================================================
Bank: SHARED index: 0x0/0x1b 0x1c/0x1e #0
ROM 0000:03FF
RAM 0000:002F
RAM REG
REG 00F0:00FB
REG 00FF:00FF
BASE 0000:000F
-- Sections --
start end attributes Section
Module
0000 0000 BASE BYTE DATA OTHERDATA
0000 0000 *SAMPLE1
0000 000B ROM BYTE CODE CODE
0000 0002 *SAMPLE2
0003 000B *SAMPLE1
00F0 00F0 REG BYTE DATA DATA
00F0 00F0 *SAMPLE2
0001 0001 RAM BYTE DATA MOREDATA
0001 0001 *SAMPLE2
Section: .BNKINFO
Paddr: 0x00000000, Vaddr: 0x00000000
Size of raw data: 0x0000017c
Flags: REG
No line number records
Raw Data:
00000000 00 00 00 00 38 32 30 20 20 20 20 20 00 00 00 00 ....820 ....
00000010 00 00 00 00 b2 01 00 00 00 00 00 00 f8 01 00 00 ....2.......x...
00000020 00 00 00 00 53 48 41 52 45 44 00 00 02 00 00 00 ....SHARED......
00000030 ff 03 03 00 00 00 2f 00 03 05 00 00 00 00 05 00 ....../.........
00000040 f0 00 fb 00 05 00 ff 00 ff 00 01 00 00 00 0f 00 p.{.............
00000050 ff 00 00 00 00 00 00 00 53 41 4d 50 4c 45 31 00 ........SAMPLE1.
00000060 53 41 4d 50 4c 45 32 00 4f 54 48 45 52 44 41 54 SAMPLE2.OTHERDAT
00000070 41 00 43 4f 44 45 00 44 41 54 41 00 4d 4f 52 45 A.CODE.DATA.MORE
00000080 44 41 54 41 00 00 00 00 04 01 00 00 11 01 00 00 DATA............
00000090 00 00 00 00 f4 00 00 00 00 00 00 00 07 00 00 00 ....t...........
000000a0 00 00 00 00 00 00 00 00 0e 01 00 00 0a 01 00 00 ................
000000b0 00 00 0b 00 fc 00 00 00 00 00 02 00 0b 00 f4 00 ....|.........t.
000000c0 00 00 03 00 0b 00 07 00 00 00 00 00 00 00 00 00 ................
000000d0 00 00 13 01 00 00 15 01 00 00 f0 00 f0 00 fc 00 ..........p.p.|.
000000e0 00 00 f0 00 f0 00 0b 00 00 00 00 00 00 00 00 00 ..p.p...........
000000f0 00 00 18 01 00 00 13 01 00 00 01 00 01 00 fc 00 ..............|.
00000100 00 00 01 00 01 00 0b 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 c0 00 00 00 c8 00 00 00 24 01 ......@...H...$.
00000120 00 00 00 00 00 00 00 00 00 00 1b 00 00 00 1c 00 ................
00000130 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 1c 00 00 00 ................
00000160 1c 00 00 00 ff ff ff ff ff ff ff ff ff ff ff ff ................
00000170 ff ff ff ff 1c 00 00 00 1d 00 00 00 ............
Section: .text
Paddr: 0x00000000, Vaddr: 0x00000000
Size of raw data: 0x0000000c
Flags: REG
Number of line number records: 8
Raw Data:
00000000 30 03 ff 9d f0 bd 01 84 bd 00 84 8e 0...p=..=...
Line Number Entries
Function: .sect_CODE_1
2 at address 0x00000003
3 at address 0x00000005
4 at address 0x00000008
5 at address 0x0000000b
Function: .sect_CODE_1
2 at address 0x00000000
3 at address 0x00000002
*** Symbol Table - Local Symbols
0:+ Bank: SHARED
2:+ File: sample1.asm
4:+ absolute static int .sect_CODE_1() with value 0x00000003
6:+ .bf with value 0x00000003
8:+ .bb with value 0x00000003
a:+ .eb with value 0x0000000c
c:+ .ef with value 0x0000000c
e: absolute static unsigned char basedata with value 0x00000000
f:+ File: sample2.asm
11:+ absolute static int .sect_CODE_1() with value 0x00000000
13:+ .bf with value 0x00000000
15:+ .bb with value 0x00000000
17:+ .eb with value 0x00000003
19:+ .ef with value 0x00000003
1b: label start at address 0x00000000
*** Symbol Table - Global Symbols
Bank: SHARED
1c: absolute extern unsigned char regdata with value 0x000000f0
1d: absolute extern unsigned char ramdata with value 0x00000001
1e: label p1 at address 0x00000003