LANGUAGES

6809 ASSEMBLER.

The language of the processor itself, the Motorola 6809 of the TO7, MO5 and MO6. Each line is one machine instruction: load a register, add, jump. The cartridge brings a column editor, a two-pass assembler, a disassembler and a monitor to run, stop and step through a program. Code runs at 1 MHz, as on the MO6. The full reference, with every instruction, directive and monitor call and an example run on the machine, is in French.

* BONJOUR.ASM
          ORG    $2000
DEBUT     LDX    #MESSAGE         ; X: address of the text
          SYS    PUTS             ; prints up to the zero byte
          RTS                     ; back to the monitor
MESSAGE   FCC    "BONJOUR DU 6809 !"
          FCB    13,0
          END    DEBUT

Columns

  • Four fields per line: label, mnemonic, operand, comment
  • Type freely, loop lda #1 first: on Enter the line falls into its columns and the mnemonic is upper-cased
  • The next line starts right in the mnemonic column; Tab moves to the next field, Shift+Tab goes back
  • Every other field is shaded and the status bar names the field under the cursor; Ctrl+L realigns the whole program
  • Colouring of labels, instructions, directives, registers, numbers, strings and comments, in the editor and at the prompt
  • * or ; at the start of a line: a remark

The monitor

  • RUN assembles and runs; ASM only assembles, G 2000 runs from an address
  • B LOOP sets a breakpoint, CONT resumes, S 5 runs five instructions and shows each one
  • R shows the registers, R A=12 X=2000 changes them
  • D 2000 dumps memory, U START disassembles, M 3000 86 41 writes bytes
  • SYM lists the symbols, LST the assembled listing with addresses and bytes
  • CPU MAX lifts the 1 MHz limit; Escape stops a program stuck in a loop

The 6809

  • The whole instruction set, all 59 mnemonics and the long forms LBNE, LBSR…
  • Every mode: # immediate, < direct page, extended, indexed 5,X, ,Y++, A,U, [,X], PC-relative TEXT,PCR
  • Directives ORG, EQU, FCB, FDB, FCC, FCN, RMB, SETDP, INCLUDE, END
  • SYS calls the monitor, MO5 style: PUTS, PUTDEC, GETLINE, LINE, BOXF, WAITVBL, JOY, SPEAK… AIDE SYS lists them all
  • The graphics chip registers ($A400, sprites) and the sound chip ($A600) are written like memory

Try it

In the machine, choose the ASSEMBLEUR cartridge. RUN "3:BONJOUR" runs a first program; disk 3 also holds DESSIN, SPRITE and DEVINE. EDIT opens the editor, SAVE "NAME" writes an .ASM file. A source line typed at the prompt, or a pasted program, joins the program, aligned in its columns. The monitor speaks French, like the rest of the machine.