| 1 | This is gasp.info, produced by makeinfo version 4.0 from gasp.texi.
|
|---|
| 2 |
|
|---|
| 3 | START-INFO-DIR-ENTRY
|
|---|
| 4 | * gasp: (gasp). The GNU Assembler Preprocessor
|
|---|
| 5 | END-INFO-DIR-ENTRY
|
|---|
| 6 |
|
|---|
| 7 | Copyright (C) 1994, 1995, 2000 Free Software Foundation, Inc.
|
|---|
| 8 |
|
|---|
| 9 | Permission is granted to copy, distribute and/or modify this document
|
|---|
| 10 | under the terms of the GNU Free Documentation License, Version 1.1
|
|---|
| 11 | or any later version published by the Free Software Foundation;
|
|---|
| 12 | with no Invariant Sections, with no Front-Cover Texts, and with no
|
|---|
| 13 | Back-Cover Texts. A copy of the license is included in the
|
|---|
| 14 | section entitled "GNU Free Documentation License".
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 | File: gasp.info, Node: Top, Next: Overview, Up: (dir)
|
|---|
| 18 |
|
|---|
| 19 | GASP
|
|---|
| 20 | ****
|
|---|
| 21 |
|
|---|
| 22 | GASP is a preprocessor for assembly programs.
|
|---|
| 23 |
|
|---|
| 24 | This file describes version 1 of GASP.
|
|---|
| 25 |
|
|---|
| 26 | Steve Chamberlain wrote GASP; Roland Pesch wrote this manual.
|
|---|
| 27 |
|
|---|
| 28 | * Menu:
|
|---|
| 29 |
|
|---|
| 30 | * Overview:: What is GASP?
|
|---|
| 31 | * Invoking GASP:: Command line options.
|
|---|
| 32 | * Commands:: Preprocessor commands.
|
|---|
| 33 | * GNU Free Documentation License:: GNU Free Documentation License
|
|---|
| 34 | * Index:: Index.
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 | File: gasp.info, Node: Overview, Next: Invoking GASP, Prev: Top, Up: Top
|
|---|
| 38 |
|
|---|
| 39 | What is GASP?
|
|---|
| 40 | *************
|
|---|
| 41 |
|
|---|
| 42 | The primary purpose of the GNU assembler is to assemble the output of
|
|---|
| 43 | other programs--notably compilers. When you have to hand-code
|
|---|
| 44 | specialized routines in assembly, that means the GNU assembler is an
|
|---|
| 45 | unfriendly processor: it has no directives for macros, conditionals, or
|
|---|
| 46 | many other conveniences that you might expect.
|
|---|
| 47 |
|
|---|
| 48 | In some cases you can simply use the C preprocessor, or a generalized
|
|---|
| 49 | preprocessor like M4; but this can be awkward, since none of these
|
|---|
| 50 | things are designed with assembly in mind.
|
|---|
| 51 |
|
|---|
| 52 | GASP fills this need. It is expressly designed to provide the
|
|---|
| 53 | facilities you need with hand-coded assembly code. Implementing it as a
|
|---|
| 54 | preprocessor, rather than part of the assembler, allows the maximum
|
|---|
| 55 | flexibility: you can use it with hand-coded assembly, without paying a
|
|---|
| 56 | penalty of added complexity in the assembler you use for compiler
|
|---|
| 57 | output.
|
|---|
| 58 |
|
|---|
| 59 | Here is a small example to give the flavor of GASP. This input to
|
|---|
| 60 | GASP
|
|---|
| 61 |
|
|---|
| 62 | .MACRO saveregs from=8 to=14
|
|---|
| 63 | count .ASSIGNA \from
|
|---|
| 64 | ! save r\from..r\to
|
|---|
| 65 | .AWHILE \&count LE \to
|
|---|
| 66 | mov r\&count,@-sp
|
|---|
| 67 | count .ASSIGNA \&count + 1
|
|---|
| 68 | .AENDW
|
|---|
| 69 | .ENDM
|
|---|
| 70 |
|
|---|
| 71 | saveregs from=12
|
|---|
| 72 |
|
|---|
| 73 | bar: mov #H'dead+10,r0
|
|---|
| 74 | foo .SDATAC "hello"<10>
|
|---|
| 75 | .END
|
|---|
| 76 |
|
|---|
| 77 | generates this assembly program:
|
|---|
| 78 |
|
|---|
| 79 | ! save r12..r14
|
|---|
| 80 | mov r12,@-sp
|
|---|
| 81 | mov r13,@-sp
|
|---|
| 82 | mov r14,@-sp
|
|---|
| 83 |
|
|---|
| 84 | bar: mov #57005+10,r0
|
|---|
| 85 | foo: .byte 6,104,101,108,108,111,10
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | File: gasp.info, Node: Invoking GASP, Next: Commands, Prev: Overview, Up: Top
|
|---|
| 89 |
|
|---|
| 90 | Command Line Options
|
|---|
| 91 | ********************
|
|---|
| 92 |
|
|---|
| 93 | The simplest way to use GASP is to run it as a filter and assemble
|
|---|
| 94 | its output. In Unix and its ilk, you can do this, for example:
|
|---|
| 95 |
|
|---|
| 96 | $ gasp prog.asm | as -o prog.o
|
|---|
| 97 |
|
|---|
| 98 | Naturally, there are also a few command-line options to allow you to
|
|---|
| 99 | request variations on this basic theme. Here is the full set of
|
|---|
| 100 | possibilities for the GASP command line.
|
|---|
| 101 |
|
|---|
| 102 | gasp [ -a | --alternate ]
|
|---|
| 103 | [ -c CHAR | --commentchar CHAR ]
|
|---|
| 104 | [ -d | --debug ] [ -h | --help ] [ -M | --mri ]
|
|---|
| 105 | [ -o OUTFILE | --output OUTFILE ]
|
|---|
| 106 | [ -p | --print ] [ -s | --copysource ]
|
|---|
| 107 | [ -u | --unreasonable ] [ -v | --version ]
|
|---|
| 108 | INFILE ...
|
|---|
| 109 |
|
|---|
| 110 | `INFILE ...'
|
|---|
| 111 | The input file names. You must specify at least one input file;
|
|---|
| 112 | if you specify more, GASP preprocesses them all, concatenating the
|
|---|
| 113 | output in the order you list the INFILE arguments.
|
|---|
| 114 |
|
|---|
| 115 | Mark the end of each input file with the preprocessor command
|
|---|
| 116 | `.END'. *Note Miscellaneous commands: Other Commands.
|
|---|
| 117 |
|
|---|
| 118 | `-a'
|
|---|
| 119 | `--alternate'
|
|---|
| 120 | Use alternative macro syntax. *Note Alternate macro syntax:
|
|---|
| 121 | Alternate, for a discussion of how this syntax differs from the
|
|---|
| 122 | default GASP syntax.
|
|---|
| 123 |
|
|---|
| 124 | `-c 'CHAR''
|
|---|
| 125 | `--commentchar 'CHAR''
|
|---|
| 126 | Use CHAR as the comment character. The default comment character
|
|---|
| 127 | is `!'. For example, to use a semicolon as the comment character,
|
|---|
| 128 | specify `-c ';'' on the GASP command line. Since assembler
|
|---|
| 129 | command characters often have special significance to command
|
|---|
| 130 | shells, it is a good idea to quote or escape CHAR when you specify
|
|---|
| 131 | a comment character.
|
|---|
| 132 |
|
|---|
| 133 | For the sake of simplicity, all examples in this manual use the
|
|---|
| 134 | default comment character `!'.
|
|---|
| 135 |
|
|---|
| 136 | `-d'
|
|---|
| 137 | `--debug'
|
|---|
| 138 | Show debugging statistics. In this version of GASP, this option
|
|---|
| 139 | produces statistics about the string buffers that GASP allocates
|
|---|
| 140 | internally. For each defined buffersize S, GASP shows the number
|
|---|
| 141 | of strings N that it allocated, with a line like this:
|
|---|
| 142 |
|
|---|
| 143 | strings size S : N
|
|---|
| 144 |
|
|---|
| 145 | GASP displays these statistics on the standard error stream, when
|
|---|
| 146 | done preprocessing.
|
|---|
| 147 |
|
|---|
| 148 | `-h'
|
|---|
| 149 | `--help'
|
|---|
| 150 | Display a summary of the GASP command line options.
|
|---|
| 151 |
|
|---|
| 152 | `-M'
|
|---|
| 153 | `--mri'
|
|---|
| 154 | Use MRI compatibility mode. Using this option causes GASP to
|
|---|
| 155 | accept the syntax and pseudo-ops used by the Microtec Research
|
|---|
| 156 | `ASM68K' assembler.
|
|---|
| 157 |
|
|---|
| 158 | `-o OUTFILE'
|
|---|
| 159 | `--output OUTFILE'
|
|---|
| 160 | Write the output in a file called OUTFILE. If you do not use the
|
|---|
| 161 | `-o' option, GASP writes its output on the standard output stream.
|
|---|
| 162 |
|
|---|
| 163 | `-p'
|
|---|
| 164 | `--print'
|
|---|
| 165 | Print line numbers. GASP obeys this option _only_ if you also
|
|---|
| 166 | specify `-s' to copy source lines to its output. With `-s -p',
|
|---|
| 167 | GASP displays the line number of each source line copied
|
|---|
| 168 | (immediately after the comment character at the beginning of the
|
|---|
| 169 | line).
|
|---|
| 170 |
|
|---|
| 171 | `-s'
|
|---|
| 172 | `--copysource'
|
|---|
| 173 | Copy the source lines to the output file. Use this option to see
|
|---|
| 174 | the effect of each preprocessor line on the GASP output. GASP
|
|---|
| 175 | places a comment character (`!' by default) at the beginning of
|
|---|
| 176 | each source line it copies, so that you can use this option and
|
|---|
| 177 | still assemble the result.
|
|---|
| 178 |
|
|---|
| 179 | `-u'
|
|---|
| 180 | `--unreasonable'
|
|---|
| 181 | Bypass "unreasonable expansion" limit. Since you can define GASP
|
|---|
| 182 | macros inside other macro definitions, the preprocessor normally
|
|---|
| 183 | includes a sanity check. If your program requires more than 1,000
|
|---|
| 184 | nested expansions, GASP normally exits with an error message. Use
|
|---|
| 185 | this option to turn off this check, allowing unlimited nested
|
|---|
| 186 | expansions.
|
|---|
| 187 |
|
|---|
| 188 | `-v'
|
|---|
| 189 | `--version'
|
|---|
| 190 | Display the GASP version number.
|
|---|
| 191 |
|
|---|
| 192 |
|
|---|
| 193 | File: gasp.info, Node: Commands, Next: GNU Free Documentation License, Prev: Invoking GASP, Up: Top
|
|---|
| 194 |
|
|---|
| 195 | Preprocessor Commands
|
|---|
| 196 | *********************
|
|---|
| 197 |
|
|---|
| 198 | GASP commands have a straightforward syntax that fits in well with
|
|---|
| 199 | assembly conventions. In general, a command extends for a line, and may
|
|---|
| 200 | have up to three fields: an optional label, the command itself, and
|
|---|
| 201 | optional arguments to the command. You can write commands in upper or
|
|---|
| 202 | lower case, though this manual shows them in upper case. *Note Details
|
|---|
| 203 | of the GASP syntax: Syntax Details, for more information.
|
|---|
| 204 |
|
|---|
| 205 | * Menu:
|
|---|
| 206 |
|
|---|
| 207 | * Conditionals::
|
|---|
| 208 | * Loops::
|
|---|
| 209 | * Variables::
|
|---|
| 210 | * Macros::
|
|---|
| 211 | * Data::
|
|---|
| 212 | * Listings::
|
|---|
| 213 | * Other Commands::
|
|---|
| 214 | * Syntax Details::
|
|---|
| 215 | * Alternate::
|
|---|
| 216 |
|
|---|
| 217 |
|
|---|
| 218 | File: gasp.info, Node: Conditionals, Next: Loops, Up: Commands
|
|---|
| 219 |
|
|---|
| 220 | Conditional assembly
|
|---|
| 221 | ====================
|
|---|
| 222 |
|
|---|
| 223 | The conditional-assembly directives allow you to include or exclude
|
|---|
| 224 | portions of an assembly depending on how a pair of expressions, or a
|
|---|
| 225 | pair of strings, compare.
|
|---|
| 226 |
|
|---|
| 227 | The overall structure of conditionals is familiar from many other
|
|---|
| 228 | contexts. `.AIF' marks the start of a conditional, and precedes
|
|---|
| 229 | assembly for the case when the condition is true. An optional
|
|---|
| 230 | `.AELSE' precedes assembly for the converse case, and an `.AENDI' marks
|
|---|
| 231 | the end of the condition.
|
|---|
| 232 |
|
|---|
| 233 | You may nest conditionals up to a depth of 100; GASP rejects nesting
|
|---|
| 234 | beyond that, because it may indicate a bug in your macro structure.
|
|---|
| 235 |
|
|---|
| 236 | Conditionals are primarily useful inside macro definitions, where you
|
|---|
| 237 | often need different effects depending on argument values. *Note
|
|---|
| 238 | Defining your own directives: Macros, for details about defining macros.
|
|---|
| 239 |
|
|---|
| 240 | `.AIF EXPRA CMP EXPRB'
|
|---|
| 241 | `.AIF "STRA" CMP "STRB"'
|
|---|
| 242 | The governing condition goes on the same line as the `.AIF'
|
|---|
| 243 | preprocessor command. You may compare either two strings, or two
|
|---|
| 244 | expressions.
|
|---|
| 245 |
|
|---|
| 246 | When you compare strings, only two conditional CMP comparison
|
|---|
| 247 | operators are available: `EQ' (true if STRA and STRB are
|
|---|
| 248 | identical), and `NE' (the opposite).
|
|---|
| 249 |
|
|---|
| 250 | When you compare two expressions, _both expressions must be
|
|---|
| 251 | absolute_ (*note Arithmetic expressions in GASP: Expressions.).
|
|---|
| 252 | You can use these CMP comparison operators with expressions:
|
|---|
| 253 |
|
|---|
| 254 | `EQ'
|
|---|
| 255 | Are EXPRA and EXPRB equal? (For strings, are STRA and STRB
|
|---|
| 256 | identical?)
|
|---|
| 257 |
|
|---|
| 258 | `NE'
|
|---|
| 259 | Are EXPRA and EXPRB different? (For strings, are STRA and
|
|---|
| 260 | STRB different?
|
|---|
| 261 |
|
|---|
| 262 | `LT'
|
|---|
| 263 | Is EXPRA less than EXPRB? (Not allowed for strings.)
|
|---|
| 264 |
|
|---|
| 265 | `LE'
|
|---|
| 266 | Is EXPRA less than or equal to EXPRB? (Not allowed for
|
|---|
| 267 | strings.)
|
|---|
| 268 |
|
|---|
| 269 | `GT'
|
|---|
| 270 | Is EXPRA greater than EXPRB? (Not allowed for strings.)
|
|---|
| 271 |
|
|---|
| 272 | `GE'
|
|---|
| 273 | Is EXPRA greater than or equal to EXPRB? (Not allowed for
|
|---|
| 274 | strings.)
|
|---|
| 275 |
|
|---|
| 276 | `.AELSE'
|
|---|
| 277 | Marks the start of assembly code to be included if the condition
|
|---|
| 278 | fails. Optional, and only allowed within a conditional (between
|
|---|
| 279 | `.AIF' and `.AENDI').
|
|---|
| 280 |
|
|---|
| 281 | `.AENDI'
|
|---|
| 282 | Marks the end of a conditional assembly.
|
|---|
| 283 |
|
|---|
| 284 |
|
|---|
| 285 | File: gasp.info, Node: Loops, Next: Variables, Prev: Conditionals, Up: Commands
|
|---|
| 286 |
|
|---|
| 287 | Repetitive sections of assembly
|
|---|
| 288 | ===============================
|
|---|
| 289 |
|
|---|
| 290 | Two preprocessor directives allow you to repeatedly issue copies of
|
|---|
| 291 | the same block of assembly code.
|
|---|
| 292 |
|
|---|
| 293 | `.AREPEAT AEXP'
|
|---|
| 294 | `.AENDR'
|
|---|
| 295 | If you simply need to repeat the same block of assembly over and
|
|---|
| 296 | over a fixed number of times, sandwich one instance of the
|
|---|
| 297 | repeated block between `.AREPEAT' and `.AENDR'. Specify the
|
|---|
| 298 | number of copies as AEXP (which must be an absolute expression).
|
|---|
| 299 | For example, this repeats two assembly statements three times in
|
|---|
| 300 | succession:
|
|---|
| 301 |
|
|---|
| 302 | .AREPEAT 3
|
|---|
| 303 | rotcl r2
|
|---|
| 304 | div1 r0,r1
|
|---|
| 305 | .AENDR
|
|---|
| 306 |
|
|---|
| 307 | `.AWHILE EXPRA CMP EXPRB'
|
|---|
| 308 | `.AENDW'
|
|---|
| 309 | `.AWHILE STRA CMP STRB'
|
|---|
| 310 | `.AENDW'
|
|---|
| 311 | To repeat a block of assembly depending on a conditional test,
|
|---|
| 312 | rather than repeating it for a specific number of times, use
|
|---|
| 313 | `.AWHILE'. `.AENDW' marks the end of the repeated block. The
|
|---|
| 314 | conditional comparison works exactly the same way as for `.AIF',
|
|---|
| 315 | with the same comparison operators (*note Conditional assembly:
|
|---|
| 316 | Conditionals.).
|
|---|
| 317 |
|
|---|
| 318 | Since the terms of the comparison must be absolute expression,
|
|---|
| 319 | `.AWHILE' is primarily useful within macros. *Note Defining your
|
|---|
| 320 | own directives: Macros.
|
|---|
| 321 |
|
|---|
| 322 | You can use the `.EXITM' preprocessor directive to break out of
|
|---|
| 323 | loops early (as well as to break out of macros). *Note Defining your
|
|---|
| 324 | own directives: Macros.
|
|---|
| 325 |
|
|---|
| 326 |
|
|---|
| 327 | File: gasp.info, Node: Variables, Next: Macros, Prev: Loops, Up: Commands
|
|---|
| 328 |
|
|---|
| 329 | Preprocessor variables
|
|---|
| 330 | ======================
|
|---|
| 331 |
|
|---|
| 332 | You can use variables in GASP to represent strings, registers, or
|
|---|
| 333 | the results of expressions.
|
|---|
| 334 |
|
|---|
| 335 | You must distinguish two kinds of variables:
|
|---|
| 336 | 1. Variables defined with `.EQU' or `.ASSIGN'. To evaluate this kind
|
|---|
| 337 | of variable in your assembly output, simply mention its name. For
|
|---|
| 338 | example, these two lines define and use a variable `eg':
|
|---|
| 339 |
|
|---|
| 340 | eg .EQU FLIP-64
|
|---|
| 341 | ...
|
|---|
| 342 | mov.l eg,r0
|
|---|
| 343 |
|
|---|
| 344 | _Do not use_ this kind of variable in conditional expressions or
|
|---|
| 345 | while loops; GASP only evaluates these variables when writing
|
|---|
| 346 | assembly output.
|
|---|
| 347 |
|
|---|
| 348 | 2. Variables for use during preprocessing. You can define these with
|
|---|
| 349 | `.ASSIGNC' or `.ASSIGNA'. To evaluate this kind of variable,
|
|---|
| 350 | write `\&' before the variable name; for example,
|
|---|
| 351 |
|
|---|
| 352 | opcit .ASSIGNA 47
|
|---|
| 353 | ...
|
|---|
| 354 | .AWHILE \&opcit GT 0
|
|---|
| 355 | ...
|
|---|
| 356 | .AENDW
|
|---|
| 357 |
|
|---|
| 358 | GASP treats macro arguments almost the same way, but to evaluate
|
|---|
| 359 | them you use the prefix `\' rather than `\&'. *Note Defining your
|
|---|
| 360 | own directives: Macros.
|
|---|
| 361 |
|
|---|
| 362 | `PVAR .EQU EXPR'
|
|---|
| 363 | Assign preprocessor variable PVAR the value of the expression
|
|---|
| 364 | EXPR. There are no restrictions on redefinition; use `.EQU' with
|
|---|
| 365 | the same PVAR as often as you find it convenient.
|
|---|
| 366 |
|
|---|
| 367 | `PVAR .ASSIGN EXPR'
|
|---|
| 368 | Almost the same as `.EQU', save that you may not redefine PVAR
|
|---|
| 369 | using `.ASSIGN' once it has a value.
|
|---|
| 370 |
|
|---|
| 371 | `PVAR .ASSIGNA AEXPR'
|
|---|
| 372 | Define a variable with a numeric value, for use during
|
|---|
| 373 | preprocessing. AEXPR must be an absolute expression. You can
|
|---|
| 374 | redefine variables with `.ASSIGNA' at any time.
|
|---|
| 375 |
|
|---|
| 376 | `PVAR .ASSIGNC "STR"'
|
|---|
| 377 | Define a variable with a string value, for use during
|
|---|
| 378 | preprocessing. You can redefine variables with `.ASSIGNC' at any
|
|---|
| 379 | time.
|
|---|
| 380 |
|
|---|
| 381 | `PVAR .REG (REGISTER)'
|
|---|
| 382 | Use `.REG' to define a variable that represents a register. In
|
|---|
| 383 | particular, REGISTER is _not evaluated_ as an expression. You may
|
|---|
| 384 | use `.REG' at will to redefine register variables.
|
|---|
| 385 |
|
|---|
| 386 | All these directives accept the variable name in the "label"
|
|---|
| 387 | position, that is at the left margin. You may specify a colon after
|
|---|
| 388 | the variable name if you wish; the first example above could have
|
|---|
| 389 | started `eg:' with the same effect.
|
|---|
| 390 |
|
|---|
| 391 |
|
|---|
| 392 | File: gasp.info, Node: Macros, Next: Data, Prev: Variables, Up: Commands
|
|---|
| 393 |
|
|---|
| 394 | Defining your own directives
|
|---|
| 395 | ============================
|
|---|
| 396 |
|
|---|
| 397 | The commands `.MACRO' and `.ENDM' allow you to define macros that
|
|---|
| 398 | generate assembly output. You can use these macros with a syntax
|
|---|
| 399 | similar to built-in GASP or assembler directives. For example, this
|
|---|
| 400 | definition specifies a macro `SUM' that adds together a range of
|
|---|
| 401 | consecutive registers:
|
|---|
| 402 |
|
|---|
| 403 | .MACRO SUM FROM=0, TO=9
|
|---|
| 404 | ! \FROM \TO
|
|---|
| 405 | mov r\FROM,r10
|
|---|
| 406 | COUNT .ASSIGNA \FROM+1
|
|---|
| 407 | .AWHILE \&COUNT LE \TO
|
|---|
| 408 | add r\&COUNT,r10
|
|---|
| 409 | COUNT .ASSIGNA \&COUNT+1
|
|---|
| 410 | .AENDW
|
|---|
| 411 | .ENDM
|
|---|
| 412 |
|
|---|
| 413 | With that definition, `SUM 0,5' generates this assembly output:
|
|---|
| 414 |
|
|---|
| 415 | ! 0 5
|
|---|
| 416 | mov r0,r10
|
|---|
| 417 | add r1,r10
|
|---|
| 418 | add r2,r10
|
|---|
| 419 | add r3,r10
|
|---|
| 420 | add r4,r10
|
|---|
| 421 | add r5,r10
|
|---|
| 422 |
|
|---|
| 423 | `.MACRO MACNAME'
|
|---|
| 424 | `.MACRO MACNAME MACARGS ...'
|
|---|
| 425 | Begin the definition of a macro called MACNAME. If your macro
|
|---|
| 426 | definition requires arguments, specify their names after the macro
|
|---|
| 427 | name, separated by commas or spaces. You can supply a default
|
|---|
| 428 | value for any macro argument by following the name with `=DEFLT'.
|
|---|
| 429 | For example, these are all valid `.MACRO' statements:
|
|---|
| 430 |
|
|---|
| 431 | `.MACRO COMM'
|
|---|
| 432 | Begin the definition of a macro called `COMM', which takes no
|
|---|
| 433 | arguments.
|
|---|
| 434 |
|
|---|
| 435 | `.MACRO PLUS1 P, P1'
|
|---|
| 436 | `.MACRO PLUS1 P P1'
|
|---|
| 437 | Either statement begins the definition of a macro called
|
|---|
| 438 | `PLUS1', which takes two arguments; within the macro
|
|---|
| 439 | definition, write `\P' or `\P1' to evaluate the arguments.
|
|---|
| 440 |
|
|---|
| 441 | `.MACRO RESERVE_STR P1=0 P2'
|
|---|
| 442 | Begin the definition of a macro called `RESERVE_STR', with two
|
|---|
| 443 | arguments. The first argument has a default value, but not
|
|---|
| 444 | the second. After the definition is complete, you can call
|
|---|
| 445 | the macro either as `RESERVE_STR A,B' (with `\P1' evaluating
|
|---|
| 446 | to A and `\P2' evaluating to B), or as `RESERVE_STR ,B' (with
|
|---|
| 447 | `\P1' evaluating as the default, in this case `0', and `\P2'
|
|---|
| 448 | evaluating to B).
|
|---|
| 449 |
|
|---|
| 450 | When you call a macro, you can specify the argument values either
|
|---|
| 451 | by position, or by keyword. For example, `SUM 9,17' is equivalent
|
|---|
| 452 | to `SUM TO=17, FROM=9'. Macro arguments are preprocessor variables
|
|---|
| 453 | similar to the variables you define with `.ASSIGNA' or `.ASSIGNC';
|
|---|
| 454 | in particular, you can use them in conditionals or for loop
|
|---|
| 455 | control. (The only difference is the prefix you write to evaluate
|
|---|
| 456 | the variable: for a macro argument, write `\ARGNAME', but for a
|
|---|
| 457 | preprocessor variable, write `\&VARNAME'.)
|
|---|
| 458 |
|
|---|
| 459 | `NAME .MACRO'
|
|---|
| 460 | `NAME .MACRO ( MACARGS ... )'
|
|---|
| 461 | An alternative form of introducing a macro definition: specify the
|
|---|
| 462 | macro name in the label position, and the arguments (if any)
|
|---|
| 463 | between parentheses after the name. Defaulting rules and usage
|
|---|
| 464 | work the same way as for the other macro definition syntax.
|
|---|
| 465 |
|
|---|
| 466 | `.ENDM'
|
|---|
| 467 | Mark the end of a macro definition.
|
|---|
| 468 |
|
|---|
| 469 | `.EXITM'
|
|---|
| 470 | Exit early from the current macro definition, `.AREPEAT' loop, or
|
|---|
| 471 | `.AWHILE' loop.
|
|---|
| 472 |
|
|---|
| 473 | `\@'
|
|---|
| 474 | GASP maintains a counter of how many macros it has executed in
|
|---|
| 475 | this pseudo-variable; you can copy that number to your output with
|
|---|
| 476 | `\@', but _only within a macro definition_.
|
|---|
| 477 |
|
|---|
| 478 | `LOCAL NAME [ , ... ]'
|
|---|
| 479 | _Warning: `LOCAL' is only available if you select "alternate macro
|
|---|
| 480 | syntax" with `-a' or `--alternate'._ *Note Alternate macro
|
|---|
| 481 | syntax: Alternate.
|
|---|
| 482 |
|
|---|
| 483 | Generate a string replacement for each of the NAME arguments, and
|
|---|
| 484 | replace any instances of NAME in each macro expansion. The
|
|---|
| 485 | replacement string is unique in the assembly, and different for
|
|---|
| 486 | each separate macro expansion. `LOCAL' allows you to write macros
|
|---|
| 487 | that define symbols, without fear of conflict between separate
|
|---|
| 488 | macro expansions.
|
|---|
| 489 |
|
|---|
| 490 |
|
|---|
| 491 | File: gasp.info, Node: Data, Next: Listings, Prev: Macros, Up: Commands
|
|---|
| 492 |
|
|---|
| 493 | Data output
|
|---|
| 494 | ===========
|
|---|
| 495 |
|
|---|
| 496 | In assembly code, you often need to specify working areas of memory;
|
|---|
| 497 | depending on the application, you may want to initialize such memory or
|
|---|
| 498 | not. GASP provides preprocessor directives to help you avoid
|
|---|
| 499 | repetitive coding for both purposes.
|
|---|
| 500 |
|
|---|
| 501 | You can use labels as usual to mark the data areas.
|
|---|
| 502 |
|
|---|
| 503 | * Menu:
|
|---|
| 504 |
|
|---|
| 505 | * Initialized::
|
|---|
| 506 | * Uninitialized::
|
|---|
| 507 |
|
|---|
| 508 |
|
|---|
| 509 | File: gasp.info, Node: Initialized, Next: Uninitialized, Up: Data
|
|---|
| 510 |
|
|---|
| 511 | Initialized data
|
|---|
| 512 | ----------------
|
|---|
| 513 |
|
|---|
| 514 | These are the GASP directives for initialized data, and the standard
|
|---|
| 515 | GNU assembler directives they expand to:
|
|---|
| 516 |
|
|---|
| 517 | `.DATA EXPR, EXPR, ...'
|
|---|
| 518 | `.DATA.B EXPR, EXPR, ...'
|
|---|
| 519 | `.DATA.W EXPR, EXPR, ...'
|
|---|
| 520 | `.DATA.L EXPR, EXPR, ...'
|
|---|
| 521 | Evaluate arithmetic expressions EXPR, and emit the corresponding
|
|---|
| 522 | `as' directive (labelled with LAB). The unqualified `.DATA' emits
|
|---|
| 523 | `.long'; `.DATA.B' emits `.byte'; `.DATA.W' emits `.short'; and
|
|---|
| 524 | `.DATA.L' emits `.long'.
|
|---|
| 525 |
|
|---|
| 526 | For example, `foo .DATA 1,2,3' emits `foo: .long 1,2,3'.
|
|---|
| 527 |
|
|---|
| 528 | `.DATAB REPEAT, EXPR'
|
|---|
| 529 | `.DATAB.B REPEAT, EXPR'
|
|---|
| 530 | `.DATAB.W REPEAT, EXPR'
|
|---|
| 531 | `.DATAB.L REPEAT, EXPR'
|
|---|
| 532 | Make `as' emit REPEAT copies of the value of the expression EXPR
|
|---|
| 533 | (using the `as' directive `.fill'). `.DATAB.B' repeats one-byte
|
|---|
| 534 | values; `.DATAB.W' repeats two-byte values; and `.DATAB.L' repeats
|
|---|
| 535 | four-byte values. `.DATAB' without a suffix repeats four-byte
|
|---|
| 536 | values, just like `.DATAB.L'.
|
|---|
| 537 |
|
|---|
| 538 | REPEAT must be an absolute expression with a positive value.
|
|---|
| 539 |
|
|---|
| 540 | `.SDATA "STR" ...'
|
|---|
| 541 | String data. Emits a concatenation of bytes, precisely as you
|
|---|
| 542 | specify them (in particular, _nothing is added to mark the end_ of
|
|---|
| 543 | the string). *Note String and numeric constants: Constants, for
|
|---|
| 544 | details about how to write strings. `.SDATA' concatenates multiple
|
|---|
| 545 | arguments, making it easy to switch between string
|
|---|
| 546 | representations. You can use commas to separate the individual
|
|---|
| 547 | arguments for clarity, if you choose.
|
|---|
| 548 |
|
|---|
| 549 | `.SDATAB REPEAT, "STR" ...'
|
|---|
| 550 | Repeated string data. The first argument specifies how many
|
|---|
| 551 | copies of the string to emit; the remaining arguments specify the
|
|---|
| 552 | string, in the same way as the arguments to `.SDATA'.
|
|---|
| 553 |
|
|---|
| 554 | `.SDATAZ "STR" ...'
|
|---|
| 555 | Zero-terminated string data. Just like `.SDATA', except that
|
|---|
| 556 | `.SDATAZ' writes a zero byte at the end of the string.
|
|---|
| 557 |
|
|---|
| 558 | `.SDATAC "STR" ...'
|
|---|
| 559 | Count-prefixed string data. Just like `.SDATA', except that GASP
|
|---|
| 560 | precedes the string with a leading one-byte count. For example,
|
|---|
| 561 | `.SDATAC "HI"' generates `.byte 2,72,73'. Since the count field
|
|---|
| 562 | is only one byte, you can only use `.SDATAC' for strings less than
|
|---|
| 563 | 256 bytes in length.
|
|---|
| 564 |
|
|---|
| 565 |
|
|---|
| 566 | File: gasp.info, Node: Uninitialized, Prev: Initialized, Up: Data
|
|---|
| 567 |
|
|---|
| 568 | Uninitialized data
|
|---|
| 569 | ------------------
|
|---|
| 570 |
|
|---|
| 571 | Use the `.RES', `.SRES', `.SRESC', and `.SRESZ' directives to
|
|---|
| 572 | reserve memory and leave it uninitialized. GASP resolves these
|
|---|
| 573 | directives to appropriate calls of the GNU `as' `.space' directive.
|
|---|
| 574 |
|
|---|
| 575 | `.RES COUNT'
|
|---|
| 576 | `.RES.B COUNT'
|
|---|
| 577 | `.RES.W COUNT'
|
|---|
| 578 | `.RES.L COUNT'
|
|---|
| 579 | Reserve room for COUNT uninitialized elements of data. The suffix
|
|---|
| 580 | specifies the size of each element: `.RES.B' reserves COUNT bytes,
|
|---|
| 581 | `.RES.W' reserves COUNT pairs of bytes, and `.RES.L' reserves
|
|---|
| 582 | COUNT quartets. `.RES' without a suffix is equivalent to `.RES.L'.
|
|---|
| 583 |
|
|---|
| 584 | `.SRES COUNT'
|
|---|
| 585 | `.SRES.B COUNT'
|
|---|
| 586 | `.SRES.W COUNT'
|
|---|
| 587 | `.SRES.L COUNT'
|
|---|
| 588 | `.SRES' is a synonym for `.RES'.
|
|---|
| 589 |
|
|---|
| 590 | `.SRESC COUNT'
|
|---|
| 591 | `.SRESC.B COUNT'
|
|---|
| 592 | `.SRESC.W COUNT'
|
|---|
| 593 | `.SRESC.L COUNT'
|
|---|
| 594 | Like `.SRES', but reserves space for `COUNT+1' elements.
|
|---|
| 595 |
|
|---|
| 596 | `.SRESZ COUNT'
|
|---|
| 597 | `.SRESZ.B COUNT'
|
|---|
| 598 | `.SRESZ.W COUNT'
|
|---|
| 599 | `.SRESZ.L COUNT'
|
|---|
| 600 | Like `.SRES', but reserves space for `COUNT+1' elements.
|
|---|
| 601 |
|
|---|
| 602 |
|
|---|
| 603 | File: gasp.info, Node: Listings, Next: Other Commands, Prev: Data, Up: Commands
|
|---|
| 604 |
|
|---|
| 605 | Assembly listing control
|
|---|
| 606 | ========================
|
|---|
| 607 |
|
|---|
| 608 | The GASP listing-control directives correspond to related GNU `as'
|
|---|
| 609 | directives.
|
|---|
| 610 |
|
|---|
| 611 | `.PRINT LIST'
|
|---|
| 612 | `.PRINT NOLIST'
|
|---|
| 613 | Print control. This directive emits the GNU `as' directive
|
|---|
| 614 | `.list' or `.nolist', according to its argument. *Note `.list':
|
|---|
| 615 | (as.info)List, for details on how these directives interact.
|
|---|
| 616 |
|
|---|
| 617 | `.FORM LIN=LN'
|
|---|
| 618 | `.FORM COL=COLS'
|
|---|
| 619 | `.FORM LIN=LN COL=COLS'
|
|---|
| 620 | Specify the page size for assembly listings: LN represents the
|
|---|
| 621 | number of lines, and COLS the number of columns. You may specify
|
|---|
| 622 | either page dimension independently, or both together. If you do
|
|---|
| 623 | not specify the number of lines, GASP assumes 60 lines; if you do
|
|---|
| 624 | not specify the number of columns, GASP assumes 132 columns. (Any
|
|---|
| 625 | values you may have specified in previous instances of `.FORM' do
|
|---|
| 626 | _not_ carry over as defaults.) Emits the `.psize' assembler
|
|---|
| 627 | directive.
|
|---|
| 628 |
|
|---|
| 629 | `.HEADING STRING'
|
|---|
| 630 | Specify STRING as the title of your assembly listings. Emits
|
|---|
| 631 | `.title "STRING"'.
|
|---|
| 632 |
|
|---|
| 633 | `.PAGE'
|
|---|
| 634 | Force a new page in assembly listings. Emits `.eject'.
|
|---|
| 635 |
|
|---|
| 636 |
|
|---|
| 637 | File: gasp.info, Node: Other Commands, Next: Syntax Details, Prev: Listings, Up: Commands
|
|---|
| 638 |
|
|---|
| 639 | Miscellaneous commands
|
|---|
| 640 | ======================
|
|---|
| 641 |
|
|---|
| 642 | `.ALTERNATE'
|
|---|
| 643 | Use the alternate macro syntax henceforth in the assembly. *Note
|
|---|
| 644 | Alternate macro syntax: Alternate.
|
|---|
| 645 |
|
|---|
| 646 | `.ORG'
|
|---|
| 647 | This command is recognized, but not yet implemented. GASP
|
|---|
| 648 | generates an error message for programs that use `.ORG'.
|
|---|
| 649 |
|
|---|
| 650 | `.RADIX S'
|
|---|
| 651 | GASP understands numbers in any of base two, eight, ten, or
|
|---|
| 652 | sixteen. You can encode the base explicitly in any numeric
|
|---|
| 653 | constant (*note String and numeric constants: Constants.). If you
|
|---|
| 654 | write numbers without an explicit indication of the base, the most
|
|---|
| 655 | recent `.RADIX S' command determines how they are interpreted. S
|
|---|
| 656 | is a single letter, one of the following:
|
|---|
| 657 |
|
|---|
| 658 | `.RADIX B'
|
|---|
| 659 | Base 2.
|
|---|
| 660 |
|
|---|
| 661 | `.RADIX Q'
|
|---|
| 662 | Base 8.
|
|---|
| 663 |
|
|---|
| 664 | `.RADIX D'
|
|---|
| 665 | Base 10. This is the original default radix.
|
|---|
| 666 |
|
|---|
| 667 | `.RADIX H'
|
|---|
| 668 | Base 16.
|
|---|
| 669 |
|
|---|
| 670 | You may specify the argument S in lower case (any of `bqdh') with
|
|---|
| 671 | the same effects.
|
|---|
| 672 |
|
|---|
| 673 | `.EXPORT NAME'
|
|---|
| 674 | `.GLOBAL NAME'
|
|---|
| 675 | Declare NAME global (emits `.global NAME'). The two directives
|
|---|
| 676 | are synonymous.
|
|---|
| 677 |
|
|---|
| 678 | `.PROGRAM'
|
|---|
| 679 | No effect: GASP accepts this directive, and silently ignores it.
|
|---|
| 680 |
|
|---|
| 681 | `.END'
|
|---|
| 682 | Mark end of each preprocessor file. GASP issues a warning if it
|
|---|
| 683 | reaches end of file without seeing this command.
|
|---|
| 684 |
|
|---|
| 685 | `.INCLUDE "STR"'
|
|---|
| 686 | Preprocess the file named by STR, as if its contents appeared
|
|---|
| 687 | where the `.INCLUDE' directive does. GASP imposes a maximum limit
|
|---|
| 688 | of 30 stacked include files, as a sanity check.
|
|---|
| 689 |
|
|---|
| 690 | `.ALIGN SIZE'
|
|---|
| 691 | Evaluate the absolute expression SIZE, and emit the assembly
|
|---|
| 692 | instruction `.align SIZE' using the result.
|
|---|
| 693 |
|
|---|
| 694 |
|
|---|
| 695 | File: gasp.info, Node: Syntax Details, Next: Alternate, Prev: Other Commands, Up: Commands
|
|---|
| 696 |
|
|---|
| 697 | Details of the GASP syntax
|
|---|
| 698 | ==========================
|
|---|
| 699 |
|
|---|
| 700 | Since GASP is meant to work with assembly code, its statement syntax
|
|---|
| 701 | has no surprises for the assembly programmer.
|
|---|
| 702 |
|
|---|
| 703 | _Whitespace_ (blanks or tabs; _not_ newline) is partially
|
|---|
| 704 | significant, in that it delimits up to three fields in a line. The
|
|---|
| 705 | amount of whitespace does not matter; you may line up fields in separate
|
|---|
| 706 | lines if you wish, but GASP does not require that.
|
|---|
| 707 |
|
|---|
| 708 | The _first field_, an optional "label", must be flush left in a line
|
|---|
| 709 | (with no leading whitespace) if it appears at all. You may use a colon
|
|---|
| 710 | after the label if you wish; GASP neither requires the colon nor
|
|---|
| 711 | objects to it (but will not include it as part of the label name).
|
|---|
| 712 |
|
|---|
| 713 | The _second field_, which must appear after some whitespace,
|
|---|
| 714 | contains a GASP or assembly "directive".
|
|---|
| 715 |
|
|---|
| 716 | Any _further fields_ on a line are "arguments" to the directive; you
|
|---|
| 717 | can separate them from one another using either commas or whitespace.
|
|---|
| 718 |
|
|---|
| 719 | * Menu:
|
|---|
| 720 |
|
|---|
| 721 | * Markers::
|
|---|
| 722 | * Constants::
|
|---|
| 723 | * Symbols::
|
|---|
| 724 | * Expressions::
|
|---|
| 725 | * String Builtins::
|
|---|
| 726 |
|
|---|
| 727 |
|
|---|
| 728 | File: gasp.info, Node: Markers, Next: Constants, Up: Syntax Details
|
|---|
| 729 |
|
|---|
| 730 | Special syntactic markers
|
|---|
| 731 | -------------------------
|
|---|
| 732 |
|
|---|
| 733 | GASP recognizes a few special markers: to delimit comments, to
|
|---|
| 734 | continue a statement on the next line, to separate symbols from other
|
|---|
| 735 | characters, and to copy text to the output literally. (One other
|
|---|
| 736 | special marker, `\@', works only within macro definitions; *note
|
|---|
| 737 | Defining your own directives: Macros..)
|
|---|
| 738 |
|
|---|
| 739 | The trailing part of any GASP source line may be a "comment". A
|
|---|
| 740 | comment begins with the first unquoted comment character (`!' by
|
|---|
| 741 | default), or an escaped or doubled comment character (`\!' or `!!' by
|
|---|
| 742 | default), and extends to the end of a line. You can specify what
|
|---|
| 743 | comment character to use with the `-c' option (*note Command Line
|
|---|
| 744 | Options: Invoking GASP.). The two kinds of comment markers lead to
|
|---|
| 745 | slightly different treatment:
|
|---|
| 746 |
|
|---|
| 747 | `!'
|
|---|
| 748 | A single, un-escaped comment character generates an assembly
|
|---|
| 749 | comment in the GASP output. GASP evaluates any preprocessor
|
|---|
| 750 | variables (macro arguments, or variables defined with `.ASSIGNA' or
|
|---|
| 751 | `.ASSIGNC') present. For example, a macro that begins like this
|
|---|
| 752 |
|
|---|
| 753 | .MACRO SUM FROM=0, TO=9
|
|---|
| 754 | ! \FROM \TO
|
|---|
| 755 |
|
|---|
| 756 | issues as the first line of output a comment that records the
|
|---|
| 757 | values you used to call the macro.
|
|---|
| 758 |
|
|---|
| 759 | `\!'
|
|---|
| 760 | `!!'
|
|---|
| 761 | Either an escaped comment character, or a double comment character,
|
|---|
| 762 | marks a GASP source comment. GASP does not copy such comments to
|
|---|
| 763 | the assembly output.
|
|---|
| 764 |
|
|---|
| 765 | To _continue a statement_ on the next line of the file, begin the
|
|---|
| 766 | second line with the character `+'.
|
|---|
| 767 |
|
|---|
| 768 | Occasionally you may want to prevent GASP from preprocessing some
|
|---|
| 769 | particular bit of text. To _copy literally_ from the GASP source to
|
|---|
| 770 | its output, place `\(' before the string to copy, and `)' at the end.
|
|---|
| 771 | For example, write `\(\!)' if you need the characters `\!' in your
|
|---|
| 772 | assembly output.
|
|---|
| 773 |
|
|---|
| 774 | To _separate a preprocessor variable_ from text to appear
|
|---|
| 775 | immediately after its value, write a single quote (`''). For example,
|
|---|
| 776 | `.SDATA "\P'1"' writes a string built by concatenating the value of `P'
|
|---|
| 777 | and the digit `1'. (You cannot achieve this by writing just `\P1',
|
|---|
| 778 | since `P1' is itself a valid name for a preprocessor variable.)
|
|---|
| 779 |
|
|---|
| 780 |
|
|---|
| 781 | File: gasp.info, Node: Constants, Next: Symbols, Prev: Markers, Up: Syntax Details
|
|---|
| 782 |
|
|---|
| 783 | String and numeric constants
|
|---|
| 784 | ----------------------------
|
|---|
| 785 |
|
|---|
| 786 | There are two ways of writing "string constants" in GASP: as literal
|
|---|
| 787 | text, and by numeric byte value. Specify a string literal between
|
|---|
| 788 | double quotes (`"STR"'). Specify an individual numeric byte value as
|
|---|
| 789 | an absolute expression between angle brackets (`<EXPR>'. Directives
|
|---|
| 790 | that output strings allow you to specify any number of either kind of
|
|---|
| 791 | value, in whatever order is convenient, and concatenate the result.
|
|---|
| 792 | (Alternate syntax mode introduces a number of alternative string
|
|---|
| 793 | notations; *note Alternate macro syntax: Alternate..)
|
|---|
| 794 |
|
|---|
| 795 | You can write "numeric constants" either in a specific base, or in
|
|---|
| 796 | whatever base is currently selected (either 10, or selected by the most
|
|---|
| 797 | recent `.RADIX').
|
|---|
| 798 |
|
|---|
| 799 | To write a number in a _specific base_, use the pattern `S'DDD': a
|
|---|
| 800 | base specifier character S, followed by a single quote followed by
|
|---|
| 801 | digits DDD. The base specifier character matches those you can specify
|
|---|
| 802 | with `.RADIX': `B' for base 2, `Q' for base 8, `D' for base 10, and `H'
|
|---|
| 803 | for base 16. (You can write this character in lower case if you
|
|---|
| 804 | prefer.)
|
|---|
| 805 |
|
|---|
| 806 |
|
|---|
| 807 | File: gasp.info, Node: Symbols, Next: Expressions, Prev: Constants, Up: Syntax Details
|
|---|
| 808 |
|
|---|
| 809 | Symbols
|
|---|
| 810 | -------
|
|---|
| 811 |
|
|---|
| 812 | GASP recognizes symbol names that start with any alphabetic
|
|---|
| 813 | character, `_', or `$', and continue with any of the same characters or
|
|---|
| 814 | with digits. Label names follow the same rules.
|
|---|
| 815 |
|
|---|
| 816 |
|
|---|
| 817 | File: gasp.info, Node: Expressions, Next: String Builtins, Prev: Symbols, Up: Syntax Details
|
|---|
| 818 |
|
|---|
| 819 | Arithmetic expressions in GASP
|
|---|
| 820 | ------------------------------
|
|---|
| 821 |
|
|---|
| 822 | There are two kinds of expressions, depending on their result:
|
|---|
| 823 | "absolute" expressions, which resolve to a constant (that is, they do
|
|---|
| 824 | not involve any values unknown to GASP), and "relocatable" expressions,
|
|---|
| 825 | which must reduce to the form
|
|---|
| 826 |
|
|---|
| 827 | ADDSYM+CONST-SUBSYM
|
|---|
| 828 |
|
|---|
| 829 | where ADDSYM and SUBSYM are assembly symbols of unknown value, and
|
|---|
| 830 | CONST is a constant.
|
|---|
| 831 |
|
|---|
| 832 | Arithmetic for GASP expressions follows very similar rules to C.
|
|---|
| 833 | You can use parentheses to change precedence; otherwise, arithmetic
|
|---|
| 834 | primitives have decreasing precedence in the order of the following
|
|---|
| 835 | list.
|
|---|
| 836 |
|
|---|
| 837 | 1. Single-argument `+' (identity), `-' (arithmetic opposite), or `~'
|
|---|
| 838 | (bitwise negation). _The argument must be an absolute expression._
|
|---|
| 839 |
|
|---|
| 840 | 2. `*' (multiplication) and `/' (division). _Both arguments must be
|
|---|
| 841 | absolute expressions._
|
|---|
| 842 |
|
|---|
| 843 | 3. `+' (addition) and `-' (subtraction). _At least one argument must
|
|---|
| 844 | be absolute._
|
|---|
| 845 |
|
|---|
| 846 | 4. `&' (bitwise and). _Both arguments must be absolute._
|
|---|
| 847 |
|
|---|
| 848 | 5. `|' (bitwise or) and `~' (bitwise exclusive or; `^' in C). _Both
|
|---|
| 849 | arguments must be absolute._
|
|---|
| 850 |
|
|---|
| 851 |
|
|---|
| 852 | File: gasp.info, Node: String Builtins, Prev: Expressions, Up: Syntax Details
|
|---|
| 853 |
|
|---|
| 854 | String primitives
|
|---|
| 855 | -----------------
|
|---|
| 856 |
|
|---|
| 857 | You can use these primitives to manipulate strings (in the argument
|
|---|
| 858 | field of GASP statements):
|
|---|
| 859 |
|
|---|
| 860 | `.LEN("STR")'
|
|---|
| 861 | Calculate the length of string `"STR"', as an absolute expression.
|
|---|
| 862 | For example, `.RES.B .LEN("sample")' reserves six bytes of memory.
|
|---|
| 863 |
|
|---|
| 864 | `.INSTR("STRING", "SEG", IX)'
|
|---|
| 865 | Search for the first occurrence of SEG after position IX of
|
|---|
| 866 | STRING. For example, `.INSTR("ABCDEFG", "CDE", 0)' evaluates to
|
|---|
| 867 | the absolute result `2'.
|
|---|
| 868 |
|
|---|
| 869 | The result is `-1' if SEG does not occur in STRING after position
|
|---|
| 870 | IX.
|
|---|
| 871 |
|
|---|
| 872 | `.SUBSTR("STRING",START,LEN)'
|
|---|
| 873 | The substring of STRING beginning at byte number START and
|
|---|
| 874 | extending for LEN bytes.
|
|---|
| 875 |
|
|---|
| 876 |
|
|---|
| 877 | File: gasp.info, Node: Alternate, Prev: Syntax Details, Up: Commands
|
|---|
| 878 |
|
|---|
| 879 | Alternate macro syntax
|
|---|
| 880 | ======================
|
|---|
| 881 |
|
|---|
| 882 | If you specify `-a' or `--alternate' on the GASP command line, the
|
|---|
| 883 | preprocessor uses somewhat different syntax. This syntax is
|
|---|
| 884 | reminiscent of the syntax of Phar Lap macro assembler, but it is _not_
|
|---|
| 885 | meant to be a full emulation of Phar Lap or similar assemblers. In
|
|---|
| 886 | particular, GASP does not support directives such as `DB' and `IRP',
|
|---|
| 887 | even in alternate syntax mode.
|
|---|
| 888 |
|
|---|
| 889 | In particular, `-a' (or `--alternate') elicits these differences:
|
|---|
| 890 |
|
|---|
| 891 | _Preprocessor directives_
|
|---|
| 892 | You can use GASP preprocessor directives without a leading `.'
|
|---|
| 893 | dot. For example, you can write `SDATA' with the same effect as
|
|---|
| 894 | `.SDATA'.
|
|---|
| 895 |
|
|---|
| 896 | _LOCAL_
|
|---|
| 897 | One additional directive, `LOCAL', is available. *Note Defining
|
|---|
| 898 | your own directives: Macros, for an explanation of how to use
|
|---|
| 899 | `LOCAL'.
|
|---|
| 900 |
|
|---|
| 901 | _String delimiters_
|
|---|
| 902 | You can write strings delimited in these other ways besides
|
|---|
| 903 | `"STRING"':
|
|---|
| 904 |
|
|---|
| 905 | `'STRING''
|
|---|
| 906 | You can delimit strings with single-quote charaters.
|
|---|
| 907 |
|
|---|
| 908 | `<STRING>'
|
|---|
| 909 | You can delimit strings with matching angle brackets.
|
|---|
| 910 |
|
|---|
| 911 | _single-character string escape_
|
|---|
| 912 | To include any single character literally in a string (even if the
|
|---|
| 913 | character would otherwise have some special meaning), you can
|
|---|
| 914 | prefix the character with `!' (an exclamation mark). For example,
|
|---|
| 915 | you can write `<4.3 !> 5.4!!>' to get the literal text `4.3 >
|
|---|
| 916 | 5.4!'.
|
|---|
| 917 |
|
|---|
| 918 | _Expression results as strings_
|
|---|
| 919 | You can write `%EXPR' to evaluate the expression EXPR and use the
|
|---|
| 920 | result as a string.
|
|---|
| 921 |
|
|---|
| 922 |
|
|---|
| 923 | File: gasp.info, Node: GNU Free Documentation License, Next: Index, Prev: Commands, Up: Top
|
|---|
| 924 |
|
|---|
| 925 | GNU Free Documentation License
|
|---|
| 926 | ******************************
|
|---|
| 927 |
|
|---|
| 928 | GNU Free Documentation License
|
|---|
| 929 |
|
|---|
| 930 | Version 1.1, March 2000
|
|---|
| 931 |
|
|---|
| 932 | Copyright (C) 2000 Free Software Foundation, Inc. 59 Temple
|
|---|
| 933 | Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 934 |
|
|---|
| 935 | Everyone is permitted to copy and distribute verbatim copies of
|
|---|
| 936 | this license document, but changing it is not allowed.
|
|---|
| 937 |
|
|---|
| 938 | 0. PREAMBLE
|
|---|
| 939 |
|
|---|
| 940 | The purpose of this License is to make a manual, textbook, or other
|
|---|
| 941 | written document "free" in the sense of freedom: to assure everyone the
|
|---|
| 942 | effective freedom to copy and redistribute it, with or without
|
|---|
| 943 | modifying it, either commercially or noncommercially. Secondarily,
|
|---|
| 944 | this License preserves for the author and publisher a way to get credit
|
|---|
| 945 | for their work, while not being considered responsible for
|
|---|
| 946 | modifications made by others.
|
|---|
| 947 |
|
|---|
| 948 | This License is a kind of "copyleft", which means that derivative
|
|---|
| 949 | works of the document must themselves be free in the same sense. It
|
|---|
| 950 | complements the GNU General Public License, which is a copyleft license
|
|---|
| 951 | designed for free software.
|
|---|
| 952 |
|
|---|
| 953 | We have designed this License in order to use it for manuals for free
|
|---|
| 954 | software, because free software needs free documentation: a free
|
|---|
| 955 | program should come with manuals providing the same freedoms that the
|
|---|
| 956 | software does. But this License is not limited to software manuals; it
|
|---|
| 957 | can be used for any textual work, regardless of subject matter or
|
|---|
| 958 | whether it is published as a printed book. We recommend this License
|
|---|
| 959 | principally for works whose purpose is instruction or reference.
|
|---|
| 960 |
|
|---|
| 961 | 1. APPLICABILITY AND DEFINITIONS
|
|---|
| 962 |
|
|---|
| 963 | This License applies to any manual or other work that contains a
|
|---|
| 964 | notice placed by the copyright holder saying it can be distributed
|
|---|
| 965 | under the terms of this License. The "Document", below, refers to any
|
|---|
| 966 | such manual or work. Any member of the public is a licensee, and is
|
|---|
| 967 | addressed as "you".
|
|---|
| 968 |
|
|---|
| 969 | A "Modified Version" of the Document means any work containing the
|
|---|
| 970 | Document or a portion of it, either copied verbatim, or with
|
|---|
| 971 | modifications and/or translated into another language.
|
|---|
| 972 |
|
|---|
| 973 | A "Secondary Section" is a named appendix or a front-matter section
|
|---|
| 974 | of the Document that deals exclusively with the relationship of the
|
|---|
| 975 | publishers or authors of the Document to the Document's overall subject
|
|---|
| 976 | (or to related matters) and contains nothing that could fall directly
|
|---|
| 977 | within that overall subject. (For example, if the Document is in part a
|
|---|
| 978 | textbook of mathematics, a Secondary Section may not explain any
|
|---|
| 979 | mathematics.) The relationship could be a matter of historical
|
|---|
| 980 | connection with the subject or with related matters, or of legal,
|
|---|
| 981 | commercial, philosophical, ethical or political position regarding them.
|
|---|
| 982 |
|
|---|
| 983 | The "Invariant Sections" are certain Secondary Sections whose titles
|
|---|
| 984 | are designated, as being those of Invariant Sections, in the notice
|
|---|
| 985 | that says that the Document is released under this License.
|
|---|
| 986 |
|
|---|
| 987 | The "Cover Texts" are certain short passages of text that are listed,
|
|---|
| 988 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
|---|
| 989 | the Document is released under this License.
|
|---|
| 990 |
|
|---|
| 991 | A "Transparent" copy of the Document means a machine-readable copy,
|
|---|
| 992 | represented in a format whose specification is available to the general
|
|---|
| 993 | public, whose contents can be viewed and edited directly and
|
|---|
| 994 | straightforwardly with generic text editors or (for images composed of
|
|---|
| 995 | pixels) generic paint programs or (for drawings) some widely available
|
|---|
| 996 | drawing editor, and that is suitable for input to text formatters or
|
|---|
| 997 | for automatic translation to a variety of formats suitable for input to
|
|---|
| 998 | text formatters. A copy made in an otherwise Transparent file format
|
|---|
| 999 | whose markup has been designed to thwart or discourage subsequent
|
|---|
| 1000 | modification by readers is not Transparent. A copy that is not
|
|---|
| 1001 | "Transparent" is called "Opaque".
|
|---|
| 1002 |
|
|---|
| 1003 | Examples of suitable formats for Transparent copies include plain
|
|---|
| 1004 | ASCII without markup, Texinfo input format, LaTeX input format, SGML or
|
|---|
| 1005 | XML using a publicly available DTD, and standard-conforming simple HTML
|
|---|
| 1006 | designed for human modification. Opaque formats include PostScript,
|
|---|
| 1007 | PDF, proprietary formats that can be read and edited only by
|
|---|
| 1008 | proprietary word processors, SGML or XML for which the DTD and/or
|
|---|
| 1009 | processing tools are not generally available, and the machine-generated
|
|---|
| 1010 | HTML produced by some word processors for output purposes only.
|
|---|
| 1011 |
|
|---|
| 1012 | The "Title Page" means, for a printed book, the title page itself,
|
|---|
| 1013 | plus such following pages as are needed to hold, legibly, the material
|
|---|
| 1014 | this License requires to appear in the title page. For works in
|
|---|
| 1015 | formats which do not have any title page as such, "Title Page" means
|
|---|
| 1016 | the text near the most prominent appearance of the work's title,
|
|---|
| 1017 | preceding the beginning of the body of the text.
|
|---|
| 1018 |
|
|---|
| 1019 | 2. VERBATIM COPYING
|
|---|
| 1020 |
|
|---|
| 1021 | You may copy and distribute the Document in any medium, either
|
|---|
| 1022 | commercially or noncommercially, provided that this License, the
|
|---|
| 1023 | copyright notices, and the license notice saying this License applies
|
|---|
| 1024 | to the Document are reproduced in all copies, and that you add no other
|
|---|
| 1025 | conditions whatsoever to those of this License. You may not use
|
|---|
| 1026 | technical measures to obstruct or control the reading or further
|
|---|
| 1027 | copying of the copies you make or distribute. However, you may accept
|
|---|
| 1028 | compensation in exchange for copies. If you distribute a large enough
|
|---|
| 1029 | number of copies you must also follow the conditions in section 3.
|
|---|
| 1030 |
|
|---|
| 1031 | You may also lend copies, under the same conditions stated above, and
|
|---|
| 1032 | you may publicly display copies.
|
|---|
| 1033 |
|
|---|
| 1034 | 3. COPYING IN QUANTITY
|
|---|
| 1035 |
|
|---|
| 1036 | If you publish printed copies of the Document numbering more than
|
|---|
| 1037 | 100, and the Document's license notice requires Cover Texts, you must
|
|---|
| 1038 | enclose the copies in covers that carry, clearly and legibly, all these
|
|---|
| 1039 | Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts
|
|---|
| 1040 | on the back cover. Both covers must also clearly and legibly identify
|
|---|
| 1041 | you as the publisher of these copies. The front cover must present the
|
|---|
| 1042 | full title with all words of the title equally prominent and visible.
|
|---|
| 1043 | You may add other material on the covers in addition. Copying with
|
|---|
| 1044 | changes limited to the covers, as long as they preserve the title of
|
|---|
| 1045 | the Document and satisfy these conditions, can be treated as verbatim
|
|---|
| 1046 | copying in other respects.
|
|---|
| 1047 |
|
|---|
| 1048 | If the required texts for either cover are too voluminous to fit
|
|---|
| 1049 | legibly, you should put the first ones listed (as many as fit
|
|---|
| 1050 | reasonably) on the actual cover, and continue the rest onto adjacent
|
|---|
| 1051 | pages.
|
|---|
| 1052 |
|
|---|
| 1053 | If you publish or distribute Opaque copies of the Document numbering
|
|---|
| 1054 | more than 100, you must either include a machine-readable Transparent
|
|---|
| 1055 | copy along with each Opaque copy, or state in or with each Opaque copy
|
|---|
| 1056 | a publicly-accessible computer-network location containing a complete
|
|---|
| 1057 | Transparent copy of the Document, free of added material, which the
|
|---|
| 1058 | general network-using public has access to download anonymously at no
|
|---|
| 1059 | charge using public-standard network protocols. If you use the latter
|
|---|
| 1060 | option, you must take reasonably prudent steps, when you begin
|
|---|
| 1061 | distribution of Opaque copies in quantity, to ensure that this
|
|---|
| 1062 | Transparent copy will remain thus accessible at the stated location
|
|---|
| 1063 | until at least one year after the last time you distribute an Opaque
|
|---|
| 1064 | copy (directly or through your agents or retailers) of that edition to
|
|---|
| 1065 | the public.
|
|---|
| 1066 |
|
|---|
| 1067 | It is requested, but not required, that you contact the authors of
|
|---|
| 1068 | the Document well before redistributing any large number of copies, to
|
|---|
| 1069 | give them a chance to provide you with an updated version of the
|
|---|
| 1070 | Document.
|
|---|
| 1071 |
|
|---|
| 1072 | 4. MODIFICATIONS
|
|---|
| 1073 |
|
|---|
| 1074 | You may copy and distribute a Modified Version of the Document under
|
|---|
| 1075 | the conditions of sections 2 and 3 above, provided that you release the
|
|---|
| 1076 | Modified Version under precisely this License, with the Modified
|
|---|
| 1077 | Version filling the role of the Document, thus licensing distribution
|
|---|
| 1078 | and modification of the Modified Version to whoever possesses a copy of
|
|---|
| 1079 | it. In addition, you must do these things in the Modified Version:
|
|---|
| 1080 |
|
|---|
| 1081 | A. Use in the Title Page (and on the covers, if any) a title distinct
|
|---|
| 1082 | from that of the Document, and from those of previous versions
|
|---|
| 1083 | (which should, if there were any, be listed in the History section
|
|---|
| 1084 | of the Document). You may use the same title as a previous version
|
|---|
| 1085 | if the original publisher of that version gives permission. B. List on
|
|---|
| 1086 | the Title Page, as authors, one or more persons or entities
|
|---|
| 1087 | responsible for authorship of the modifications in the Modified
|
|---|
| 1088 | Version, together with at least five of the principal authors of the
|
|---|
| 1089 | Document (all of its principal authors, if it has less than five). C.
|
|---|
| 1090 | State on the Title page the name of the publisher of the Modified
|
|---|
| 1091 | Version, as the publisher. D. Preserve all the copyright notices of
|
|---|
| 1092 | the Document. E. Add an appropriate copyright notice for your
|
|---|
| 1093 | modifications adjacent to the other copyright notices. F. Include,
|
|---|
| 1094 | immediately after the copyright notices, a license notice giving the
|
|---|
| 1095 | public permission to use the Modified Version under the terms of
|
|---|
| 1096 | this License, in the form shown in the Addendum below. G. Preserve in
|
|---|
| 1097 | that license notice the full lists of Invariant Sections and
|
|---|
| 1098 | required Cover Texts given in the Document's license notice. H.
|
|---|
| 1099 | Include an unaltered copy of this License. I. Preserve the section
|
|---|
| 1100 | entitled "History", and its title, and add to it an item stating at
|
|---|
| 1101 | least the title, year, new authors, and publisher of the Modified
|
|---|
| 1102 | Version as given on the Title Page. If there is no section entitled
|
|---|
| 1103 | "History" in the Document, create one stating the title, year,
|
|---|
| 1104 | authors, and publisher of the Document as given on its Title Page,
|
|---|
| 1105 | then add an item describing the Modified Version as stated in the
|
|---|
| 1106 | previous sentence. J. Preserve the network location, if any, given in
|
|---|
| 1107 | the Document for public access to a Transparent copy of the
|
|---|
| 1108 | Document, and likewise the network locations given in the Document
|
|---|
| 1109 | for previous versions it was based on. These may be placed in the
|
|---|
| 1110 | "History" section. You may omit a network location for a work that
|
|---|
| 1111 | was published at least four years before the Document itself, or if
|
|---|
| 1112 | the original publisher of the version it refers to gives permission.
|
|---|
| 1113 | K. In any section entitled "Acknowledgements" or "Dedications",
|
|---|
| 1114 | preserve the section's title, and preserve in the section all the
|
|---|
| 1115 | substance and tone of each of the contributor acknowledgements
|
|---|
| 1116 | and/or dedications given therein. L. Preserve all the Invariant
|
|---|
| 1117 | Sections of the Document, unaltered in their text and in their
|
|---|
| 1118 | titles. Section numbers or the equivalent are not considered part
|
|---|
| 1119 | of the section titles. M. Delete any section entitled "Endorsements".
|
|---|
| 1120 | Such a section may not be included in the Modified Version. N. Do
|
|---|
| 1121 | not retitle any existing section as "Endorsements" or to conflict in
|
|---|
| 1122 | title with any Invariant Section.
|
|---|
| 1123 |
|
|---|
| 1124 | If the Modified Version includes new front-matter sections or
|
|---|
| 1125 | appendices that qualify as Secondary Sections and contain no material
|
|---|
| 1126 | copied from the Document, you may at your option designate some or all
|
|---|
| 1127 | of these sections as invariant. To do this, add their titles to the
|
|---|
| 1128 | list of Invariant Sections in the Modified Version's license notice.
|
|---|
| 1129 | These titles must be distinct from any other section titles.
|
|---|
| 1130 |
|
|---|
| 1131 | You may add a section entitled "Endorsements", provided it contains
|
|---|
| 1132 | nothing but endorsements of your Modified Version by various
|
|---|
| 1133 | parties-for example, statements of peer review or that the text has
|
|---|
| 1134 | been approved by an organization as the authoritative definition of a
|
|---|
| 1135 | standard.
|
|---|
| 1136 |
|
|---|
| 1137 | You may add a passage of up to five words as a Front-Cover Text, and
|
|---|
| 1138 | a passage of up to 25 words as a Back-Cover Text, to the end of the list
|
|---|
| 1139 | of Cover Texts in the Modified Version. Only one passage of
|
|---|
| 1140 | Front-Cover Text and one of Back-Cover Text may be added by (or through
|
|---|
| 1141 | arrangements made by) any one entity. If the Document already includes
|
|---|
| 1142 | a cover text for the same cover, previously added by you or by
|
|---|
| 1143 | arrangement made by the same entity you are acting on behalf of, you
|
|---|
| 1144 | may not add another; but you may replace the old one, on explicit
|
|---|
| 1145 | permission from the previous publisher that added the old one.
|
|---|
| 1146 |
|
|---|
| 1147 | The author(s) and publisher(s) of the Document do not by this License
|
|---|
| 1148 | give permission to use their names for publicity for or to assert or
|
|---|
| 1149 | imply endorsement of any Modified Version.
|
|---|
| 1150 |
|
|---|
| 1151 | 5. COMBINING DOCUMENTS
|
|---|
| 1152 |
|
|---|
| 1153 | You may combine the Document with other documents released under this
|
|---|
| 1154 | License, under the terms defined in section 4 above for modified
|
|---|
| 1155 | versions, provided that you include in the combination all of the
|
|---|
| 1156 | Invariant Sections of all of the original documents, unmodified, and
|
|---|
| 1157 | list them all as Invariant Sections of your combined work in its
|
|---|
| 1158 | license notice.
|
|---|
| 1159 |
|
|---|
| 1160 | The combined work need only contain one copy of this License, and
|
|---|
| 1161 | multiple identical Invariant Sections may be replaced with a single
|
|---|
| 1162 | copy. If there are multiple Invariant Sections with the same name but
|
|---|
| 1163 | different contents, make the title of each such section unique by
|
|---|
| 1164 | adding at the end of it, in parentheses, the name of the original
|
|---|
| 1165 | author or publisher of that section if known, or else a unique number.
|
|---|
| 1166 | Make the same adjustment to the section titles in the list of Invariant
|
|---|
| 1167 | Sections in the license notice of the combined work.
|
|---|
| 1168 |
|
|---|
| 1169 | In the combination, you must combine any sections entitled "History"
|
|---|
| 1170 | in the various original documents, forming one section entitled
|
|---|
| 1171 | "History"; likewise combine any sections entitled "Acknowledgements",
|
|---|
| 1172 | and any sections entitled "Dedications". You must delete all sections
|
|---|
| 1173 | entitled "Endorsements."
|
|---|
| 1174 |
|
|---|
| 1175 | 6. COLLECTIONS OF DOCUMENTS
|
|---|
| 1176 |
|
|---|
| 1177 | You may make a collection consisting of the Document and other
|
|---|
| 1178 | documents released under this License, and replace the individual
|
|---|
| 1179 | copies of this License in the various documents with a single copy that
|
|---|
| 1180 | is included in the collection, provided that you follow the rules of
|
|---|
| 1181 | this License for verbatim copying of each of the documents in all other
|
|---|
| 1182 | respects.
|
|---|
| 1183 |
|
|---|
| 1184 | You may extract a single document from such a collection, and
|
|---|
| 1185 | distribute it individually under this License, provided you insert a
|
|---|
| 1186 | copy of this License into the extracted document, and follow this
|
|---|
| 1187 | License in all other respects regarding verbatim copying of that
|
|---|
| 1188 | document.
|
|---|
| 1189 |
|
|---|
| 1190 | 7. AGGREGATION WITH INDEPENDENT WORKS
|
|---|
| 1191 |
|
|---|
| 1192 | A compilation of the Document or its derivatives with other separate
|
|---|
| 1193 | and independent documents or works, in or on a volume of a storage or
|
|---|
| 1194 | distribution medium, does not as a whole count as a Modified Version of
|
|---|
| 1195 | the Document, provided no compilation copyright is claimed for the
|
|---|
| 1196 | compilation. Such a compilation is called an "aggregate", and this
|
|---|
| 1197 | License does not apply to the other self-contained works thus compiled
|
|---|
| 1198 | with the Document, on account of their being thus compiled, if they are
|
|---|
| 1199 | not themselves derivative works of the Document.
|
|---|
| 1200 |
|
|---|
| 1201 | If the Cover Text requirement of section 3 is applicable to these
|
|---|
| 1202 | copies of the Document, then if the Document is less than one quarter
|
|---|
| 1203 | of the entire aggregate, the Document's Cover Texts may be placed on
|
|---|
| 1204 | covers that surround only the Document within the aggregate. Otherwise
|
|---|
| 1205 | they must appear on covers around the whole aggregate.
|
|---|
| 1206 |
|
|---|
| 1207 | 8. TRANSLATION
|
|---|
| 1208 |
|
|---|
| 1209 | Translation is considered a kind of modification, so you may
|
|---|
| 1210 | distribute translations of the Document under the terms of section 4.
|
|---|
| 1211 | Replacing Invariant Sections with translations requires special
|
|---|
| 1212 | permission from their copyright holders, but you may include
|
|---|
| 1213 | translations of some or all Invariant Sections in addition to the
|
|---|
| 1214 | original versions of these Invariant Sections. You may include a
|
|---|
| 1215 | translation of this License provided that you also include the original
|
|---|
| 1216 | English version of this License. In case of a disagreement between the
|
|---|
| 1217 | translation and the original English version of this License, the
|
|---|
| 1218 | original English version will prevail.
|
|---|
| 1219 |
|
|---|
| 1220 | 9. TERMINATION
|
|---|
| 1221 |
|
|---|
| 1222 | You may not copy, modify, sublicense, or distribute the Document
|
|---|
| 1223 | except as expressly provided for under this License. Any other attempt
|
|---|
| 1224 | to copy, modify, sublicense or distribute the Document is void, and will
|
|---|
| 1225 | automatically terminate your rights under this License. However,
|
|---|
| 1226 | parties who have received copies, or rights, from you under this
|
|---|
| 1227 | License will not have their licenses terminated so long as such parties
|
|---|
| 1228 | remain in full compliance.
|
|---|
| 1229 |
|
|---|
| 1230 | 10. FUTURE REVISIONS OF THIS LICENSE
|
|---|
| 1231 |
|
|---|
| 1232 | The Free Software Foundation may publish new, revised versions of
|
|---|
| 1233 | the GNU Free Documentation License from time to time. Such new
|
|---|
| 1234 | versions will be similar in spirit to the present version, but may
|
|---|
| 1235 | differ in detail to address new problems or concerns. See
|
|---|
| 1236 | http://www.gnu.org/copyleft/.
|
|---|
| 1237 |
|
|---|
| 1238 | Each version of the License is given a distinguishing version number.
|
|---|
| 1239 | If the Document specifies that a particular numbered version of this
|
|---|
| 1240 | License "or any later version" applies to it, you have the option of
|
|---|
| 1241 | following the terms and conditions either of that specified version or
|
|---|
| 1242 | of any later version that has been published (not as a draft) by the
|
|---|
| 1243 | Free Software Foundation. If the Document does not specify a version
|
|---|
| 1244 | number of this License, you may choose any version ever published (not
|
|---|
| 1245 | as a draft) by the Free Software Foundation.
|
|---|
| 1246 |
|
|---|
| 1247 | ADDENDUM: How to use this License for your documents
|
|---|
| 1248 |
|
|---|
| 1249 | To use this License in a document you have written, include a copy of
|
|---|
| 1250 | the License in the document and put the following copyright and license
|
|---|
| 1251 | notices just after the title page:
|
|---|
| 1252 |
|
|---|
| 1253 | Copyright (c) YEAR YOUR NAME.
|
|---|
| 1254 | Permission is granted to copy, distribute and/or modify this document
|
|---|
| 1255 | under the terms of the GNU Free Documentation License, Version 1.1
|
|---|
| 1256 | or any later version published by the Free Software Foundation;
|
|---|
| 1257 | with the Invariant Sections being LIST THEIR TITLES, with the
|
|---|
| 1258 | Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
|---|
| 1259 | A copy of the license is included in the section entitled "GNU
|
|---|
| 1260 | Free Documentation License".
|
|---|
| 1261 |
|
|---|
| 1262 | If you have no Invariant Sections, write "with no Invariant Sections"
|
|---|
| 1263 | instead of saying which ones are invariant. If you have no Front-Cover
|
|---|
| 1264 | Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
|
|---|
| 1265 | LIST"; likewise for Back-Cover Texts.
|
|---|
| 1266 |
|
|---|
| 1267 | If your document contains nontrivial examples of program code, we
|
|---|
| 1268 | recommend releasing these examples in parallel under your choice of
|
|---|
| 1269 | free software license, such as the GNU General Public License, to
|
|---|
| 1270 | permit their use in free software.
|
|---|
| 1271 |
|
|---|
| 1272 |
|
|---|
| 1273 | File: gasp.info, Node: Index, Prev: GNU Free Documentation License, Up: Top
|
|---|
| 1274 |
|
|---|
| 1275 | Index
|
|---|
| 1276 | *****
|
|---|
| 1277 |
|
|---|
| 1278 | * Menu:
|
|---|
| 1279 |
|
|---|
| 1280 | * ! default comment char: Invoking GASP.
|
|---|
| 1281 | * +: Markers.
|
|---|
| 1282 | * --alternate: Invoking GASP.
|
|---|
| 1283 | * --commentchar 'CHAR': Invoking GASP.
|
|---|
| 1284 | * --copysource: Invoking GASP.
|
|---|
| 1285 | * --debug: Invoking GASP.
|
|---|
| 1286 | * --help: Invoking GASP.
|
|---|
| 1287 | * --mri: Invoking GASP.
|
|---|
| 1288 | * --output OUTFILE: Invoking GASP.
|
|---|
| 1289 | * --print: Invoking GASP.
|
|---|
| 1290 | * --unreasonable: Invoking GASP.
|
|---|
| 1291 | * --version: Invoking GASP.
|
|---|
| 1292 | * -a: Invoking GASP.
|
|---|
| 1293 | * -c 'CHAR': Invoking GASP.
|
|---|
| 1294 | * -d: Invoking GASP.
|
|---|
| 1295 | * -h: Invoking GASP.
|
|---|
| 1296 | * -M: Invoking GASP.
|
|---|
| 1297 | * -o OUTFILE: Invoking GASP.
|
|---|
| 1298 | * -p: Invoking GASP.
|
|---|
| 1299 | * -s: Invoking GASP.
|
|---|
| 1300 | * -u: Invoking GASP.
|
|---|
| 1301 | * -v: Invoking GASP.
|
|---|
| 1302 | * .AELSE: Conditionals.
|
|---|
| 1303 | * .AENDI: Conditionals.
|
|---|
| 1304 | * .AENDR: Loops.
|
|---|
| 1305 | * .AENDW: Loops.
|
|---|
| 1306 | * .AIF "STRA" CMP "STRB": Conditionals.
|
|---|
| 1307 | * .AIF EXPRA CMP EXPRB: Conditionals.
|
|---|
| 1308 | * .ALIGN SIZE: Other Commands.
|
|---|
| 1309 | * .ALTERNATE: Other Commands.
|
|---|
| 1310 | * .AREPEAT AEXP: Loops.
|
|---|
| 1311 | * .AWHILE EXPRA CMP EXPRB: Loops.
|
|---|
| 1312 | * .AWHILE STRA CMP STRB: Loops.
|
|---|
| 1313 | * .DATA EXPR, EXPR, ...: Initialized.
|
|---|
| 1314 | * .DATA.B EXPR, EXPR, ...: Initialized.
|
|---|
| 1315 | * .DATA.L EXPR, EXPR, ...: Initialized.
|
|---|
| 1316 | * .DATA.W EXPR, EXPR, ...: Initialized.
|
|---|
| 1317 | * .DATAB REPEAT, EXPR: Initialized.
|
|---|
| 1318 | * .DATAB.B REPEAT, EXPR: Initialized.
|
|---|
| 1319 | * .DATAB.L REPEAT, EXPR: Initialized.
|
|---|
| 1320 | * .DATAB.W REPEAT, EXPR: Initialized.
|
|---|
| 1321 | * .END: Other Commands.
|
|---|
| 1322 | * .ENDM: Macros.
|
|---|
| 1323 | * .EXITM: Macros.
|
|---|
| 1324 | * .EXPORT NAME: Other Commands.
|
|---|
| 1325 | * .FORM COL=COLS: Listings.
|
|---|
| 1326 | * .FORM LIN=LN: Listings.
|
|---|
| 1327 | * .FORM LIN=LN COL=COLS: Listings.
|
|---|
| 1328 | * .GLOBAL NAME: Other Commands.
|
|---|
| 1329 | * .HEADING STRING: Listings.
|
|---|
| 1330 | * .INCLUDE "STR": Other Commands.
|
|---|
| 1331 | * .INSTR("STRING", "SEG", IX): String Builtins.
|
|---|
| 1332 | * .LEN("STR"): String Builtins.
|
|---|
| 1333 | * .MACRO MACNAME: Macros.
|
|---|
| 1334 | * .MACRO MACNAME MACARGS ...: Macros.
|
|---|
| 1335 | * .ORG: Other Commands.
|
|---|
| 1336 | * .PAGE: Listings.
|
|---|
| 1337 | * .PRINT LIST: Listings.
|
|---|
| 1338 | * .PRINT NOLIST: Listings.
|
|---|
| 1339 | * .PROGRAM: Other Commands.
|
|---|
| 1340 | * .RADIX S: Other Commands.
|
|---|
| 1341 | * .RES COUNT: Uninitialized.
|
|---|
| 1342 | * .RES.B COUNT: Uninitialized.
|
|---|
| 1343 | * .RES.L COUNT: Uninitialized.
|
|---|
| 1344 | * .RES.W COUNT: Uninitialized.
|
|---|
| 1345 | * .SDATA "STR" ...: Initialized.
|
|---|
| 1346 | * .SDATAB REPEAT, "STR" ...: Initialized.
|
|---|
| 1347 | * .SDATAC "STR" ...: Initialized.
|
|---|
| 1348 | * .SDATAZ "STR" ...: Initialized.
|
|---|
| 1349 | * .SRES COUNT: Uninitialized.
|
|---|
| 1350 | * .SRES.B COUNT: Uninitialized.
|
|---|
| 1351 | * .SRES.L COUNT: Uninitialized.
|
|---|
| 1352 | * .SRES.W COUNT: Uninitialized.
|
|---|
| 1353 | * .SRESC COUNT: Uninitialized.
|
|---|
| 1354 | * .SRESC.B COUNT: Uninitialized.
|
|---|
| 1355 | * .SRESC.L COUNT: Uninitialized.
|
|---|
| 1356 | * .SRESC.W COUNT: Uninitialized.
|
|---|
| 1357 | * .SRESZ COUNT: Uninitialized.
|
|---|
| 1358 | * .SRESZ.B COUNT: Uninitialized.
|
|---|
| 1359 | * .SRESZ.L COUNT: Uninitialized.
|
|---|
| 1360 | * .SRESZ.W COUNT: Uninitialized.
|
|---|
| 1361 | * .SUBSTR("STRING",START,LEN): String Builtins.
|
|---|
| 1362 | * ; as comment char: Invoking GASP.
|
|---|
| 1363 | * \@: Macros.
|
|---|
| 1364 | * absolute expressions: Expressions.
|
|---|
| 1365 | * argument fields: Syntax Details.
|
|---|
| 1366 | * avoiding preprocessing: Markers.
|
|---|
| 1367 | * bang, as comment: Invoking GASP.
|
|---|
| 1368 | * breaking out of loops: Loops.
|
|---|
| 1369 | * comment character, changing: Invoking GASP.
|
|---|
| 1370 | * comments: Markers.
|
|---|
| 1371 | * continuation character: Markers.
|
|---|
| 1372 | * copying literally to output: Markers.
|
|---|
| 1373 | * directive field: Syntax Details.
|
|---|
| 1374 | * EQ: Conditionals.
|
|---|
| 1375 | * exclamation mark, as comment: Invoking GASP.
|
|---|
| 1376 | * fields of GASP source line: Syntax Details.
|
|---|
| 1377 | * GE: Conditionals.
|
|---|
| 1378 | * GT: Conditionals.
|
|---|
| 1379 | * INFILE ...: Invoking GASP.
|
|---|
| 1380 | * label field: Syntax Details.
|
|---|
| 1381 | * LE: Conditionals.
|
|---|
| 1382 | * literal copy to output: Markers.
|
|---|
| 1383 | * LOCAL NAME [ , ... ]: Macros.
|
|---|
| 1384 | * loops, breaking out of: Loops.
|
|---|
| 1385 | * LT: Conditionals.
|
|---|
| 1386 | * macros, count executed: Macros.
|
|---|
| 1387 | * NAME .MACRO: Macros.
|
|---|
| 1388 | * NAME .MACRO ( MACARGS ... ): Macros.
|
|---|
| 1389 | * NE: Conditionals.
|
|---|
| 1390 | * number of macros executed: Macros.
|
|---|
| 1391 | * preprocessing, avoiding: Markers.
|
|---|
| 1392 | * PVAR .ASSIGN EXPR: Variables.
|
|---|
| 1393 | * PVAR .ASSIGNA AEXPR: Variables.
|
|---|
| 1394 | * PVAR .ASSIGNC "STR": Variables.
|
|---|
| 1395 | * PVAR .EQU EXPR: Variables.
|
|---|
| 1396 | * PVAR .REG (REGISTER): Variables.
|
|---|
| 1397 | * relocatable expressions: Expressions.
|
|---|
| 1398 | * semicolon, as comment: Invoking GASP.
|
|---|
| 1399 | * shriek, as comment: Invoking GASP.
|
|---|
| 1400 | * symbol separator: Markers.
|
|---|
| 1401 | * symbols, separating from text: Markers.
|
|---|
| 1402 | * text, separating from symbols: Markers.
|
|---|
| 1403 | * whitespace: Syntax Details.
|
|---|
| 1404 |
|
|---|
| 1405 |
|
|---|
| 1406 |
|
|---|
| 1407 | Tag Table:
|
|---|
| 1408 | Node: Top643
|
|---|
| 1409 | Node: Overview1144
|
|---|
| 1410 | Node: Invoking GASP2810
|
|---|
| 1411 | Node: Commands6546
|
|---|
| 1412 | Node: Conditionals7247
|
|---|
| 1413 | Node: Loops9539
|
|---|
| 1414 | Node: Variables11064
|
|---|
| 1415 | Node: Macros13459
|
|---|
| 1416 | Node: Data17421
|
|---|
| 1417 | Node: Initialized17869
|
|---|
| 1418 | Node: Uninitialized20148
|
|---|
| 1419 | Node: Listings21159
|
|---|
| 1420 | Node: Other Commands22355
|
|---|
| 1421 | Node: Syntax Details24107
|
|---|
| 1422 | Node: Markers25243
|
|---|
| 1423 | Node: Constants27491
|
|---|
| 1424 | Node: Symbols28693
|
|---|
| 1425 | Node: Expressions28989
|
|---|
| 1426 | Node: String Builtins30221
|
|---|
| 1427 | Node: Alternate31002
|
|---|
| 1428 | Node: GNU Free Documentation License32620
|
|---|
| 1429 | Node: Index51038
|
|---|
| 1430 |
|
|---|
| 1431 | End Tag Table
|
|---|