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