Hello World on the C64
August 20, 2017
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.
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.
BasicUpstart2(start) // Entry point * = $4000 start: // 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 * msg: .text " hello world! " draw_text: ldx #$00 draw_loop: lda msg,x sta $05e0,x inx cpx #$28 bne draw_loop rts
This results in the following program (here running on Vice):