10
Section 1: General Information
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
1.4.1.
Definitions and Conventions
Before continuing, you should become familiar with the following terms and
conventions.
1.4.1.1. Sections
A section is the smallest portion of an object file that is relocated and able to be
positioned at an independent location in memory. In the default case, there are
three named sections with the names .text, .data, and .bss. In a Sierra Systems
executable file, there is also usually a fourth section with the name .ld_tbl.
TI-89 / TI-92 Plus apps and ASMs also have a .const section, and the .ld_tbl
section is unused. Additional named and unnamed sections, up to a total of 126,
can also be added.
1.4.1.2.
Physical and Virtual Addresses
The address of a section or symbol is the offset of that section or symbol from
address zero of the address space. The
physical address is the actual location in
memory where a section is loaded. The
virtual address of a section is the
address from which the section's data will execute. When a section's data has to
be copied from ROM to RAM at program startup, the ROM copy (source) of the
section's data is considered to be at the physical address and the RAM copy
(destination) of the section's data is considered to be at the virtual address. The
section header contains two address fields: a physical address and a virtual
address. In the case where a section's data gets copied from ROM to RAM, the
physical and virtual address entries will be different; but in the case where a
program executes out of ROM, the physical and virtual address entries for the
section's data will be the same.
1.4.1.3.
C Language COFF File Structures
The C language COFF file structures and macro definitions used internally by the
various Sierra Systems utilities that operate on object files are defined in the file
file_fmt.txt supplied with the TI-89 / TI-92 Plus SDK. Note that structure
members of type (unsigned) char, (unsigned) short, and (unsigned) long are
defined as unsigned char arrays of length 1, 2, and 4, respectively. The
structure members are represented as arrays of unsigned char to facilitate
generating identical object files on host machines with different internal byte
orderings. Machine-dependent macros for reading and writing the structures in
file_fmt.txt are defined in file com_fmt.txt, also supplied with the
TI-89 / TI-92 Plus SDK.