
# Copyright Tom Jennings 1999-2002, tomj@wps.com

POINTER eq 0
RETURN eq 0
VAR eq 0

	sector 13		# OPTIMUM 64x5
ttwox:	sta ttwr
	ldm ttchar
	sto ttwv1		# optimum storage
	ld ttw1			# reset table ptr,

ttw0:	sta ttwj2
	ldm ttchar		# A=char,
ttwj2:	jump POINTER		# jump into table,
ttw1:	jump ttw3		# LS char,
	jump ttw2		# 2nd char,
	jump ttw2		# 3rd char,
ttwr:	jump RETURN		# return

# Shift right one character, output it.
ttw2:	sr 0
	sr 0
	sr 0
	sr 0
	sr 0
	sr 0
# Output the LS character, advance the pointer to
# the next character in the word in ttchar.
ttw3:	sto ttchar
	lda C+2
	jump ttyo		# output a char,
	snz			# if it was a NULL,
	jump ttwr		# exit
	ldm ttwj2		# current table ptr,
	add 1			# increment,
	jump ttw0		# loop.

	sector 39		# OPTIMUM 64x5
ttwv1:	VAR

# -----------------------------------------------------


