home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / commodore-scene-files / SCPU / Scpuserious / CHEAP.REF < prev    next >
Encoding:
Text File  |  2019-04-13  |  4.5 KB  |  179 lines

  1. El Cheapo Assembler 
  2.  
  3. CheapAss quick reference, v1.0, 2/10/99
  4.  
  5. To use swap bank other than bank 1: list boot program and change POKE.
  6.  
  7. NED
  8. ---
  9.  
  10. C=-INST            - Toggle insert mode
  11. shift-return        - Insert a new line
  12. cursor keys, return - What you would expect
  13. insert, delete      - Likewise
  14. shift-clear         - Clear all text
  15. HOME                - Set bookmark
  16. C=-HOME            - Goto bookmark
  17. R/S            - Forwards tab (move to next field)
  18. shift-R/S        - Backwards tab
  19. F1            - Assemble
  20. F2            - Exit to ML monitor
  21. F7                  - Disk menu
  22.  
  23. CTRL-a    - Delete characters to right of cursor
  24.     -d    - Delete line
  25.     -b/n  - Move to beginning/end of line
  26.     -B/N  - Move to beginning/end of text
  27.     -c/x  - Copy/cut lines to clipboard
  28.     -p    - Paste line from clipboard
  29.     -j/k  - Move 40 columns left/right (max 240 columns)
  30.     -i/m  - Move 25 rows up/down
  31.     -g    - Goto line #
  32.     -f/F  - Find / Force new find
  33.     -l/L  - Find label
  34.     -o    - Oops -- undo changes to current line
  35.     -=    - Comment line of equals-signs
  36.     -^    - Comment line of *
  37.     -lira - Comment line of -
  38.     -z    - Re-format all text
  39.     - <-  - Exit to BASIC (SYS 822 to re-enter)
  40.  
  41.  
  42. Assembler
  43. ---------
  44.  
  45. R/S    - Halt assembly
  46. <-    - Toggle screen output
  47.  
  48. label    opcode    argument    comment
  49.  
  50. * Fields must be separated by at least one space
  51. * Labels and opcodes are case insensitive
  52. * Arguements are 24-bit
  53. * Comments
  54.     ;this is a comment
  55.     * This is also a comment, provided * is in column 1
  56.  
  57. * Alternate mnemonics:
  58.  
  59.     BCC    BLT
  60.     BCS    BGE
  61.     DEC A    DEA
  62.     INC A    INA
  63.     JSR    JSL  (Long JSR)
  64.     JMP    JML  (Force long JMP)
  65.  
  66.   BRK and COP may specify optional one-byte argument.
  67.     
  68. * Quotes: Upper-case letters are 96-127 within single quotes, 
  69.       192-223 within double quotes; space also has high bit clear/set.
  70.  
  71.          CMP #' '    ;CMP #32
  72.         CMP #" "    ;CMP #160
  73.         TXT 'Hola'    ;104 79 76 65
  74.         TXT "Hola"    ;200 79 76 65
  75.  
  76. * Label '*' refers to address of current opcode
  77.  
  78. * Local labels begin with : (e.g. :LOOP)
  79.  
  80. * Prefixes
  81.   Immediate mode:
  82.     Operand       One-byte result  Two-byte result
  83.     
  84.     #$01020304    04        04 03
  85.     #<$01020304    04        04 03
  86.     #>$01020304    03        03 02
  87.     #^$01020304    02        02 01
  88.  
  89.   (El Cheapo currently only 24-bits, not 32-bit)
  90.  
  91.   Absolute mode:
  92.  
  93.     <    Force one byte (direct a.k.a. zero page)
  94.     !    Force two bytes (absolute)
  95.     >    Force three bytes (abs long)
  96.  
  97.   Example: LDA $0203 and LDA !$010203 are equivalent.
  98.  
  99. * Pseudo-Opcodes
  100.  
  101. ORG address    Set program ORiGin    ORG $C000
  102. ORG        Re-ORG
  103. *=  *        Alternate syntax     *= $C000
  104.  
  105. EQU or =    EQUate label         CHROUT = $FFD2
  106.  
  107. DFB or DB    DeFine Byte        DFB 100,$64,%1100100
  108.  
  109. DA or DW     Define Address         DA $FFD2    ;D2 FF
  110.  
  111. DLA         Define Long Address    DA $0102    ;00 01 02
  112.  
  113. HEX        Define hex bytes     HEX 20D2FF    ;20 D2 FF
  114.  
  115. DS        Define Storage        DS 5        ;00 00 00 00 00
  116. DS ^         Fill to page boundary   DS ^,$3D    ;$3D to boundary
  117.  
  118. TXT        TeXT            TXT 'Hola'    ;68 4F 4C 41
  119.                     TXT "Hola",0d   ;C8 4F 4C 41 0D
  120. DO arg        Conditional assembly    DO 0        ;Don't assemble
  121. ELSE        Reverse last DO
  122. FIN        End DO/ELSE constructs
  123.  
  124. PUT 'file'    Assemble from disk    PUT 'test,s'    ;SEQ file
  125.                     PUT 'test',9    ;PRG file, dev 9
  126.  
  127. PRT        Redirect screen output to printer
  128. PRT 'file'    Redirect screen output to disk file
  129.  
  130. REG #arg    Set 8/16-bit assembly (set status reg)
  131. REG ON      Automatically follow REP and SEP (default)
  132. REG OFF        Don't track REP and SEP
  133.         Note: 8/16 tracking doesn't track E!
  134.  
  135. AJam
  136. ----
  137.  
  138. a adr            Assemble.  Use !x !m !! to toggle X and M bits
  139. d            Disassemble
  140. <-            Backwards-disassemble
  141. lira            Toggle REP/SEP tracking
  142. , adr byte1 ...     Re-disassemble
  143. p adr1 adr2        Disassemble range
  144. #            Number conversion (hex, decimal, binary)
  145. r/e            Display regs/alternate regs
  146. m [adr1] [adr2]        Display memory [range]
  147. i [adr1] [adr2]        Display memory+text [range]
  148. i* [adr1] [adr2]    Display as screen codes
  149. h adr1 adr2 data    Hunt.  Data is either bytes or "string"
  150. f adr1 adr2 byte    Fill
  151. t adr1 adr2 dest    Transfer
  152. n adr1 adr2 adr3 dest    Relocate (adr1=start, adr2=end, adr3=end vars)
  153. w            Where am I? -- use to relocate Jammon
  154. ;^:            Alter regs
  155. l "name",dev[,adr]    Load
  156. s "name",dev,adr1,adr2    Save
  157. @ @$ @#dev @command    Send disk command/change device/directory/error channel
  158. b adr            Set breakpoint
  159. g [adr]            Go
  160. z [adr]            Zingle Ztep (Zet brkpoint und go!)
  161. x            Exit to El Cheapo Assembler
  162. ?            List command keys
  163.  
  164. Memory Map
  165. ----------
  166.  
  167.     $0334/$0335    ML monitor vector
  168.     $0336-$0338    JMP to editor
  169.  
  170.     $0800-        Source code
  171.     $8000-$93FF    Jammon
  172.     $9500-$95FF    Text buffer
  173.     $9600-$BFFF    CheapAss
  174.     $C000-$FFFF    Label/variable table (temporary)
  175.  
  176. o Code is assembled to swap bank (default = bank one)
  177. o Bank 0 swapped on exit to monitor/BASIC, code is translated
  178.   - If machine crashes, look for text at $xx0800 where xx=swap bank!
  179.