summaryrefslogtreecommitdiff
path: root/ROMs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-06 22:36:34 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2025-08-06 22:36:34 +1000
commit7a8d2bcd75d88a5429937bf551878c55e1dcf0fd (patch)
tree81bc1f259fb8678513aa8b214df4ef72720bb585 /ROMs
parent16f3cb74564cf7c19da6e13666c98aca36094716 (diff)
moved everything to seperate projects, and started compiler work + push and pop instructions added
Diffstat (limited to 'ROMs')
-rw-r--r--ROMs/.DS_Storebin6148 -> 6148 bytes
-rw-r--r--ROMs/font copy.binbin32768 -> 0 bytes
-rw-r--r--ROMs/font.binbin32768 -> 2048 bytes
-rw-r--r--ROMs/hello_c.asm7
-rw-r--r--ROMs/hello_c.c4
-rw-r--r--ROMs/hello_c.q1bin0 -> 22 bytes
-rw-r--r--ROMs/hello_world.asm (renamed from ROMs/hello_world.dat)15
-rw-r--r--ROMs/hello_world.q1bin32842 -> 2151 bytes
-rw-r--r--ROMs/write_display_direct.asm (renamed from ROMs/write_display_direct.dat)0
9 files changed, 23 insertions, 3 deletions
diff --git a/ROMs/.DS_Store b/ROMs/.DS_Store
index 523af33..775e323 100644
--- a/ROMs/.DS_Store
+++ b/ROMs/.DS_Store
Binary files differ
diff --git a/ROMs/font copy.bin b/ROMs/font copy.bin
deleted file mode 100644
index 88e4a93..0000000
--- a/ROMs/font copy.bin
+++ /dev/null
Binary files differ
diff --git a/ROMs/font.bin b/ROMs/font.bin
index 88e4a93..89f2af5 100644
--- a/ROMs/font.bin
+++ b/ROMs/font.bin
Binary files differ
diff --git a/ROMs/hello_c.asm b/ROMs/hello_c.asm
new file mode 100644
index 0000000..292b99a
--- /dev/null
+++ b/ROMs/hello_c.asm
@@ -0,0 +1,7 @@
+_main:
+ADD 1, 2
+SUB 4, 1
+MUL AX, AX
+MOV AX, V0
+RET
+
diff --git a/ROMs/hello_c.c b/ROMs/hello_c.c
new file mode 100644
index 0000000..46eab8d
--- /dev/null
+++ b/ROMs/hello_c.c
@@ -0,0 +1,4 @@
+int main()
+{
+ return (1 + 2) * (4 - 1);
+} \ No newline at end of file
diff --git a/ROMs/hello_c.q1 b/ROMs/hello_c.q1
new file mode 100644
index 0000000..deffc80
--- /dev/null
+++ b/ROMs/hello_c.q1
Binary files differ
diff --git a/ROMs/hello_world.dat b/ROMs/hello_world.asm
index 6cdacff..1d812fb 100644
--- a/ROMs/hello_world.dat
+++ b/ROMs/hello_world.asm
@@ -5,7 +5,7 @@ font:
.include "font.bin"
program:
- MOV 13, V0 ; Load character #12
+ MOV 0, V0 ; Load character #12
MOV 0, V1 ; X position
MOV 0, V2 ; Y position
MOV 1, V3 ; Color (1 = white)
@@ -26,8 +26,17 @@ write_char:
ADD AX, V1
MOV AX, V4 ; V4 = X position + Y position * 64 (screen index)
- MOV [V0 + $1FFF], V5 ; Read character
+ MOV V4, [$EFFF] ; Debug
+
+ MOV [V0 + $2003], V5 ; Read character (1FFF + 4 since jump address is 1FFF)
+ MOV V5, [$EFFF] ; Debug
+ AND V5, $01 ; Mask to get first bit (color)
+ MOV DX, V5
+ MOV V5, [$EFFF] ; Debug
MUL V5, V3 ; V5 = Character * Color (color index)
MOV AX, V5 ; Store result into V5
- MOV V5, [V4 + $3FFF] ; Write character to screen memory
+
+ MOV V5, [$EFFF] ; Debug
+
+ MOVB V5, [V4 + $402F] ; Write character to screen memory
RET \ No newline at end of file
diff --git a/ROMs/hello_world.q1 b/ROMs/hello_world.q1
index 4c1b1cd..fd66ffe 100644
--- a/ROMs/hello_world.q1
+++ b/ROMs/hello_world.q1
Binary files differ
diff --git a/ROMs/write_display_direct.dat b/ROMs/write_display_direct.asm
index 9fde417..9fde417 100644
--- a/ROMs/write_display_direct.dat
+++ b/ROMs/write_display_direct.asm