From 18a248299db11b2e683cc1ab5f3446cd112005eb Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Mon, 1 Apr 2019 09:12:40 +1100 Subject: [PATCH] jimmy id's amazing program, new and improved --- jimmy/Makefile | 11 +++++++++++ jimmy/jimmy.S | 40 ++++++++++++++++++++++++++++++++++++++++ jimmy/jimmy.prg | Bin 0 -> 2122 bytes 3 files changed, 51 insertions(+) create mode 100644 jimmy/Makefile create mode 100644 jimmy/jimmy.S create mode 100644 jimmy/jimmy.prg diff --git a/jimmy/Makefile b/jimmy/Makefile new file mode 100644 index 0000000..4f93d69 --- /dev/null +++ b/jimmy/Makefile @@ -0,0 +1,11 @@ +TARGET = jimmy + +ASM := xa +FLAG := -O PETSCREEN +SRC := jimmy.S + +${TARGET}.prg: ${SRC} + ${ASM} $< ${FLAG} -o $@ + +clean: + rm -f ${TARGET}.prg diff --git a/jimmy/jimmy.S b/jimmy/jimmy.S new file mode 100644 index 0000000..4ba43ca --- /dev/null +++ b/jimmy/jimmy.S @@ -0,0 +1,40 @@ +.byte $01, $08 ; Load this .prg into $0801 + +*=$0801 +.byte $0c, $08, $0a, $00, $9e, $20 +.byte $34, $30, $39, $36, $00, $00 +.byte $00 + +.dsb $1000 - * ; Pad with zeroes from PC to $1000 + + + ldx #$08 ; Screen colours + stx $d020 + ldx #$00 + stx $d021 + + jsr $e544 ; clear screen + jsr print_string + +loop: + lda $dc01 ; Scans the keyboard buffer + cmp #$ef ; If user presses Space ($ef) then quit + bne loop + + rts + +print_string: + ldx #$00 +print_loop: + lda message,x + + cmp #$0 ; return on null terminator + bne print_continue + rts + +print_continue: + sta $0428,x + inx + jmp print_loop + +message: .asc "welcome to scat os@" diff --git a/jimmy/jimmy.prg b/jimmy/jimmy.prg new file mode 100644 index 0000000000000000000000000000000000000000..9ac961493203cae845b688a204d57204c6111930 GIT binary patch literal 2122 zcmZSN;Njq6n5ST3U}?rM3PwX