EasyManuals Logo

Texas Instruments TI-89 Software Guide

Texas Instruments TI-89
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #262 background imageLoading...
Page #262 background image
250
Section 3: Assembler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
OFFSET — Begin a Structure Template Section
Syntax
OFFSET [
address
]
Description
address
Specifies the base address of the section. It is an absolute
expression that cannot contain any forward, external, or undefined
references.
The
OFFSET
directive begins a structure template section. If
address
is
specified, the section begins at that address; otherwise, it begins at absolute
address zero. This type of section is used in conjunction with the
DS
directive to
define labels suitable for structure field references. These labels are not included
in the object file’s symbol table.
Since structure template sections are dummy sections, they cannot contain any
object code. Also, they cannot be nested; however, fields of a nested structure
can be treated as part of the enclosing structure. Any section directive will end a
structure template section.
Example
OFFSET ; struct node {
visited DS.B 1 ; char visited;
DS.W 0 ; struct position {
pos.x DS.B 2 ; short int x;
pos.y DS.B 2 ; short int y;
DS.W 0 ; } pos;
left DS.B 4 ; struct node *left;
right DS.B 4 ; struct node *right;
ORG $1000 ; };
MOVE.B #1,_n+visited ; n.visited = 1;
MOVEA.L _p,A0 ; p
−
>right = NULL;
CLR.L (right,A0) ;
This example illustrates how the
OFFSET
directive is used to define a set of
structure field labels. The
DS
directive is used to allocate space and maintain
proper alignment.

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals