summaryrefslogtreecommitdiff
path: root/ROMs/hello_world.dat
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/hello_world.dat
parent16f3cb74564cf7c19da6e13666c98aca36094716 (diff)
moved everything to seperate projects, and started compiler work + push and pop instructions added
Diffstat (limited to 'ROMs/hello_world.dat')
-rw-r--r--ROMs/hello_world.dat33
1 files changed, 0 insertions, 33 deletions
diff --git a/ROMs/hello_world.dat b/ROMs/hello_world.dat
deleted file mode 100644
index 6cdacff..0000000
--- a/ROMs/hello_world.dat
+++ /dev/null
@@ -1,33 +0,0 @@
-.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