El Cheapo Assembler CheapAss quick reference, v1.0, 2/10/99 To use swap bank other than bank 1: list boot program and change POKE. NED --- C=-INST - Toggle insert mode shift-return - Insert a new line cursor keys, return - What you would expect insert, delete - Likewise shift-clear - Clear all text HOME - Set bookmark C=-HOME - Goto bookmark R/S - Forwards tab (move to next field) shift-R/S - Backwards tab F1 - Assemble F2 - Exit to ML monitor F7 - Disk menu CTRL-a - Delete characters to right of cursor -d - Delete line -b/n - Move to beginning/end of line -B/N - Move to beginning/end of text -c/x - Copy/cut lines to clipboard -p - Paste line from clipboard -j/k - Move 40 columns left/right (max 240 columns) -i/m - Move 25 rows up/down -g - Goto line # -f/F - Find / Force new find -l/L - Find label -o - Oops -- undo changes to current line -= - Comment line of equals-signs -^ - Comment line of * -lira - Comment line of - -z - Re-format all text - <- - Exit to BASIC (SYS 822 to re-enter) Assembler --------- R/S - Halt assembly <- - Toggle screen output label opcode argument comment * Fields must be separated by at least one space * Labels and opcodes are case insensitive * Arguements are 24-bit * Comments ;this is a comment * This is also a comment, provided * is in column 1 * Alternate mnemonics: BCC BLT BCS BGE DEC A DEA INC A INA JSR JSL (Long JSR) JMP JML (Force long JMP) BRK and COP may specify optional one-byte argument. * Quotes: Upper-case letters are 96-127 within single quotes, 192-223 within double quotes; space also has high bit clear/set. CMP #' ' ;CMP #32 CMP #" " ;CMP #160 TXT 'Hola' ;104 79 76 65 TXT "Hola" ;200 79 76 65 * Label '*' refers to address of current opcode * Local labels begin with : (e.g. :LOOP) * Prefixes Immediate mode: Operand One-byte result Two-byte result #$01020304 04 04 03 #<$01020304 04 04 03 #>$01020304 03 03 02 #^$01020304 02 02 01 (El Cheapo currently only 24-bits, not 32-bit) Absolute mode: < Force one byte (direct a.k.a. zero page) ! Force two bytes (absolute) > Force three bytes (abs long) Example: LDA $0203 and LDA !$010203 are equivalent. * Pseudo-Opcodes ORG address Set program ORiGin ORG $C000 ORG Re-ORG *= * Alternate syntax *= $C000 EQU or = EQUate label CHROUT = $FFD2 DFB or DB DeFine Byte DFB 100,$64,%1100100 DA or DW Define Address DA $FFD2 ;D2 FF DLA Define Long Address DA $0102 ;00 01 02 HEX Define hex bytes HEX 20D2FF ;20 D2 FF DS Define Storage DS 5 ;00 00 00 00 00 DS ^ Fill to page boundary DS ^,$3D ;$3D to boundary TXT TeXT TXT 'Hola' ;68 4F 4C 41 TXT "Hola",0d ;C8 4F 4C 41 0D DO arg Conditional assembly DO 0 ;Don't assemble ELSE Reverse last DO FIN End DO/ELSE constructs PUT 'file' Assemble from disk PUT 'test,s' ;SEQ file PUT 'test',9 ;PRG file, dev 9 PRT Redirect screen output to printer PRT 'file' Redirect screen output to disk file REG #arg Set 8/16-bit assembly (set status reg) REG ON Automatically follow REP and SEP (default) REG OFF Don't track REP and SEP Note: 8/16 tracking doesn't track E! AJam ---- a adr Assemble. Use !x !m !! to toggle X and M bits d Disassemble <- Backwards-disassemble lira Toggle REP/SEP tracking , adr byte1 ... Re-disassemble p adr1 adr2 Disassemble range # Number conversion (hex, decimal, binary) r/e Display regs/alternate regs m [adr1] [adr2] Display memory [range] i [adr1] [adr2] Display memory+text [range] i* [adr1] [adr2] Display as screen codes h adr1 adr2 data Hunt. Data is either bytes or "string" f adr1 adr2 byte Fill t adr1 adr2 dest Transfer n adr1 adr2 adr3 dest Relocate (adr1=start, adr2=end, adr3=end vars) w Where am I? -- use to relocate Jammon ;^: Alter regs l "name",dev[,adr] Load s "name",dev,adr1,adr2 Save @ @$ @#dev @command Send disk command/change device/directory/error channel b adr Set breakpoint g [adr] Go z [adr] Zingle Ztep (Zet brkpoint und go!) x Exit to El Cheapo Assembler ? List command keys Memory Map ---------- $0334/$0335 ML monitor vector $0336-$0338 JMP to editor $0800- Source code $8000-$93FF Jammon $9500-$95FF Text buffer $9600-$BFFF CheapAss $C000-$FFFF Label/variable table (temporary) o Code is assembled to swap bank (default = bank one) o Bank 0 swapped on exit to monitor/BASIC, code is translated - If machine crashes, look for text at $xx0800 where xx=swap bank!