Moved hellorld program to examples dir

This commit is contained in:
2022-10-27 12:16:36 -04:00
parent 8cb64f4427
commit de92f53f89
3 changed files with 0 additions and 0 deletions

25
examples/hellorld.mas Normal file
View File

@@ -0,0 +1,25 @@
counter, adr string
one, dec 1
string, chr h
chr e
chr l
chr l
chr o
chr r
chr l
chr d
hex a
hex 0
// if the current character is zero, halt
loopStart, loadi counter
skipcond 800
halt
// otherwise, output it, increment, and loop
output
load counter
add one
store counter
jump loopStart