153/317
6 - STMicroelectronics Programming Tools
dressing at all. Thus, the you are advised to pay special attention to these questions if you
want to optimize the execution time of your program by using the data in page zero.
Another way of declaring an identifier as public is to insert a dot before its name in the line
where it is defined. Using this notation, the example above becomes:
.Constant1.l EQU 1350000
; a large value that does not fit a word
SEGMENT 'DATA_Page0'
.Value1.b
DS.W 1
; a word data in page zero
SEGMENT 'DATA_Extended'
.Value2.w
DS.B 1
; a byte data in extended memory
You are free to use either notation as you prefer.
There is yet another way of declaring the identifiers' sizes: instead of using the suffixes
.b
,
.w
or
.l
as above, the labels may be declared using their plain name, and the current default type
applies. You may select the appropriate default type using one of the pseudo-ops BYTES ,
WORDS or LONGS. In the example above this could give:
LONGS
.Constant1 EQU 1350000
; a large value that does not fit a word
SEGMENT 'DATA_Page0'
BYTES
.Value1
DS.W 1
; a word data in page zero
SEGMENT 'DATA_Extended'
WORDS
.Value2
DS.B 1
; a byte data in extended memory
Any number of identifiers may be declared before the default type is changed; it is not neces-
sary to repeat either of the pseudo-ops
LONGS
,
WORDS
or
BYTES
before each declaration if it is
the same type as the previous one.
The choice of this notation is independent of the choice of the method for declaring the pub-
lics; so, the example above may also be written:
PUBLIC Value1, Value2, Constant1
LONGS
Constant1
EQU 1350000
; a large value that does not fit a word
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...