Moved hellorld program to examples dir
This commit is contained in:
25
examples/hellorld.mas
Normal file
25
examples/hellorld.mas
Normal 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
|
||||
Reference in New Issue
Block a user