summaryrefslogtreecommitdiff
path: root/ROMs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-05 21:24:16 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-05 21:24:16 +1000
commit16f3cb74564cf7c19da6e13666c98aca36094716 (patch)
tree7346a7c12a82bc372ed82dad8e9a5d9ad6b098b7 /ROMs
parent72f297a479b6749674ec80e91be53b8c482123d2 (diff)
updates
Diffstat (limited to 'ROMs')
-rw-r--r--ROMs/.DS_Storebin6148 -> 6148 bytes
-rw-r--r--ROMs/font copy.binbin0 -> 32768 bytes
-rw-r--r--ROMs/font.binbin0 -> 32768 bytes
-rw-r--r--ROMs/hello_world.dat33
-rw-r--r--ROMs/hello_world.q1bin0 -> 32842 bytes
-rw-r--r--ROMs/manual.q1 (renamed from ROMs/test.q1)bin10 -> 10 bytes
-rw-r--r--ROMs/script.dat24
-rw-r--r--ROMs/script.q1bin67 -> 0 bytes
-rw-r--r--ROMs/write_display_direct.dat21
-rw-r--r--ROMs/write_display_direct.q1bin0 -> 51 bytes
10 files changed, 54 insertions, 24 deletions
diff --git a/ROMs/.DS_Store b/ROMs/.DS_Store
index 28ca9c8..523af33 100644
--- a/ROMs/.DS_Store
+++ b/ROMs/.DS_Store
Binary files differ
diff --git a/ROMs/font copy.bin b/ROMs/font copy.bin
new file mode 100644
index 0000000..88e4a93
--- /dev/null
+++ b/ROMs/font copy.bin
Binary files differ
diff --git a/ROMs/font.bin b/ROMs/font.bin
new file mode 100644
index 0000000..88e4a93
--- /dev/null
+++ b/ROMs/font.bin
Binary files differ
diff --git a/ROMs/hello_world.dat b/ROMs/hello_world.dat
new file mode 100644
index 0000000..6cdacff
--- /dev/null
+++ b/ROMs/hello_world.dat
@@ -0,0 +1,33 @@
+.org $1FFF
+JMP program
+
+font:
+ .include "font.bin"
+
+program:
+ MOV 13, V0 ; Load character #12
+ MOV 0, V1 ; X position
+ MOV 0, V2 ; Y position
+ MOV 1, V3 ; Color (1 = white)
+ CALL write_char ; Call function to write character
+ SUS
+
+write_char:
+ ; V0: Character to write
+ ; V1: X position
+ ; V2: Y position
+ ; V3: Color
+ ; Write a character to the screen at (V1, V2) with color V3
+
+ MUL V0, 64 ; V0 = Character * 64 (character size)
+ MOV AX, V0 ; Store result back into character
+
+ MUL V2, 64
+ ADD AX, V1
+ MOV AX, V4 ; V4 = X position + Y position * 64 (screen index)
+
+ MOV [V0 + $1FFF], V5 ; Read character
+ MUL V5, V3 ; V5 = Character * Color (color index)
+ MOV AX, V5 ; Store result into V5
+ MOV V5, [V4 + $3FFF] ; Write character to screen memory
+ RET \ No newline at end of file
diff --git a/ROMs/hello_world.q1 b/ROMs/hello_world.q1
new file mode 100644
index 0000000..4c1b1cd
--- /dev/null
+++ b/ROMs/hello_world.q1
Binary files differ
diff --git a/ROMs/test.q1 b/ROMs/manual.q1
index b166c7a..b166c7a 100644
--- a/ROMs/test.q1
+++ b/ROMs/manual.q1
Binary files differ
diff --git a/ROMs/script.dat b/ROMs/script.dat
deleted file mode 100644
index c2c5dc2..0000000
--- a/ROMs/script.dat
+++ /dev/null
@@ -1,24 +0,0 @@
-.org $1FFF
-
-program:
-MOV $0000, V0
-MUL 32, 64 ; Set V1 to 32 * 64
-MOV AX, V1 ; Copy V1 to AX
-MOV 1, V2 ; Color value 1
-
-reset:
-INC
-MOV $0000, V0 ;
-ADD V2, 1 ; Increment color value V2
-MOV AX, V2 ; Copy V2 to AX
-
-draw:
-ADD V0, 2 ; Increment V0 by 1
-MOV AX, V0 ; Copy AX to V0
-
-GT V0, V1 ; V0 > V1?
-BZ
-JMP reset
-
-MOV $06, [V0+$3FFF] ; Set pixel at V0 to color 6
-JMP draw ; Repeat drawing \ No newline at end of file
diff --git a/ROMs/script.q1 b/ROMs/script.q1
deleted file mode 100644
index 3de4840..0000000
--- a/ROMs/script.q1
+++ /dev/null
Binary files differ
diff --git a/ROMs/write_display_direct.dat b/ROMs/write_display_direct.dat
new file mode 100644
index 0000000..9fde417
--- /dev/null
+++ b/ROMs/write_display_direct.dat
@@ -0,0 +1,21 @@
+.org $1FFF
+
+program:
+MOV $0000, V0
+MUL 32, 64 ; Set AX to 32 * 64
+MOV AX, V1 ; Copy AX to V1
+MOV 1, V2 ; Color value 1
+
+reset:
+MOV 0, V0
+INC V2 ; Increment color value
+
+draw:
+GT V0, V1 ; V0 > V1?
+BZ ; If number exceeds, branch to reset
+JMP reset
+
+MOVB V2, [V0+$402F] ; Set pixel at V0 to color 6
+INC V0 ; Increment V0
+
+JMP draw ; Repeat drawing \ No newline at end of file
diff --git a/ROMs/write_display_direct.q1 b/ROMs/write_display_direct.q1
new file mode 100644
index 0000000..4041649
--- /dev/null
+++ b/ROMs/write_display_direct.q1
Binary files differ