Added a sample program.

Change: JAL -> JMP, JALF -> JIF.
This commit is contained in:
2025-08-15 05:39:21 +10:00
parent fe98229539
commit 914c6febbe
4 changed files with 25 additions and 6 deletions

18
examples/hello.s Normal file
View File

@@ -0,0 +1,18 @@
.data:
text0 "Hello, World!\n"
file_name "example.txt"
.code:
sd.int32 $4 123
write_file:
sd.int32 $20 -4
sd.int32 $10 file_name
sd.int32 $11 11
sd.int32 $12 1
sys 5
sd.int32 $11 text0
sd.int32 $12 14
sys 4
return
sd.int32 $10 100
sys 1
bmath add Int32 $4 $5 $6