COSC204: 6809 Emulator

A single page assembler, disassembler, and emulator for entry-level tinkering with the 6809 CPU. See full instructions. Version 1.1.4. Updates and changes

Dark Mode

Memory and Disassembly

Right-click on an address to set/reset breakpoints.
Right-click on an instruction to edit.

Labels

Click on a label to display disassembled code starting at that address.

Code Editor

;
;  Enter your 6809 assembly here
;  Press the Assemble button below
;
screen EQU $0400    ; start of screen
START:
    ldy #message    ; get the address of the string
    bsr PUTS        ; call puts to print it
    rts             ; return to the OS
PUTS:
    pshs a,x,y      ; save a, x, and y
    ldx #screen     ; start of screen
MORE:
    lda 0,y+        ; current char -> A (inc Y too)
    cmpa #$00       ; was it a zero?
    beq DONE        ; if it was 0 then return
    sta 0,x+        ; write (inc X too)
    bra MORE        ; repeat
DONE:
    puls a,x,y      ; restore a, x, y
    rts             ; return from this routine
message:
    .byte "HELLO WORLD", $00 ; our dear string

Status

See the assembler syntax reference for full details.

Text Screen

Text screen is 16 lines of 32 characters starting at address $0400.

Memory Window(s)

Left-click on a byte to set its value from register A, right-click from register B