Usage: glas [options] [file] Options: -o Set output file name. [a.ulx] -l Turn on listing mode. [false] -n Don't patch the ROM header. [false] -L Output label addresses. [false] Syntax: ; end-of-line comment /*...*/ block comments (unnestable) : statement separator for statements on the same line `x evaluates to the character code of the character x Addressing modes: # Immediate (sign extended) ^ Immediate (sign extended) (synonym for #) @ Memory direct & Locals direct * RAM direct Addressing mode size selectors: .l (long) 32 bit data .w (word) 32 bit data (synonym for .l) .s (short) 16 bit data .b (byte) 8 bit data Special symbols: . Current address .. Address of next statement ... Address of statement following next statement RAMSTART Address of start of RAM EXTSTART Address of start of EXTMEM Default addressing modes: Local_var -> & Label_in_ROM -> @ Label_in_RAM -> * Label_in_BSS -> * EXPRESSION -> # Special offseting of operands consisting of a single label: *label -> *label-RAMSTART #label -> #label+2-.. ; only relative branch operands String escapes: Escape Decimal Octal Name \b 8 010 backspace \t 9 011 tab \n 10 012 linefeed \f 12 014 formfeed \r 13 015 carriage return \" 34 042 doublequote \\ 92 134 backslash \ddd ddd precisely three OCTAL digits of a Latin-1 character code Pseudo-ops and directives: .align BOUNDARY [,FILL-VALUE] Pad to alignment BOUNDARY .ascic STRING1, STRING2, ... Assemble byte counted strings .ascicb STRING1, STRING2, ... Assemble byte counted strings .ascicl STRING1, STRING2, ... Assemble long counted strings .ascics STRING1, STRING2, ... Assemble short counted strings .ascicw STRING1, STRING2, ... Assemble long counted strings .ascii STRING1, STRING2, ... Assemble ascii strings .asciz STRING1, STRING2, ... Assemble C-strings .aux NAME [,RAM|ROM|BSS] Create/select string data section NAME .auxstr 0|1|2|4|240|0xE0 Set default string data type .bss NAME [,RAM|ROM|BSS] Create/select common section NAME .byte EXP1, EXP2, ... Assemble bytes .comm NAME, NBYTES [,ALIGNMENT] Create named buffer in common section .commb NAME1, NAME2, ... Create named byte variables in common .comml NAME1, NAME2, ... Create named long variables in common .comms NAME1, NAME2, ... Create named short variables in common .commw NAME1, NAME2, ... Create named long variables in common .end Stop reading input source NAME .equ EXPR Irrevocably make NAME expand to EXPR .err STRING1, STRING2, ... Print strings and flag an error .errif CONDITION, STRING1, STRING2, ... Cause action of .err if CONDITION local NAME1, NAME2, ... Start/continue declaring long locals localb NAME1, NAME2, ... Start/continue declaring byte locals locall NAME1, NAME2, ... Start/continue declaring long locals locals NAME1, NAME2, ... Start/continue declaring short locals localw NAME1, NAME2, ... Start/continue declaring long locals .long EXP1, EXP2, ... Assemble longs .org OFS [,FILL-VALUE] Pad to OFS from start of section .orgabs ADDR [,FILL-VALUE] Pad to absolute address ADDR .print STRING1, STRING2, ... Print strings .prn STRING1, STRING2, ... Print strings .sec NAME [,RAM|ROM|BSS] Create/select current section NAME .section NAME [,RAM|ROM|BSS] Create/select current section NAME NAME .set EXPR Revocably make NAME expand to EXPR .short EXP1, EXP2, ... Assemble shorts .space NBYTES [,FILL-VALUE] Pad with NBYTES bytes of FILL-VALUE .string STRING1, STRING2, ... Assemble E0-type strings .word EXP1, EXP2, ... Assemble longs