; "Hello World" in dasm assembler format. ; This could actually be done in less code since the display ; BIOS can output strings. ; tpasm -l hello.out hello.asm -P 6502 processor 6502 ddata equ $efa0 ; Display data address. dcommand equ $efa1 ; Display command address. org $200 ; Code start. ldx #0 ; Starting index 0 in X register. printnext: lda text,x ; Get character from string. beq done ; If we read a 0 we're done. sta ddata ; Output character. lda #$7 sta dcommand inx ; Increment index to next character. bne printnext ; Repeat if index doesn't overflow to 0. done: brk ; Just die. text: dc.b "Hello, world!", $00