Programming with Ophis | ||
---|---|---|
<<< Previous | Ophis Command Reference | Next >>> |
Most arguments are just a number or label. The formats for these are below.
Hex: $41 (Prefixed with $)
Decimal: 65 (No markings)
Octal: 0101 (Prefixed with zero)
Binary: %01000001 (Prefixed with %)
Character: 'A (Prefixed with single quote)
Normal labels are simply referred to by name. Anonymous labels may be referenced with strings of - or + signs (the label - refers to the immediate previous anonymous label, -- the one before that, etc., while + refers to the next anonymous label), and the special label ^ refers to the program counter at the start of the current instruction or directive.
Normal labels are defined by prefixing a line with the label name and then a colon (e.g., label:). Anonymous labels are defined by prefixing a line with an asterisk (e.g., *).
Temporary labels are only reachable from inside the innermost enclosing .scope statement. They are identical to normal labels in every way, except that they start with an underscore.
Strings are enclosed in double quotation marks. Backslashed characters (including backslashes and double quotes) are treated literally, so the string "The man said, \"The \\ character is the backslash.\"" produces the ASCII sequence for The man said, "The \ character is the backslash."
Strings are generally only used as arguments to assembler directives—usually for filenames (e.g., .include) but also for string data (in association with .byte).
It is legal, though unusual, to attempt to pass a string to the other data statements. This will produces a series of words/dwords where all bytes that aren't least-significant are zero. Endianness and size will match what the directive itself indicated.
<<< Previous | Home | Next >>> |
Ophis Command Reference | Up | Compound Arguments |