Commit | Line | Data |
---|---|---|
c8cccbb7 C |
1 | /* Aget_word.c 1.1 86/07/20 */ |
2 | ||
3 | #include "../tahoealign/align.h" | |
4 | int get_word (infop, address) | |
5 | process_info *infop; | |
6 | char *address; | |
7 | /* | |
8 | /* Fetch the word 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, value; | |
16 | ||
17 | code = readable(infop, address, 2); | |
18 | if (code == TRUE) { | |
19 | value = *address++ << 8; | |
20 | value = value | *address & 0xff; | |
21 | return(value); | |
22 | } else exception (infop, ILL_ACCESS, address, code); | |
23 | } |