|
|
1.1 root 1: #include "../machine/alignment.h"
2:
3: write_byte (infop,byte, where)
4: process_info *infop;
5: long byte;
6: struct oprnd *where;
7: /*
8: /* Put the 'byte' at the given address in
9: /* tahoe's memory.
10: /*
11: /* 1. Only the least significant byte is written.
12: /*
13: /**************************************************/
14: {
15: register struct operand_des *look_at;
16:
17: look_at = &Table[opCODE].operand[last_operand];
18: if (! (look_at->add_modes & NOVF))
19: if (byte > 0x7f || byte < -0x80) overflow_1;
20: if (!(where->mode & W)) exception(infop, ILL_ADDRMOD);
21: switch (where->mode & ADDFIELD) /* Mask out R/W bits */
22: {
23: case Add:
24: put_byte(infop, byte, where->address);
25: break;
26: case Dir:
27: Replace (infop, where->reg_number, byte);
28: break;
29: case SPmode:
30: where->mode = where->mode & ~SPmode | Add;
31: write_longword (infop, byte, where);
32: break;
33: default:
34: printf("Unknown destination in write_byte (alignment code)\n");
35: };
36: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.