aboutsummaryrefslogtreecommitdiff
path: root/samples/shfthelloworld.orgaasm
blob: 896b165f1b47e63485929e40b3406b03d502cbf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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