| 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 this notice is preserved and that due credit is given |
| 7 | * to the University of California at Berkeley. The name of the University |
| 8 | * may not be used to endorse or promote products derived from this |
| 9 | * software without specific prior written permission. This software |
| 10 | * is provided ``as is'' without express or implied warranty. |
| 11 | * |
| 12 | * @(#)vax.h 5.2 (Berkeley) %G% |
| 13 | */ |
| 14 | |
| 15 | /* |
| 16 | * opcode of the `calls' instruction |
| 17 | */ |
| 18 | #define CALLS 0xfb |
| 19 | |
| 20 | /* |
| 21 | * offset (in bytes) of the code from the entry address of a routine. |
| 22 | * (see asgnsamples for use and explanation.) |
| 23 | */ |
| 24 | #define OFFSET_OF_CODE 2 |
| 25 | #define UNITS_TO_CODE (OFFSET_OF_CODE / sizeof(UNIT)) |
| 26 | |
| 27 | /* |
| 28 | * register for pc relative addressing |
| 29 | */ |
| 30 | #define PC 0xf |
| 31 | |
| 32 | enum opermodes { |
| 33 | literal, indexed, reg, regdef, autodec, autoinc, autoincdef, |
| 34 | bytedisp, bytedispdef, worddisp, worddispdef, longdisp, longdispdef, |
| 35 | immediate, absolute, byterel, bytereldef, wordrel, wordreldef, |
| 36 | longrel, longreldef |
| 37 | }; |
| 38 | typedef enum opermodes operandenum; |
| 39 | |
| 40 | struct modebyte { |
| 41 | unsigned int regfield:4; |
| 42 | unsigned int modefield:4; |
| 43 | }; |
| 44 | |