diff options
Diffstat (limited to 'samples/shfthelloworld.orgaasm')
-rw-r--r-- | samples/shfthelloworld.orgaasm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/samples/shfthelloworld.orgaasm b/samples/shfthelloworld.orgaasm new file mode 100644 index 0000000..896b165 --- /dev/null +++ b/samples/shfthelloworld.orgaasm @@ -0,0 +1,17 @@ +LIT ,hellostr +JRT ,putstr +RET + +@putstr ( str -- ) + DUP LDA ( read memory ) + DUP #00ff AND ( split the short in two ) + SWP #0008 RSF + WRT WRT ( write ) + INC ( increment pointer ) + DUP LDA ( loop until end of string ) + JNZ ,putstr + POP +RET + +( "hello world" ) +@hellostr 6865 6c6c 6f20 776f 726c 640a 0000 |