From 734bb850f2167ac2fcd254eb20593ef2c2f6caae Mon Sep 17 00:00:00 2001
From: Uko Kokņevičs
Date: Sat, 24 Feb 2024 17:58:14 +0200
Subject: Initial Commit
---
flag.s | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 flag.s
(limited to 'flag.s')
diff --git a/flag.s b/flag.s
new file mode 100644
index 0000000..7865fac
--- /dev/null
+++ b/flag.s
@@ -0,0 +1,68 @@
+;;; This thing is licensed under Creative Commons Zero v1.0 Universal, which essentially means
+;;; "Public Domain". (You can do anything you want without asking for permission.)
+;;;
+;;; SPDX-License-Identifier: CC0-1.0
+;;;
+;;; To compile (You can get cl65 from )
+;;; $ cl65 -t c64 -C c64-asm.cfg -o flag.prg flag.s
+;;;
+;;; To run (You can get x64sc from )
+;;; $ x64sc -autostart flag.prg
+;;;
+;;; I am not an expert with actual hardware C64, but this should be capable of running on one. I am
+;;; of course not to be held responsible for any actual hardware damage.
+
+ .export __LOADADDR__: absolute = 1
+ .export __EXEHDR__: absolute = 1
+
+.segment "LOADADDR"
+ .word $0801
+ .org $0801
+
+.segment "EXEHDR"
+ ;; 1312 SYS
+ .addr EmptyBasLine
+ .word 1312
+ .byte $9E
+ .byte _start / 1000 .mod 10 + '0'
+ .byte _start / 100 .mod 10 + '0'
+ .byte _start / 10 .mod 10 + '0'
+ .byte _start .mod 10 + '0'
+ .byte 0
+EmptyBasLine:
+ .word 0
+
+.code
+_start:
+ lda #$00 ; Set border colour to black
+ sta $d020
+
+ lda #$03 ; Set text background to cyan
+ sta $d021 ; This lets us not draw the top&bottom bars :)
+
+ jsr $e544 ; Call the KERNAL internal clear screen routine
+ ; See
+
+ ldx #200
+loop:
+ ;; Full block character to each of the three bar text memory
+ lda #$e0
+ sta $400+5*40-1,x
+ sta $400+10*40-1,x
+ sta $400+15*40-1,x
+
+ ;; Pinkish colour to mid-top & mid-bot bar colour memory
+ lda #10
+ sta $d800+5*40-1,x
+ sta $d800+15*40-1,x
+
+ ;; Ditto for white in the middle bar
+ lda #1
+ sta $d800+10*40-1,x
+
+ dex
+ bne loop
+
+halt:
+ ;; Busy spinloop :(
+ jmp halt
--
cgit v1.2.3