gasp.info: Initialized
Go forward to Uninitialized
Go up to Data
Go to the top op gasp
Initialized data
These are the GASP directives for initialized data, and the standard
GNU assembler directives they expand to:
`.DATA EXPR, EXPR, ...'
`.DATA.B EXPR, EXPR, ...'
`.DATA.W EXPR, EXPR, ...'
`.DATA.L EXPR, EXPR, ...'
Evaluate arithmetic expressions EXPR, and emit the corresponding
`as' directive (labelled with LAB). The unqualified `.DATA' emits
`.long'; `.DATA.B' emits `.byte'; `.DATA.W' emits `.short'; and
`.DATA.L' emits `.long'.
For example, `foo .DATA 1,2,3' emits `foo: .long 1,2,3'.
`.DATAB REPEAT, EXPR'
`.DATAB.B REPEAT, EXPR'
`.DATAB.W REPEAT, EXPR'
`.DATAB.L REPEAT, EXPR'
Make `as' emit REPEAT copies of the value of the expression EXPR
(using the `as' directive `.fill'). `.DATAB.B' repeats one-byte
values; `.DATAB.W' repeats two-byte values; and `.DATAB.L' repeats
four-byte values. `.DATAB' without a suffix repeats four-byte
values, just like `.DATAB.L'.
REPEAT must be an absolute expression with a positive value.
`.SDATA "STR" ...'
String data. Emits a concatenation of bytes, precisely as you
specify them (in particular, _nothing is added to mark the end_ of
the string). *Note String and numeric constants: Constants, for
details about how to write strings. `.SDATA' concatenates multiple
arguments, making it easy to switch between string
representations. You can use commas to separate the individual
arguments for clarity, if you choose.
`.SDATAB REPEAT, "STR" ...'
Repeated string data. The first argument specifies how many
copies of the string to emit; the remaining arguments specify the
string, in the same way as the arguments to `.SDATA'.
`.SDATAZ "STR" ...'
Zero-terminated string data. Just like `.SDATA', except that
`.SDATAZ' writes a zero byte at the end of the string.
`.SDATAC "STR" ...'
Count-prefixed string data. Just like `.SDATA', except that GASP
precedes the string with a leading one-byte count. For example,
`.SDATAC "HI"' generates `.byte 2,72,73'. Since the count field
is only one byte, you can only use `.SDATAC' for strings less than
256 bytes in length.
Created Wed Sep 1 16:42:12 2004 on bee with info_to_html version 0.9.6.