h04621
s 00058/00000/00000
d D 1.1 80/05/15 14:27:16 lcd 1 0
e
u
sunix
lcd
U
t
T
I 1
#

#include "globals.h"
#include <stdio.h>

/*
 *	reg.c: print out registers
 */

CONST	char	*_S_reg		"%W%";
	char	*regtab		"svarea";

VAR	integer	regblk[9];


/*
 *	rdreg: read in registers ... called on system start up
 */

PROCEDURE rdreg()

BEGIN	VAR	long	addrs;

	getaddr( regtab, &addrs );

	rdBlock( addrs, 18, regblk );
END

/*
 *	reg: print out registers
 */

PROCEDURE reg()

BEGIN	
	printf( "r0\t%o\n", regblk[8] );
	printf( "r1\t%o\n", regblk[7] );
	printf( "r2\t%o\n", regblk[6] );
	printf( "r3\t%o\n", regblk[5] );
	printf( "r4\t%o\n", regblk[4] );
	printf( "r5\t%o\n", regblk[3] );
	printf( "sp\t%o\n", regblk[2] );
	printf( "modpar\t%o\n", regblk[1] );
	printf( "modpdr\t%o\n", regblk[0] );
END

/*
 *	regpr: return modpar and modpdr
 */

PROCEDURE regpr( par, pdr )

VAR	integer	*par;
	integer *pdr;

BEGIN	*par = regblk[1];
	*pdr = regblk[0];
END
E 1
