xref: /csrg-svn/sys/tahoe/align/Aget_byte.c (revision 45699)
1 /*	Aget_byte.c	1.2	90/12/04	*/
2 
3 #include	"align.h"
4 int get_byte (infop, address)
5 process_info	*infop;
6 char		*address;
7 /*
8 /*	Fetch the byte at the given 'address' from memory.
9 /*	Caveat: It's quite difficult to find a pte reference
10 /*		fault.  So I took the easy way out and just signal
11 /*		an illegal access.
12 /*
13 /**************************************************/
14 {
15 	register long code;
16 
17 	code = readable(infop, (long)address, 1);
18 	if ( code == TRUE ) {
19 		return(*address);
20 	} else exception (infop, ILL_ACCESS, address, code);
21 }
22