
system tape generator

17600|

beg,	rew 1
	wtb 1
	ldx (call-foo+1
	wtb 1
	lda (sto 17605
	cpyUalr
	lda (tra 17601
	cpyUalr

a,	aux (foo-1
	cpyUxlr
	lax 0
	aux (-foo+1
	cpyUalr
	tix a
	lax (tra call
	cpyUalr
	cpy


	wtb 1
	stz Cksum
	ldx (17777-20
	lax 20
	cpyUalr
	add cksum
	sto cksum
	tix .-4
	cpyUalr
	bsr 1
	rtb 1
	ldx (17777-20
	claUcpf
	cpyUlad
	tix .-1
	cpyUlcd
	tze .+2
	tra beg
	wtb 1
	hlt


|call

call,	stz cksum
	cpf
	tbr
	add (-trn-20
	tze callmidas
	add (20-15000
	tze calldoctor
	add (1
	tze calldoctor
	tra call

callmi,	ldx (17777-20
	rtb 1
	cpyUlac
	stx 20
	add cksum
	sto cksum
	tix .-4
	cpyUlcd
	ldx (3073
	tze ok
	bsr 1
	tra call

calldoc,	ldx (17777-14421
	rtb 1
	cpyUlac
	stx 14421
	add cksum
	sto cksum
	tix .-4
	ldx (14420-20
	cpyUlad
	tix .-1
	cpyUlcd
	tze cont
	bsr 1
	tra call

cont,	tbr
	add (-trn
	axr

ok,	cpf
	wtb 1
	llr (2000
	rpf
	ana
	tze .-4
	rew 1
go,	trx 0

variables
constants

foo,

start add beg


 call

|call tape for mag tape system

readin

word rew 1, hlt, rew 1, wtb 1

17600|	rtb 1
	cpy
	slr .+2
	cpyUlac

start add 17600

2