diff options
author | kdx <kikoodx@paranoici.org> | 2023-04-14 00:05:59 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-04-14 00:05:59 +0200 |
commit | 3d71582dfc45baf2f3b9ba805f8a1c65a4943bf9 (patch) | |
tree | 4ada87e80ab9c555ec56e839aa72af033e594e31 | |
parent | bb465e00c234c9f73f5ad18e2a10dd0709702737 (diff) | |
download | orga-3d71582dfc45baf2f3b9ba805f8a1c65a4943bf9.tar.gz |
we cool?
-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 |