
dots 4=6/15/63

|dots board display

	tra beg

db,	sxa dbx		|display board
	ldx (-17

db3,	lax lor+17
	add (1001
	dis
	add (-2000
	dis
	add (-2
	dis
	add (2000
	dis
	tix db3
	ldx (-10

db4,	lax sqp+10
	sto .+1
	hlt
	trn db5

db6,	tix db4
	ldx (-33

db1,	lax lnt+33
	trn dbl
	tze dcd
	lda (14
	xad
	llr (2000
	trn .+2
	llr (2
	lax lor+33
	sxa dbt
	ldx (57
	dis+lad-opr
	tix .-1
	ldx dbt

dbl,	tix db1
	tacUcyr
	trn beg

dbx,	tra .

dcd,	lda (14		|display control dots
	xad
	llr (60000
	trn .+2
	llr (60
	pen
	lax lor+33
	lad
	dis
	pen 40
	trn dbl
	sxa DB2
	tra dbl

dbt,	trn

db5,	sxa dbt
	add (-600045
	tze db7
	trn db6
	lax sog+10
	tsx dp
db8,	ldx dbt
	tra db6

db7,	lax sog+10
	tsx dm
	tra db8

|line origin table

lor,	160001	320001	460001	620001
	160141	320141	460141	620141
	160301	320301	460301	620301
	160441	320441	460441	620441
	160001	320001	460001	620001
	160141	320141	460141	620141
	160301	320301	460301	620301

z=47047

sog,	160001+z	320001+z	460001+z
	160141+z	320141+z	460141+z
	160301+z	320301+z	460301+z

lnt,	lnt+34|

dp,	llr (llr cwdp	|display p
	tra .+2

dm,	llr (llr cwdm	|display m
	sxa dmx
	tsx cwd

dmx,	tra .

|dots playing program

beg,	tsx rst		|enter program here

nm,	lda MP		|new move
	tze mac
	stz DB2
	stz NM3
	tsx data

nm1,	tsx db
	tsx arrow
	lda DB2
	tze nm1-1
	lda NM3
	tze .+2
	tsx rev
	lda DB2
	sto NM3
	add (34
	tsx upd
	tsx dcl
	pen
	trn nm
	tra nm1

dcl,	pen		|display code letter
	lda mp
	tze .+3
	lda (376714
	tra dp
	lda (376714
	tra dm

data,	sxa tnx		|data display
	tac+40
	cyl
	cyl
	trn tnx
	lda 0
	sto tnc
	tra tn3+2

tnk,	tac+40		|thinking display
	slr TNT
	trn (trx 0
	stz TNC
	sxa tnx

tn1,	tsx db
	ldx fMi
	lax
	axrUcll
	add (-17
	trn tn2
	llr (llr cwdar
	lda (746044

tn3,	adx lor
	tsx cwd
	lda (300700
	sto COord
	lda uDca
	tze .+4
	tsx ddo
	llr (llr minus
	tsx cwdstp
	lda udc
	tsx ddo
	llr (llr cwda
	lda (100570
	sto coord
	tsx cwd
	llr (llr cwdeq
	tsx cwdstp
	lda mim
	tsx ddo
	llr (llr cwdb
	lda (560570
	sto coord
	tsx cwd
	llr (llr cwdeq
	tsx cwdstp
	lda mim+1
	tsx ddo
	ado TNC
	com
	add 0

tnx,	trn .
	tra tn1

tn2,	llr (llr cwdad
	lda (50006
	tra tn3

arrow,	sxa arrowx	|arrow display
	ldx up7
	tix .+1
	llx 0

arrow1,	xac
	add (-udl+1
	trn arrowx
	sxa arrowt
	lacUlxr
	cll
	add (-17
	trn arrow3
	llr (llr cwdar
	lda (746044

arrow4,	adx lor
	tsx cwd
	ldx arrowt
	lax 0
	tix .+1
	llx 0
	ora
	clr
	tze arrow1

arrowx,	tra .

arrow3,	llr (llr cwdad
	lda (50006
	tra arrow4

arrowt,	0
83sn5>>76<<
|code word display

cwdstp,	lda coord
	add (30000
	sto coord

cwd,	sxa cwx
	slr cw1
	lxr
	llx 1
	ial+com-opr
	trn dn1
	lac
	add dn2
	tra .+2
dn1,	lac
	ldx (21
cw1,	xx
cw2,	ill
	trn cw3
	ial
cw4,	adx tbl
	tix cw2
	alr
	ado cw1
	xac
cwx,	trn .
	lac
	ldx (-20
	tra cw1

cw3,	ial
	dis
	tra cw4

tbl-20,	tbl=.+20
	tbl+22|

dn2,	.+1|

|size change subroutine

siz,	sxa xit
	all
	ldx (7
	cyl
	tix .-1
	ldx (41
	stx tbl-20
	tix .-1
	cyl	cyl
	lcd
	sto tbl-17
	sto tbl-12
	sto tbl-5
	sto tbl+3
	sto tbl+10
	sto tbl+15
	lal
	com
	sto dn2
xit,	tra .
	ill=ial-10

table,	llr cwd0
	llr cwd1
	llr cwd2
	llr cwd3
	llr cwd4
	llr cwd5
	llr cwd6
	llr cwd7
	llr cwd8
	llr cwd9

cwd0,	62245	122446	|0
cwd1,	561020	10604	|1
cwd2,	774101	203056	|2
cwd3,	164204	203056	|3
cwd4,	420413	344506	|4
cwd5,	164204	175037	|5
cwd6,	564307	241056	|6
cwd7,	502040	4077	|7
cwd8,	564305	243056	|8
cwd9,	564205	343056	|9

minus,	400001	300000	|-
cwdar,	401013	304200	|arrow right
cwdad,	401072	110200	|arrow down
cwdeq,	174	76000	|=
cwda,	614307	343056	|A
cwdb,	764307	243076	|B
cwdm,	214306	153561	|M
cwdp,	604103	243076	|P
cwdf,	604103	241037	|F
cwdo,	164306	143056	|O

|signed decimal display out

ddo,	sxa ddox
	stz iZi
	ldx (5
	com
	sto numBer
	trn ddo4+1
	com
	sto number
	sxa deplc
	llr (llr minus
	tra ddo5

ddo3,	sxa deplc
	ldx count
	llx table
	xac
	add izi
	tze ddo4
	slr izi

ddo5,	tsx cwdstp

ddo4,	ldx deplc
	stz Count
	tra ddo1

ddo2,	sto number
	ado count

ddo1,	lda number
	adx deplet
	trn ddo2
	tix ddo3
	ldx count
	llx table
	tsx cwdstp

ddox,	tra .

deplc,	0

decimal

deplet,	1
	10
	100
	1000
	10000
	100000

octal

mac,	tac		|machine to move
	cyl
	trn nm+2
	stz LAN
	lda (ldx sqp-1
	sto gl1

ma1,	tsx glm
	tra ma3
	tsx upd
	tsx tnk
	ado lan
	tra ma1-2

ma3,	stz BCT
	lda (34
	sto FAMT

ma4,	tsx fm
	tra ma2
	alr
	lda bct
	com
	add 2
	trn .+3
	ado bct
	tra ma4
	lac
	tsx upd
	tra nm

ma2,	lda scm
	add scp
	add (-11
	tze nm1-3
	tra .+4
	sxa lan
	tsx rev
	tsx tnk
	ldx lan
	tix .-4

|tree routine with alpha-beta

la,	lda up7
	sto fmi
	stz BMi
	stz LAN
	stz sEx
	stz uDc
	stz uDca
	lda 3
	sto mim-2
	lda 4
	sto mim-1

la1,	lda mp
	com
	sto MPT
	ldx sex
	llx mim-2

la6,	slx mim
	tra lae		|call the move orderer

la4,	lda lan		|move orderer exits here when
	tze dun		|out of moves on this level
	tsx rev
	tsx tnk		|note, routine tnk places c(lr) into tnt
	ldx lan
	tix .+1
	sxa lan
	lda mp
	add mpt
	tze la9

lag,	ldx sex
	tix .+1
	sxa sex
	lda mp
	com
	sto mpt
	llx mim+1
	tze la8
	lcc
	adx mim
	trn la9
	lax mim-1
	lcd

lah,	trn laj
	slx mim
	tix la9
	lda lan		|save principal variation
	com
	axr
	sto bm
	lda .-1
	sto bmi
	sto pvar2
	lda up7
	add (lax-sto
	sto pvar1

pvar3,	ado .+2

pvar1,	xx

pvar2,	xx
	tix pvar3

la9,	tacUcyr		|call the move orderer for
	cyr		|another move on this level
	trn la4
	ldx lan
	lax sympl
	sto symp
	lax ptb
	trx rtp

bm,	bm+31|

laj,	ldx lan		|alpha-beta cutoff
	tix .+2
	tra dun
	sxa lan
	tsx rev
	tsx tnk
	lda mp
	add mpt
	tze laj
	ldx sex
	tix .+1
	sxa sex
	lda mp
	com
	sto mpt
	tra la9

la3,	ldx lan		|move orderer exits here
	stx ptb
	slx rtp
	sto mov		|check symmetry
	ldx sYmp
	aux mov
	lax 0
	trn la9+3
	lda mov
	tsx upd
	tsx tnk
	ado lan
	lda mp
	add mpt
	tze oppess
	ado sex
	tra la1

nogood,	tsx db		|tree has failed to find any best move
	pen
	llr (llr cwdf
	lda (340700
	sto coord
	tsx cwd
	llr (llr cwdo
	tsx cwdstp
	llr (llr cwdo
	tsx cwdstp
	pen
	trn la
	tra nogood

la5,	lda scm		|move orderer exits here when
	ldx sex		|the end of the tree is reached
	stx mim
	ldx lan
	tix .+1
	sxa lan
	tsx rev
	tsx tnk
	lda mp
	add mpt
	tze la5+3
	tra lag

la8,	lax mim
	lcd
	trn la9
	lcc
	adx mim-1
	tra lah

dun,	lda bmi		|the tree is done
	tze nogood
	lda (lda bm+1
	sto dun1
	tra dun1
	sxa bm
	ado dun1

dun1,	xx
	tsx upd
	ldx bm
	tix dun1-2
	tra nm

	xx
	xx
mim,	mim+30|		|minimax table

oppess,	ldx sex		|optimistic-pessamistic evaluation
	lda mp
	tze pess
	lda scp
	adx mim-1
	com
	add (11
	tra optim1

pess,	lda scm
	com
	adx mim-1

optim1,	trn laj

|heuristic move orderer

mo,lae,	lda (34
	sto famT
	tsx te
	tra sym
	llr sympt
	slr symp
	tra gly

sympl,	sympl+31|	|symmetry pointer list

sym,	stz sYMi		|symmetry detector
	tsx sym1
	tra syma
	tsx sym3
	tra syme

symd,	ldx symi
	lax sympt
	sto symp
	ldx lan
	stx sympl
	tsx bc
	axr
	tix mo0
	lda (34
	sto famt
	tsx ss
	tra fmn
	tra .+4

fmyy,	sto famt
	tsx ss
	tra mo8
	llr (tra fmyy
	tra la3

fmn,	lda (34
	sto FAMT
	tsx fm
	tra mo1
	tra .+4

fmy,	sto famt
	tsx fm
	tra mo8
	llr (tra fmy
	tra la3

sympt,	sym0t		|symmetry pointer table
	sym1t
	sym3t
	sym13t
	sym37t
	sym5t
	sym15t
	symhrt

mo8,	lda (34

crm,	sto famt
	tsx gma
	tra la4
	sto mov
	sto mctb
	stz tem
	tsx upd
	ado tem
	tsx bc
	llr (ldx sqp-1
	slr gl1
	tsx glm
	hlt
	tsx glm
	tra cr2

cr3,	tsx chain
	tra cr2
	sto mctb
	tsx upd
	ado tem
	ldx mctb
	aux symp
	lax 0
	trn cr3
	lda mov
	com
	add mctb
	trn cr1
	tra cr3

cr7,	sxa tem
	tsx rev
cr1,	ldx tem
	tix cr7
	lac
	tra crm

cr2,	lda mctb
	axr
	add (-17
	trn cr4
	lax sqr-14
	trn .+3
	lda (sqr-14
	tra cr5
	lda (sqr-15
	tra cr5

cr4,	lax sqr+4
	trn .+3
	lda (sqr+4
	tra cr5
	lda (sqr

cr5,	xad
	sto mctb

cr8,	llr (ldx sqp-1
	slr gl1
	tsx glm
	tra cr6
	sto mcta
	xcc
	add mctb
	tze cr6
	lda mcta
	tsx upd
	ado tem
	ldx mcta
	aux symp
	lax 0
	trn cr8
	lda mcta
	com
	add mov
	trn cr8
	tra cr1

cr6,	lda bct
	add (-2
	tze cr9
	tra .+3
cr0,	sxa tem
	tsx rev
	ldx tem
	tix cr0
cr01,	lac
	llr (tra crm
	tra la3

cr9,	ldx tem
	tix .+4
	sxa tem
	tsx rev
	ldx tem
	tix cr9+2
	lda (34
	sto famt
	tsx te
	tra cr02
	tsx rev
	tra cr01

cr02,	tsx chain
	hlt
	sto mov
	tsx rev
	ldx lan
	slx ptb
	lda mov
	llr (tra crm
	tra la3+2

mo1,	lda (34
	sto MOT
	sto famt

mo5,	lda scm
	add scp
	add (-11
	tze la5
	ldx famt
	tra mo5a
	lax lnt
	tze .+3

mo5a,	tix .-2
	tra mo4
	trn .-2
	xac
	tsx upd
	tsx bc
	sto Mtt
	com
	add mot
	trn mo5c
	lda mt
	add (-2
	tze mo6

mo7,	tsx rev
	lxr
	aux symp
	lax 0
	lxr

mo5b,	trn mo5a
	slr Mov
	lda mtt
	sto mot
	tra mo5a

mo5c,	tsx rev
	lxr
	tra mo5a

mo6,	llr (34
	slr famt
	tsx te
	tra .+2
	tra mo7
	llr (ldx sqp-1
	slr gl1
	tsx glm
	hlt
	sto Tem
	tsx rev
	ldx tem
	aux symp
	lax 0
	lxr
	llr tem
	tra mo5b

mo4,	lda mov

gly,	llr (tra la4
	tra la3

mo0,	tix mo2
	hlt

mo2,	tix mo3
	ldx up7
	lax 1
	llx 0
	cllUial
	ldx lan
	slx ptb
	llr (tra gly
	cll
	tra la3+2

mo3,	xac
	add (3
	lcd
	tze .+2
	tix mo9

mo3a,	lda (ldx sqp-1
	sto gl1
	tsx glm
	hlt
	alrUaxr
	aux symp
	lax 0
	trn mo3a+2
	lac
	tra gly

rtp,	rtp+30|		|reentry pointers
ptb,	ptb+30|		|reentry parameters

mo9,	tix more4
	lda (ldx sqp-1
	sto gl1
	tsx glm
	hlt
	alrUaxr
	aux symp
	lax 0
	trn mo9+3
	lac
	llr (tra mo9a
	tra la3

mo9a,	tsx upd
	tsx chain
	hlt
	sto mov
	tsx rev
	tra gly-1

more4,	stz Mctb
	stz cir4in
	lda (ldx sqp-1
	sto gl1

more4b,	lda scm
	add scp
	com
	sto Bcta
	stz Mcta
	tsx glm
	tra more4g
	sto mov
	add symp
	axr
	lax 0
	trn more4b+5
	lda mov

more4a,	tsx upd
	ado mcta
	ado mctb
	tsx chain
	tra more4c
	tra more4a

more4c,	lda scm
	add scp
	add bcta
	add (-4
	tze more4d
	trn more4e
	tra more4f
	sxa mctb
	tsx rev

more4f,	ldx mctb
	tix .-3
	tra gly-1

more4d,	lda Cir4in
	trn more4f
	clc
	sto cir4in
	lda mov
	sto Mov2
	tra more4b

more4e,	add (4
	com
	add mcta
	tze more4b
	tra more4f

more4g,	lda mov2
	sto mov
	tra more4f

|board scanning subroutines

bc,	sxa bcx		|counts number of boxes which can be
	stz MCT		|taken from the present board position
	lda scm
	add scp
	com
	sto BCT

bc3,	lda (ldx sqp-1
	sto gl1
	tsx glm
	tra bc2
	tsx upd
	ado mct
	tra bc3

bc2,	lda scm
	add scp
	add bct
	sto bct
	ldx mct
	tra bc1

bc5,	sxa bcu
	tsx rev
	slr tnt
	ldx bcu

bc1,	tix bc5
	lda bct
	llr mct

bcx,	tra .

bcu,	0

glm,	sxa glx		|finds moves which take boxes
	llr (-440000
	ado gl1
	add (-ldx-sqp-11
	tze glx

gl1,	xx
	lax 0
	clr+lad-opr
	tze gl2
	tra glm+2

gl2,	ado glx
	lax 0
	cll+xcd-opr
	add (45-sqr-4

glx,	tra .

fam,	sxa famx		|common routine, scans line table
	ldx famt
	tra fam1

fam3,	lax lnt
	tze fam2

fam1,	tix fam3

famsx,	tra .

fam2,	trn fam1
	llr (20
	cla 127
	tze fam4
	lax sqr-14
	llx sqr-15

famx,	tra .

fam4,	lax sqr+4
	llx sqr
	tra famx

famokx,	ado famsx
	xac
	sto famT
	tra famsx

fm,	sxa famsx	|finds free moves
	tsx fam
	ora-10
	trn fam1
	tra famokx

gma,	sxa famsx	|finds not free moves
	tsx fam
	ora-10
	trn famokx
	tra fam1

te,	sxa famsx	|finds singles
	tsx fam
	trn te6
	add (140000
	trn fam1
	lcc
	trn fam1
	tra famokx

te6,	lac
	trn famokx
	add (140000
	trn fam1
	tra famokx

ss,	sxa famsx	|finds free moves which do not
	tsx fam		|fall on the edge and complete a
	trx lnt2		|first side

lnt2,	tra ss1+1
	tra ss1+1
	tra ss1+1
	xx

	tra fm+2
	tra fm+2
	tra fm+2
	xx

	tra fm+2
	tra fm+2
	tra fm+2
	xx

	tra ss1
	tra ss1
	tra ss1
	xx

	tra ss1+1
	tra fm+2
	tra fm+2
	tra ss1

	tra ss1+1
	tra fm+2
	tra fm+2
	tra ss1

	tra ss1+1
	tra fm+2
	tra fm+2
	tra ss1

ss1,	lac
	add (140000
	trn fam1
	cyl
	trn famokx
	tra fam1

chain,	sxa chainx	|follows chains
	lda up7
	add (ldx-1
	sto .+1
	xx
	xac
	add (-17
	trn chain1
	lax sqr-14
	xcd
	add (45-20+440000
	alr
	lax sqr-15
	xcd
	add (45-21+440000
chain3,	sto Chaint
	tze chainok
	clr
	tze chaino
	lac
	tze chaino-1
	clr
	tze chaino-1

chainx,	tra .

	slr chaint
chaino,	ado chainx
	lda chaint
	tra chainx

chain1,	lax sqr+4
	xcd
	add (45+440000
	alr
	lax sqr
	xcd
	add (45-4+440000
	tra chain3

upd,	sxa upx		|update tables
	tze upe
	axr
	ado udc
	trn udcdp
	lda (1
	stx lnt		|update line table
	llr (20
	cla 127
	lro
	tze up1
	lax sqr-14	|update sqr table, vert lines
	trn up2

up3,	add (140020
	stx sqr-14
	lax sqr-15
	trn up4

up5,	add (140021
	stx sqr-15

up6,	lda mp
	cyr
	cyr
	xad

up7,	sto udl		|save move and who in push-down list
	ado .-1
	add (-sto-udl-30
	trn .+2
	hlt		|too many updates
	lac
	tze upb

upc,	ldx mp
	adx scm
	stx scm		|update score

upx,	tra .

upb,	ldx mp
	tix .+2
	ldx (1
	sxa mp		|alternate movers
	tra upx

up2,	add mp
	llr (1
	tra up3

up4,	add mp
	ial
	add (1
	ial
	tra up5

up1,	lax sqr+4	|update sqr table, horiz lines
	trn up8

up9,	add (140000
	stx sqr+4
	lax sqr
	trn up0

upa,	add (140004
	stx sqr
	tra up6

up8,	add mp
	llr (1
	tra up9

up0,	add mp
	ial
	add (1
	ial
	tra upa

upe,	xro
	tra upd+3

udcdp,	ado udca
	stz udc
	tra upd+5

scm,	0		|machine score
scp,	0		|player score

	0		|convenience
udl,	udl+31|		|update-revert pushdown list

rev,	sxa upx		|revert last move
	ldx up7
	aux (-udl
	tix .+2

ree,	hlt
	aux (udl
	sxa up7		|shrink pushdown list
	lax 0
	axrUcyl
	cylUclr
	cll+lro-opr	|unpack who
	sto mp
	slx lnt		|revert line table
	llr (20
	cla 127
	lro
	tze re2
	lax sqr-14	|revert sqr table, vert lines
	com
	add (140020
	trn re4
	add mp
	llr (1

re4,	com
	stx sqr-14
	lax sqr-15
	com
	add (140021
	trn re6
	add mp
	ial
	add (1
	ial

re6,	com
	stx sqr-15

re7,	rxa 40
	tra upc		|revert score

re2,	lax sqr+4	|revert sqr table, horiz lines
	com
	add (140000
	trn re8
	add mp
	llr (1

re8,	com
	stx sqr+4
	lax sqr
	com
	add (140004
	trn re0
	add mp
	ial
	add (1
	ial

re0,	com
	stx sqr
	tra re7

xx=hlt

sqr,	sqr+23|		|square table

sqp,	lda sqr+4	|square pointer table
	lda sqr+5
	lda sqr+6
	lda sqr+10
	lda sqr+11
	lda sqr+12
	lda sqr+14
	lda sqr+15
	lda sqr+16

rst,	sxa rsx		|restart routine
	ldx (-33
	cal 40
	slx lnt+33
	tix .-1
	sto lnt+3
	sto lnt+7
	sto lnt+13
	sto lnt+17
	ldx (22
	slx sqr
	tix .-1
	ldx (udl
	sxa up7
	llr 1
	lda (1
	ana
	sto mp
	stz scm
	stz scp
	lda (4
	tsx siz

rsx,	tra .

|symmetry tables

sym1t,	repeat 7,0	0	-0	-0

sym0t,	repeat 14,0

sym3t,
sym7t,	repeat 20,0
	repeat 14,-0

sym5t,	repeat 10,0
	repeat 10,-0
	repeat 10,0
	repeat 4,-0

sym13t,	0	0	-0	-0
	0	0	repeat 26,-0

sym15t,	repeat 2,0	0	-0	-0
	repeat 10,-0
	repeat 2,0	0	-0	-0
	repeat 10,-0

sym37t,
symqrt,	repeat 10,0
	repeat 24,-0

symhrt,	repeat 10,0
	repeat 10,-0
	repeat 6,0
	repeat 6,-0

|symmetry detection routines

define	test line1,line2
	lda line1+lnt
	llr line2+lnt
	lpd
	tze .+2
	trx 0
terminate

sym1,	test 30,33	|about vertical axis
	test 31,32
	test 24,27
	test 25,26
	test 20,23
	test 21,22
	test 14,16
	test 10,12
	test 4,6
	test 0,2
	ado symi
	trx 1

sym3,	test 16,20	|about diagonal up to the left
	test 15,24
	test 14,30
	test 12,21
	test 11,25
	test 10,31
	test 6,22
	test 5,26
	test 4,32
	test 2,23
	test 1,27
	test 0,33
	ado symi
	ado symi
	trx 1

sym5,	test 23,33	|about horizontal axis
	test 22,32
	test 21,31
	test 20,30
	test 6,12
	test 5,11
	test 4,10
	test 2,16
	test 1,15
	test 0,14
	lda symi
	add (5
	sto symi
	trx 1

sym7,	test 16,33	|about diagonal thus /
	test 15,27
	test 14,23
	test 12,32
	test 11,26
	test 10,22
	test 6,31
	test 5,25
	test 4,21
	test 2,30
	test 1,24
	test 0,20
	ado symi
	ado symi
	trx 1

symhr,	test 25,26
	test 24,27
	test 23,30
	test 22,31
	test 21,32
	test 20,33
	test 6,10
	test 5,11
	test 4,12
	test 2,14
	test 1,15
	test 0,16
	lda (7
	sto symi
	trx 1

symqr,	test 6,32
	test 5,26
	test 4,22
	test 2,33
	test 1,27
	test 0,23
	lda (4
	sto symi
	trx 1

syma,	tsx sym3
	tra symc

symb,	tsx sym7
	tra symf
	tra symd

symc,	tsx sym5
	tra symb
	tra symd

syme,	tsx sym5
	tra symd
	tra symd

symf,	tsx symhr
	tra symd
	tsx symqr
	tra symd
	tra symd

variables
constants
start add beg
