8-8
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
8 aSSEMBlEr
8.5.4 Data Defining Directives (
.long
,
.short
,
.byte
,
.ascii
,
.space
)
The following assembler directives are used to define data in
.data
or
.text
sections:
list of data defining directives
.long
Define 4-byte data.
.short
Define 2-byte data.
.byte
Define 1-byte data.
.ascii
Define ASCII character strings.
.space
Fills an area with a byte data.
instruction format
.long
<4-byte data>
[
,
<4-byte data>
...
,
<4-byte data>
]
.short
<2-byte data>
[
,
<2-byte data>
...
,
<2-byte data>
]
.byte
<1-byte data>
[
,
<1-byte data>
...
,
<1-byte data>
]
.ascii
"
<character string>
"
[
,"
<character string>
"
...
,"
<character string>
"
]
.space
<length>
[
,
<1-byte data>
]
<4-byte data>
0x0
–
0xffffffff
<2-byte data>
0x0
–
0xffff
<1-byte data>
0x0
–
0xff
<character string>
ASCII character string
<length>
Area size to be filled
Description
(1)
.long
,
.short
,
.byte
Defines one or more 4-byte data, 2-byte data, or 1-byte data. When specifying two or more data, separate
them with a comma.
The defined data is located beginning with a boundary address matched to the data size by the data defining
directive unless it is immediately preceded by the
.align
directive. If the current position is not a
boundary address, 0x00 is set in the interval from that position to the nearest boundary address.
Example:
.long 0x0,0x1,0x2
.byte 0xff
In addition to these directives, the directives listed below can also be used.
.hword
same as
.short
.word
same as
.short
.int
same as
.short
(2)
.ascii
Defines one or more string literals. Enclose a character string in double quotes. ASCII characters and an
escape sequence that begins with a symbol "
\
" can be written in a character string. For example, if you
want to set double quote in a character string, write
\"
; to set a
\
, write
\\
.
When specifying two or more strings, separate them with a comma.
The defined data is located beginning with the current address first, unless it is immediately preceded by the
.align
directive.
Example:
.ascii "abc","xyz"
.ascii "abc\"D\"efg"
(
= abc"D"efg
)
(3)
.space
An area of the specified
<length>
bytes long is set to
<1-byte data>
. The area begins from the current
address unless it is immediately preceded by the
.align
directive.
If
<1-byte data>
is omitted, the area is filled with 0x0. To fill the area with 0x0, the
.zero
directive (see
the next page) can also be used.
Example:
.space 4,0xff
Sets 0xff to the 4-byte area beginning from the current address.
.zero 4
(
= .space 4,0x0
)
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...