Pristine Ack-5.5
[Ack-5.5.git] / h / ip_spec.h
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* Contents of flags used when describing interpreter opcodes */
6
7 #define RCS_IP          "$Id: ip_spec.h,v 1.2 1994/06/24 10:08:24 ceriel Exp $"
8
9 #define OPTYPE  07      /* type field in flag */
10
11 #define OPMINI  0       /* m  MINI */
12 #define OPSHORT 1       /* s  SHORT */
13 #define OPNO    2       /* -  No operand */
14 #define OP8     3       /* 1  1-byte signed operand */
15 #define OP16    4       /* 2  2-byte signed operand */
16 #define OP32    5       /* 4  4-byte signed operand */
17 #define OP64    6       /* 8  8-byte signed operand */
18 #define OP16U   7       /* u  2-byte unsigned operand */
19
20 #define OPESC   010     /* e  escaped opcode */
21 #define OPWORD  020     /* w  operand is word multiple */
22 #define OPNZ    040     /* o  operand starts at 1 ( or wordsize if w-flag) */
23
24 #define OPRANGE 0300    /* Range of operands: Positive, negative, both */
25
26 #define OP_BOTH 0000    /* the default */
27 #define OP_POS  0100    /* p  Positive (>=0) operands only */
28 #define OP_NEG  0200    /* n  Negative (<0) operands only */
29
30 struct opform {
31         char    i_opcode ;      /* the opcode number */
32         char    i_flag   ;      /* the flag byte */
33         char    i_low    ;      /* the interpreter first opcode */
34         char    i_num    ;      /* the number of shorts/minis (optional) */
35 };
36
37 /* Escape indicators */
38
39 #define ESC     254             /* To escape group */
40 #define ESC_L   255             /* To 32 and 64 bit operands */