xref: /csrg-svn/sys/vax/mdec/mttoggle.s (revision 29324)
123146Smckusick/*
2*29324Smckusick * Copyright (c) 1980, 1986 Regents of the University of California.
323146Smckusick * All rights reserved.  The Berkeley software License Agreement
423146Smckusick * specifies the terms and conditions for redistribution.
523146Smckusick */
611093Ssam
723146Smckusick#ifndef lint
8*29324Smckusick_sccsid:.asciz	"@(#)mttoggle.s	7.1 (Berkeley) 06/05/86"
923146Smckusick#endif not lint
1023146Smckusick
1111093Ssam/*
1211093Ssam * Prototype toggle in bootstrap code for mt type tapes.
1311093Ssam * If on anything but a 780 with a tape at drive 0 of mba 1
1411093Ssam * this will have to be repaired by patching mba and mt.
1511093Ssam */
1611093Ssam	movl	mba,r10
1711093Ssam	mull3	mt,$0x80,r11
1811093Ssam	addl3	r11,r10,r11
1911093Ssam	addl2	$0x400,r11
2011093Ssam	movzbl	$1,4(r10)
2111093Ssam	movzbl	$4,8(r11)		/* drive zero, one record */
2211093Ssam	clrl	12(r10)			/* set address to zero */
2311093Ssam	movl	$0x80000000,0x800(r10)	/* validate map register */
2411093Ssam	cvtwl	$-512,16(r10)		/* set byte count */
2511093Ssam	movzwl	$512,20(r11)		/* set byte count */
2611093Ssam0:
2711093Ssam	movl	0x44(r11),r0
2811093Ssam	bbc	$15,r0,0b
2911093Ssam	movzbl	$071,(r11)		/* read forward, go */
3011093Ssam	halt
3111093Ssam	.align	2
3211093Ssammba:	.long	0x20012000
3311093Ssammt:	.long	0
34