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

( "hello world" )
@hellostr 6865 6c6c 6f20 776f 726c 640a 0000