| 1 | /* |
| 2 | * Copyright (c) 1983 Regents of the University of California. |
| 3 | * All rights reserved. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms are permitted |
| 6 | * provided that the above copyright notice and this paragraph are |
| 7 | * duplicated in all such forms and that any documentation, |
| 8 | * advertising materials, and other materials related to such |
| 9 | * distribution and use acknowledge that the software was developed |
| 10 | * by the University of California, Berkeley. The name of the |
| 11 | * University may not be used to endorse or promote products derived |
| 12 | * from this software without specific prior written permission. |
| 13 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 14 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 15 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 16 | * |
| 17 | * @(#)vax.h 5.3 (Berkeley) %G% |
| 18 | */ |
| 19 | |
| 20 | /* |
| 21 | * opcode of the `calls' instruction |
| 22 | */ |
| 23 | #define CALLS 0xfb |
| 24 | |
| 25 | /* |
| 26 | * offset (in bytes) of the code from the entry address of a routine. |
| 27 | * (see asgnsamples for use and explanation.) |
| 28 | */ |
| 29 | #define OFFSET_OF_CODE 2 |
| 30 | #define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) |
| 31 | |
| 32 | /* |
| 33 | * register for pc relative addressing |
| 34 | */ |
| 35 | #define PC 0xf |
| 36 | |
| 37 | enum opermodes { |
| 38 | literal, indexed, reg, regdef, autodec, autoinc, autoincdef, |
| 39 | bytedisp, bytedispdef, worddisp, worddispdef, longdisp, longdispdef, |
| 40 | immediate, absolute, byterel, bytereldef, wordrel, wordreldef, |
| 41 | longrel, longreldef |
| 42 | }; |
| 43 | typedef enum opermodes operandenum; |
| 44 | |
| 45 | struct modebyte { |
| 46 | unsigned int regfield:4; |
| 47 | unsigned int modefield:4; |
| 48 | }; |
| 49 | |