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 * @(#)Awrite_long.c 7.1 (Berkeley) 12/06/90 11 */ 12 13 #include "align.h" 14 15 write_longword (infop, longword, where) 16 process_info *infop; 17 long longword; 18 struct oprnd *where; 19 /* 20 /* Put the longword at the given address in 21 /* tahoe's memory. 22 /* 23 /**************************************************/ 24 { 25 if (! (where->mode & W)) exception(infop, ILL_ADDRMOD); 26 switch (where->mode & ADDFIELD) /* Mask out R/W bits */ 27 { 28 case Add: 29 case SPmode: 30 put_longword (infop, longword, where->address); 31 break; 32 case Dir: 33 Replace (infop, where->reg_number, longword); 34 break; 35 default: 36 printf("Unknown destination in write_long (alignment code)\n"); 37 }; 38 } 39