From 3d71582dfc45baf2f3b9ba805f8a1c65a4943bf9 Mon Sep 17 00:00:00 2001 From: kdx Date: Fri, 14 Apr 2023 00:05:59 +0200 Subject: we cool? --- samples/shfthelloworld.orgaasm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 samples/shfthelloworld.orgaasm 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 -- cgit v1.2.3