Motorola HC12 User Manual

Page 195

Advertising
background image

Assembler Directives

OFFSET — Create Absolute Symbols

MCUez HC12 Assembler

User’s Manual

MOTOROLA

Assembler Directives

195

Example:

7 7

ConstSec: SECTION

8 8

000000 11

cst1:

DC.B $11

9 9

000001 11

cst2:

DC.B $13

10 10

11 11

OFFSET 0

12 12

000000

ID:

DS.B 1

13 13

000001

COUNT:

DS.W 1

14 14

000003

VALUE:

DS.L 1

15 15

0000 0007

SIZE:

EQU *

16 16

17 17

000002 22

cst3:

DC.B $22

In the previous example, the symbol

cst3

, defined after the

OFFSET

directive, defines a constant byte value. This symbol

is appended to the section

ConstSec

, which precedes the

OFFSET

directive.

Advertising