1 /*- 2 * Copyright (c) 1986 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Computer Consoles Inc. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)Aput_word.c 7.1 (Berkeley) 12/06/90 11 */ 12 13 #include "align.h" 14 put_word(infop,word,where)15put_word (infop, word, where) 16 register process_info *infop; 17 register char *where; 18 register long word; 19 /* 20 /* Put the word at the given address in memory. 21 /* Caveat: It's quite difficult to find a pte reference 22 /* fault. So I took the easy way out and just signal 23 /* an illegal access. 24 /* 25 /**************************************************/ 26 { 27 register long code; 28 29 code = writeable(infop, where, 2); 30 if ( code == TRUE ) { 31 *where = word>>8; 32 *(where+1) = word; 33 } else exception (infop, ILL_ACCESS, where, code); 34 } 35