•
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
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...