•
Example
table1:
DC 0128h, 025CH
In this example, the HASM reserves two units of ROM space and also
stores 0128H and 025CH into these two ROM units.
Data definition directives
An assembly language program consists of one or more statements and
comments. A statement or comment is a composition of characters, numbers,
and names. The assembly language supports integer numbers. An integer
number is a collection of binary, octal, decimal, or hexadecimal digits along
with an optional radix. If no radix is given, the assembler uses the default radix
(decimal). Table 9.1 lists the digits that can be used with each radix.
Radix
Type
Digits
B
Binary
01
O
Octal
01234567
D
Decimal
0123456789
H
Hexadecimal
0123456789ABCDEF
Table 9.1 Digits Used With Each Radix
→
Syntax
[
name]
DB
value1 [,value2 [, ...]]
[
name]
DW
value1 [,value2 [, ...]]
[
name]
DBIT
[
name]
DB
repeated-count
DUP
(?)
[
name]
DW
repeated-count
DUP
(?)
•
Description
These directives reserve the number of bytes/words specified by the
repeated-count or reserve bytes/words only. value1, value2 should be ?
due to the microcontroller RAM . The HASM will not initialize the RAM
data. DBIT reserves a bit. The content ? denotes uninitialized data, i.e.,
reserves the space of the data. The HASM will gather every 8 DBIT
together and reserve a byte for these 8 DBIT variables.
•
Example
DATA
.SECTION
’DATA’
tbuf
DB ?
chksum
DW ?
flag1
DBIT
sbuf
DB ?
cflag
DBIT
HT-IDE User’s Guide
124
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...