Pristine Ack-5.5
[Ack-5.5.git] / util / int / rsb.h
1 /* $Id: rsb.h,v 2.2 1994/06/24 10:48:58 ceriel Exp $ */
2
3 /*      The Return Status Block contains, in push order:
4         FIL, LIN, LB, PC, PI, rsbcode
5
6         In a trap this is preceeded by:
7         FRA, FRASize, FRA_def, trap_nr
8 */
9
10 /* offsets to be added to a local base */
11 extern int rsb_rsbcode;
12 extern int rsb_PI;
13 extern int rsb_PC;
14 extern int rsb_LB;
15 extern int rsb_LIN;
16 extern int rsb_FIL;
17 extern int rsbsize;
18
19 /*      The last item stored in the Return Status Block is a word containing
20         a code describing the type of the RSB.
21 */
22
23 #define RSBMASK         0xfff0
24 #define RSBCODE         0x2b90          /* 0rrr rrrr rrrr 0000, r = random */
25 #define RSB_STP         (RSBCODE + 1)   /* in first RSB */
26 #define RSB_CAL         (RSBCODE + 2)   /* in RSB from call */
27 #define RSB_RTT         (RSBCODE + 3)   /* in RSB from returnable trap */
28 #define RSB_NRT         (RSBCODE + 4)   /* in RSB from non-returnable trap */
29
30 #define is_LB(p)        ((st_lds(p+rsb_rsbcode, wsize) & RSBMASK) == RSBCODE)
31