From ab4ac6e89c3d7bc709f71dc8e707d6e9feaea14c Mon Sep 17 00:00:00 2001 From: Moon Date: Sun, 24 Jul 2022 17:34:51 -0700 Subject: [PATCH] initial commit --- helloworld.asm | 41 +++++++++++++++++++++++++++++++++++++++++ make.sh | 3 +++ 2 files changed, 44 insertions(+) create mode 100644 helloworld.asm create mode 100755 make.sh diff --git a/helloworld.asm b/helloworld.asm new file mode 100644 index 0000000..5f4b783 --- /dev/null +++ b/helloworld.asm @@ -0,0 +1,41 @@ +KERNAL_CLEAR_SCREEN = $e544 ; KERNAL ROM routine. +VICSCN = $0400 ; VIC-II Screen Video Matrix, 1024 (int). +* = $8000 + + .word coldstart ; coldstart vector + .word warmstart ; warmstart vector + .byte $C3,$C2,$CD,$38,$30 ; "CBM8O". Autostart string + +coldstart + sei + stx $d016 + jsr $fda3 ;Prepare IRQ + jsr $fd50 ;Init memory. Rewrite this routine to speed up boot process. + jsr $fd15 ;Init I/O + jsr $ff5b ;Init video + cli + +warmstart +; Insert your code here + jsr KERNAL_CLEAR_SCREEN + + ; read string by byte into vram until null byte + ldx #0 +loop + lda my_string,x + cmp #$00 + beq bail + sta VICSCN,x + inx + jmp loop +bail + ; pretty colors + inc $d020 + jmp *-3 + +.enc "screen" +my_string .null "HELLO WORLD!" +.enc "none" + +* = $9fff ; fill up to 8k or cartconv will fail + .byte 0 diff --git a/make.sh b/make.sh new file mode 100755 index 0000000..f756c8f --- /dev/null +++ b/make.sh @@ -0,0 +1,3 @@ +#!/bin/sh +64tass helloworld.asm -o helloworld.prg +cartconv -t normal -n "Hello World" -i helloworld.prg -o helloworld.crt