1972_stuff/s2/tmp/etma

Find at most related files.
including files from this version of Unix.


/ maki -- make initialization dec tape



 sys open; tap0; 1

 bes error

 mov r0,r1

 sys write; vcboot; 512.

 bes error

 sys open; rf; 0

 bes error

 mov r0,r2

 jsr pc,copy

 mov r1,r0

 sys close

 sys open; tap1; 1

 bes error

 mov r0,r1

 jsr pc,copy

 sys exit


copy:
 mov $512.,-(sp)

1:

 mov r2,r0

 sys read; buf; 512.

 bes error

 mov r1,r0

 sys write; buf; 512.
 bes error

 dec (sp)
 bne 1b
 tst (sp)+

 rts pc


error:

 mov $1,r0

 sys write; mes; emes-mes
 sys exit


mes:

<error in copy\n>
emes:
tap0: </dev/tap0\0>
tap1: </dev/tap1\0>
rf: </dev/rf0\0>

.even


vcboot:
	mov	$20000,sp

	jsr	r5,dtio; 1; 20000; -20000; 5
	jsr	r5,drio; 3; 140000; 20000; -20000; 3
	jsr	r5,dtio; 33.; 20000; -20000; 5
	jsr	r5,drio; 3; 160000; 20000; -20000; 3
	jsr	r5,drio; 3; 140000; 54000; -2000; 5

	jmp	*$54000



tcdt = 177350
tccm = 177342
dtio:
	mov	$tcdt,r0
	mov	$tccm,r1
	mov	$3,(r1)	/ rn-f
1:

	tstb	(r1)

	bge	1b
	tst	(r1)
	blt	0f
	cmp	(r5),(r0)

	beq	2f
	bgt	dtio
0:

	mov	$4003,(r1)	/ rn-b

1:

	tstb	(r1)

	bge	1b
	tst	(r1)
	blt	dtio
	mov	(r0),r2

	add	$5,r2

	cmp	(r5),r2

	bgt	dtio
	br	0b

2:

	tst	(r5)+

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

1:

	tstb	(r0)

	bge	1b
	tst	(r0)
	bge	1f
	sub	$8.,r5
	br	dtio

1:

	mov	$1,(r0)		/ sat
	rts	r5


dae = 177470

drio:
	mov	$dae+2,r0

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

	mov	(r5)+,-(r0)

1:

	tstb	(r0)

	bge	1b
	tst	(r0)
	bge	1f
	sub	$10.,r5

	br	drio

1:

	rts	r5


buf:	.=.+512.
	mov	$16.,-(sp)
1:
Ü	jsr	r5,dtio; at: 1; 20000; -20000; 5
	jsr	r5,dtio; a0: 1; 20000; -20000; 5
	jsr	r5,drio; a1:; 0; 20000; -20000; 3
á	jsr	r5,drio; a1: 0; 20000