xref: /original-bsd/sys/vax/mdec/tstoggle.s (revision 0a83ae40)
1/*
2 * Copyright (c) 1980, 1986 Regents of the University of California.
3 * All rights reserved.  The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifndef lint
8_sccsid:.asciz	"@(#)tstoggle.s	7.1 (Berkeley) 06/05/86"
9#endif not lint
10
11/*
12 * Prototype toggle in bootstrap code for ts type tapes.
13 * If on anything but a 780 with the drive on uba0
14 * this will have to be repaired by patching uba and umem.
15 */
16	.set	UBA0,0x20006000
17	.set	UMEM0,0x2013e000
18	.set	UBA_MAP,0x800
19	.set	TSADDR,0772520-0760000
20
21start:
22	movl	uba,r10
23	movl	mrv,UBA_MAP(r10)
24	addl3	mrv,$1,UBA_MAP+4(r10)
25	addl3	umem,$TSADDR,r11
26	clrw	2(r11)
271:	tstb	2(r11)
28	bgeq	1b
29	movw	$0x200+setchr,(r11)
301:	tstb	2(r11)
31	bgeq	1b
32	movw	$0x200+read,(r11)
33	halt
34	.align	2
35uba:	.long	UBA0
36umem:	.long	UMEM0
37mrv:	.long	0x80000000
38setchr:	.word	0xc004,0x200+char,0,0x8	# set characteristics command
39char:	.word	0x200+status,0,0xe,0	# characteristics
40read:	.word	0xc001,0,0,0x200	# read command
41status:
42