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
---
.gitignore | 2 ++
README.org | 18 +++++++++++++++
flag.prg | Bin 0 -> 59 bytes
flag.s | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
screenshot.png | Bin 0 -> 533289 bytes
5 files changed, 88 insertions(+)
create mode 100644 .gitignore
create mode 100644 README.org
create mode 100644 flag.prg
create mode 100644 flag.s
create mode 100644 screenshot.png
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..491335d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.o
+*.html
diff --git a/README.org b/README.org
new file mode 100644
index 0000000..8830feb
--- /dev/null
+++ b/README.org
@@ -0,0 +1,18 @@
+#+TITLE: C64 Trans Flag
+#+OPTIONS: author:nil num:nil timestamp:nil toc:nil
+#+HTML_DOCTYPE: html5
+#+HTML_LINK_HOME: /
+#+HTML_LINK_UP: /
+What it says on the tin.
+* Soure code download
+[[./flag.s]], compilation and launch instructions included in file.
+* Binary pre-compiled file
+[[./flag.prg]] (maybe not a 1-to-1 compiled version).
+#+BEGIN_SRC sh
+ $ x64sc -autostart flag.prg
+#+END_SRC
+* Screenshat
+#+ATTR_HTML: :width 80%
+[[./screenshot.png]]
+* Source code listing
+#+INCLUDE: "./flag.s" src asm
diff --git a/flag.prg b/flag.prg
new file mode 100644
index 0000000..03c023c
Binary files /dev/null and b/flag.prg differ
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
diff --git a/screenshot.png b/screenshot.png
new file mode 100644
index 0000000..1457749
Binary files /dev/null and b/screenshot.png differ
--
cgit v1.2.3