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