<-- home

Hello World on the C64

Programming for the Commodore 64 is fun. Of all 8-bit, retro systems, I think, by far, the C64 has the most and the best development tools.

The Commodore 64 is basically extremely mainstream by retrocomputing standards - new software is being written literally daily for a 35 year old computer. Most development these days is done through cross-asselmbers. I personally prefer Kick Assembler, mostly for its advances macro and other features.

This Kick Assembler Package for Sublime Text is very useful. You’ll also want to have an emulator of course. I recommend Vice.

The following is an extremely simple program that makes the screen black, the text white, and prints “HELLO WORLD!” to the middle of the screen.

I’ll add more examples when I have the time.


// Entry point
* = $4000
    // Make screen black and text white
    lda #$00
    sta $d020
    sta $d021
    lda #$01
    sta $0286
    // Clear the screen and jump to draw routine
    jsr $e544
    jsr draw_text
    jmp *

    .text "              hello world!              "

    ldx #$00
    lda msg,x
    sta $05e0,x
    cpx #$28
    bne draw_loop

This results in the following program (here running on Vice): Screenshot