/* rcsid[]="$Header: machine.h,v 800.1 85/09/24 15:50:47 root Exp $" */
/* sccsid[]="%W% %Y% %Q% %G%" */

#ifdef s32
/* 
 * This include is allegedly obsoleted, so...
 *
#include <s32/autoconf.h>
 */
#define U_VA 		0x100000	/* User virtual address */
#define u_pagesize	4096		/* physical page size */
/* #define U_USRTOP	0x3f0 */	/* top of user stack */
#define U_PGSHIFT	12		/* shift for pagesize of 4k */
int usrtop;				/* top of user stack for program */
int mytop;				/* top of user stack for this kernel */
#else s32
#ifdef 	KERNEL
#include "../../h/autoconf.h"		/* for U_VA  and SEGSIZE */
#else  	KERNEL
#include <sys/autoconf.h>		/* for U_VA  and SEGSIZE */
#endif 	KERNEL
#endif s32

#ifdef BOOTSTRAP
#define DBNAME "adb68\n"
#define SYMNAME "b.out"
#else
#define DBNAME "adb\n"
#define SYMNAME "a.out"
#endif		/* of ifdef BOOTSTRAP */

#define LPRMODE "%Q"
#define OFFMODE "+%o"
#define TXTRNDSIZ SEGSIZE


#define	MAXINT	0x7fffffff
#define	MAXFILE 0xffffffff

/*
 * INSTACK tells whether its argument is a stack address.
 * INUDOT tells whether its argument is in the (extended) u. area.
 * These are used for consistency checking and dont have to be exact.
 *
 * INKERNEL tells whether its argument is a kernel space address.
 * KVTOPH trims a kernel virtal address back to its offset
 * in the kernel address space.
 */
#define	INSTACK(x)	(((x)&0xf0000000) == 0x70000000)
#define	INUDOT(x)	(((x)&0xf0000000) == 0x70000000)
#define	INKERNEL(x)	((x) < U_VA)

#define	KVTOPH(x)	(x)
#define	KERNOFF		0L

/* structure of internal symbol table */
#ifndef _MODE_
struct symb
{
	char	symf;		/* symbol type */
	long	vals;		/* symbol value */
	int	smtp;		/* SYMTYPE */
	char	*symc;		/* pointer to symbol name */
};
#endif

#define SYMCHK 047
#define SYMTYPE(st)	((st>=041 || (st>=02 && st<=04))\
			? ((st&07)>=3 ? DSYM : (st&07)) : NSYM)
