TX-0 SOLITAIRE = Tape 1 - Macros and symbols
decimal
|deal and initialize tables
	s=slr
	a=add
	g=(s st1) (s to2) (s to3+1) (s to4+2) (s to5+3)
	g=(s to6+4) (s to7+5)
	g=(s st2) (s to3) (s to4+1) (s to5+2) (s to6+3)
	g=(s to7+4)
	g=(s st3) (s to4) (s to5+1) (s to6+2) (s to7+3)
	g=(s st4) (s to5) (s to6+1) (s to7+2)
	g=(s st5) (s to6) (s to7+1)
	g=(s st6) (s to7)
	g=(s st7)

	g=(a dek+28+2) (a st1) (a st2) (a st3) (a st4)
	g=(a st5) (a st6) (a st7) (a to1) (a to2)
	g=(a to3) (a to4) (a to5) (a to6) (a to7)
	a:-0	s:-0	g:-0

|symbols
|table assignments
|conflict transfer vectors
	acj=lcg-10
	bcj=acj+1
	ccj=bcj+1
	dcj=ccj+1
	ecj=dcj+1
	fcj=ecj+1
	gcj=fcj+1
	hcj=gcj+1
	icj=hcj+1
	jcj=icj+1
|conflict table
	ind=dek
	mt1=ind+1	|dek to stk
	mt2=mt1+1	|stk to pak
	mt3=mt2+1	|moves to stk
	mt4=mt3+2	|moves from stk
	mt5=mt4+2	|king
	mt6=mt5+1	|blank
	upt=mt6+1	|stk being investigated
|display temporary storage
	1tm=upt+1
	2tm=1tm+1
	3tm=2tm+1
	4tm=3tm+1
	5tm=4tm+1
|logic temporary storage
	i1=5tm+1
	t1=i1+3
|pak cards
	pk1=t1+5
	pk2=pk1+1
	pk3=pk2+1
	pk4=pk3+1

	pal=tt-mec

octal	lgn=lcg+1	|logic title - flexo characters
	gmc=lgn+1	|game count between summaries
	lrs=gmc+1	|logic reset entry
	log=lcg+4	|logic entry
|Macros

	xx:hlt
	alp:anl+20
	u:-opr
	alm:alr u com

define	addc C
	add (C
	term

define	llrc C
	llr (C
	term

define	clad A
	cla
	add A
	term

define	clac A
	clad (A
	term

define	llac A
	llr A
	lac
	term

define	llcc A
	llr A
	lcc
	term

define	tpos A
	trn .+2
	tra A
	term

define	modify A
	add A
	sto A
	term

define	index A,B
	ado A
	addc B-1
	sto A
	term

define	test A,B
	addc A
	trn B
	term

define	tst0 A,B
	addc A
	tze B
	term

define	stptst A,B,C
	ado A
	test -B,C
	term

define	move A,B
	llr A
	slr B
	term

define	idxtst A,B,C,D
	index A,B
	test -C,D
	term

define	load A,B
	move (B,A
	term

define	check A,B
	clad A
	trn B
	term

define	donow
	sto .+2
	clad
	term

define	type
	pnt	pnt	pno
	term

define	subr B,A
	llrc tra A
	tra B
	term

define	call A
	subr A,.+2
	term

define	count A,B
	llr A
	lal
	sto A
	trn B
	term

define	acst A,B
	addc A
	sto B
	term

define	dump A,B,C
	load R+5,slr C
	load R+4,llr A
	move
	ado R+5
	stptst R+4,llr B,R+4
	term

define	clear A,B,C
	load R+3,slr A
	load A,C
	stptst .-1,slr B,.-1
	term

define	adndo A
	add A
	donow
	term

define	txtpnt A,B
	llr .
	tra tpt
	add A
	-add-B+1
	term

define	tell A,B
	lac
	addc -A
	tze B
	term

define	print
	llrc tze .+2
	tra prn
	term

define	1tblat
	clac char r	
	pno
	term

define	2tblat
	clac char r	
	prt
	pno
	term

define	3tblat
	clac flex 			
	print
	term

define	carret
	clac char r
	pno
	term

define	random	call rdm	term

define	1cdpnt	call cpt	term

define	status	call sts	term

define	movept	call mvp	term

define	deckpt	call dkp	term

define	bk1crd	call bk1	term

define	search	call fnd	term

define	number N,P
	repeat 13,N=N+N
	trn N+P-400+1
	term

define	routine N,P
	number N,P-1-dpt
	term

define	movdet A
	load pui,llr A
	call mmt
	term
decimal

define	crdpnt A,B
	load blx,tra .+6
	load blc,add A
	llrc -add-B-1
	tra blp
	term

define	schpak A,B
	llac pk1+A
	addc -B
	trn .+2
	ial
	term

|end of tape 1

start
0