1*45760Sbostic /*- 2*45760Sbostic * Copyright (c) 1986 The Regents of the University of California. 3*45760Sbostic * All rights reserved. 4*45760Sbostic * 5*45760Sbostic * This code is derived from software contributed to Berkeley by 6*45760Sbostic * Computer Consoles Inc. 7*45760Sbostic * 8*45760Sbostic * %sccs.include.redist.c% 9*45760Sbostic * 10*45760Sbostic * @(#)Aget_byte.c 7.1 (Berkeley) 12/06/90 11*45760Sbostic */ 1229609Ssam 1345699Sbostic #include "align.h" get_byte(infop,address)1429609Ssamint get_byte (infop, address) 1529609Ssam process_info *infop; 1629609Ssam char *address; 1729609Ssam /* 1829609Ssam /* Fetch the byte at the given 'address' from memory. 1929609Ssam /* Caveat: It's quite difficult to find a pte reference 2029609Ssam /* fault. So I took the easy way out and just signal 2129609Ssam /* an illegal access. 2229609Ssam /* 2329609Ssam /**************************************************/ 2429609Ssam { 2529609Ssam register long code; 2629609Ssam 2729609Ssam code = readable(infop, (long)address, 1); 2829609Ssam if ( code == TRUE ) { 2929609Ssam return(*address); 3029609Ssam } else exception (infop, ILL_ACCESS, address, code); 3129609Ssam } 32