/*  Opcode definitions. */
/*$Header: /a/rathlin/disk/src/master/edml/EDML4/fam.src/UPTODATE/RCS/bcodes.h,v 5.1 91/09/05 18:23:51 edml Exp $*/
/*$Log:	bcodes.h,v $
 * Revision 5.1  91/09/05  18:23:51  edml
 * Version 4.2 of EdML
 * This version does not yet work on machines with large pointers
 * (e.g. DECmips / SGI) - conficts between ASSIGNED/ZERO/MARKBIT macros
 * 
 * Revision 4.6  90/10/29  14:29:12  rjg
 * Branches for ajg native code 4.6.*
 * 
 * Revision 4.4  90/07/04  11:10:41  rjg
 * Readline version 4.1.00
 * New bytecode OpPrompt 
 * 
 * Revision 4.2  90/02/05  11:59:43  rjg
 * Exception traceback, reraise bytecode, UPRecN objects for arrays
 * 
 * Revision 4.1.1.1  90/01/29  12:37:35  rjg
 * See compiler version 1.7.1.1
 * Changes for exception tracing
 * Changed OpNewRaise to recognise the new ?\ (characterised by a NULL
 * exception pattern frame) and to chain back down Ctl Stack printing
 * closure names (stored as first literal field for all functions)
 * OpReRaise same but doesn't set Ctl Stk starting point.
 * Also removed old OpRaise and OpHandle #defines and modified
 * store.c accordingly
 * 
 * Revision 4.1  90/01/22  19:14:30  rjg
 * FAM 4.0.00: incorporated new exceptions Match,Bind,Abs,Neg
 * New opcode OpRaiseMatch
 * Files affected: system.h interp.c bcodes.h
 * 
 * Revision 4.0  89/09/20  13:32:26  rjg
 * incorporated RCS
 * */

#define NumByteCodes      256

#define OpTrouble	  0
#define OpGetFreeW	  1
#define OpTuple_0	  2
#define OpTrue		  3
#define OpFalse		  4
#define OpInt		  5
#define OpNoOp		  6
#define OpExport          7
#define OpImport          8
#define OpNewSubscr       9
#define OpVar0		 10
#define OpVar1		 11
#define OpTuple		 12
#define OpVariant	 13
#define OpRef		 14
#define OpFst		 15
#define OpSnd		 16
#define OpHd		 17
#define OpTl		 18
#define OpNull		 19
#define OpOutl		 20
#define OpOutr		 21
#define OpIs0		 22
#define OpIs1		 23
#define OpQuaDot	 24
#define OpNewUpdate      25
#define OpQuaIs		 26
#define OpQuaAs		 27
#define OpDestVariant	 28
#define OpCase		 29
#define OpNot		 30
#define OpAnd		 31
#define OpOr		 32
#define OpNeg		 33
#define OpPlus		 34
#define OpDiff		 35
#define OpTimes		 36
#define OpDivide	 37
#define OpIntDiv	 38
#define OpMod		 39
#define OpEq             40
#define OpEqBool	 41
#define OpEqInt		 42
#define OpEqString	 43
#define OpGreater	 44
#define OpLess		 45
#define OpGreatEq	 46
#define OpLessEq	 47
#define OpExplode	 48
#define OpImplode	 49
#define OpExpAscii	 50
#define OpImpAscii	 51
#define OpStringOfInt	 52
#define OpIntOfString	 53
#define OpAt		 54
#define OpAssign	 55
#define OpJumpW		 56
#define OpTrueJumpW	 57
#define OpFalseJumpW	 58
#define OpExecute        59
#define OpClosure	 60
#define OpDumClosure	 61
#define OpRecClosure	 62
#define OpGetLocalW	 63
#define OpPop		 64
#define OpIncRef         65
#define OpSqueezeW	 66
#define OpDecRef         67
#define OpDestNil	 68
#define OpSpecialCollect 69 /*GMK Jan 1990 for calling special GC */
#define OpReturn	 70
#define OpSaveFrame	 71
#define OpApplFrame	 72
#define OpRestFrame	 73
#define OpTailApply_n1   74
#define OpFunId		 75
#define OpFunComp	 76
#define OpNotImmed	 77
#define OpPrintObj	 78
#define OpUnTrap	 79
#define OpHeapType 	 80
#define OpMakeNativeText 81
#define OpStopProcess	 82
#define OpTuple_2	 83
/* --SPARE--             84 */
#define OpCollect	 85
#define OpPrintNull	 86
#define OpPrintBool	 87
#define OpPrintInt	 88
#define OpPrintString	 89
#define OpOutString	 90
#define OpPrompt         91
#define OpSystem	 92
#define OpSqueeze1	 93
#define OpReturn1	 94
#define OpTailApply_11   95
#define OpTailApply_0n   96
#define OpTailApplyW	 97
#define OpGetLiteralW	 99
#define OpStringLength	 100
#define OpSubString	 101
#define OpArray		 103
#define OpSize		 104
#define OpSubscr	 105
#define OpUpdate	 106
#define OpStringLEQ	 107
#define OpStringLSS	 108
#define OpStringGEQ	 109
#define OpStringGTR	 110
#define OpReadLine       111
#define OpLookahead      112
#define OpOldText        113   /* the 'magic' for castling */
#define OpSmashProcess   114
#define OpListLength	 115
#define OpOrd		 116
#define OpMakeText	 117
#define OpStoreTextByte	 118
#define OpStoreTextWord	 119
#define OpStoreTextLong	 120
#define OpArrayOfList	 121
#define OpBAFetch        122
#define OpBAStore        123
#define OpGetLoc0	 124
#define OpGetLoc1	 125
#define OpStringHash	 126
#define OpEqRef		 127
#define OpBpt		 128
#define OpCurrentProcess 129
#define OpNewProcess	 130
#define OpSuspendProcess 131
#define OpWaitForProcess 132
#define OpBigVar         133
#define OpXConClosure    134 
#define OpIncRefAt       135 /* see opcode 65 */
#define OpObjComp        136
#define OpDestBigVar     137 
#define OpNewRaise       138 
#define OpNewHandle      139 
#define OpBind           140
#define OpScanStringWhileIn 141
#define OpScanStringUntilIn 142
#define OpVariantObject  143
/* --SPARE--             144 not really spare - assigned in debugger.ml */
#define OpBCtoNC         145 /* [AJG] Mode Switch (\Phi NC) */
#define OpClosure1       146
#define OpDumClosure1    147
#define OpSpawnProcess   148
#define OpPrintADT       149 /* ACN */
#define OpRescheduleProcess 150
#define OpNewState       151
#define OpSmashState     152
#define OpCurrentState   153
#define OpMkPlot         154 /* ACN */
#define OpWaitForProcesses 155
#define OpSynchronise    156
#define OpRandomMerge    157
#define OpExportCurrentState 158
#define OpMoveSubstring  159
#define OpStringOfLength    160
#define OpOldScanStringUntilIn 161
#define OpOldScanStringWhileIn 162
#define OpCpuTime        163
#define OpOpenStream     164
#define OpCreateStream   165
#define OpReadStream     166
#define OpReadToString   167
#define OpWriteStream    168
#define OpCloseStream    169
#define OpInteractive    170
#define OpReturn0        171
#define OpDestTuple	 172
#define OpDestTuple_n0	 173
#define OpDestQCons	 174
#define OpSlideW         175
#define OpChangeDir	 176
#define OpNth	 	 178
#define OpRev	 	 179
#define OpTupleOfList	 180
#define OpDestTuple_20	 181
#define OpCurrClos	 182
#define OpByteNum	 183
#define OpFPlus	 	 184
#define OpFDiff	 	 185
#define OpFTimes	 186
#define OpFDivide	 187
#define OpFNeg	 	 188
#define OpFEql	 	 189
#define OpNCraise        190
#define OpFGeq	 	 191
#define OpFGtr	 	 192
#define OpFLeq	 	 193
#define OpFLss	 	 194
#define OpReal	 	 195
#define OpFloor	 	 196
#define OpStringOfReal	 197
#define OpRealOfString	 198
#define OpPrintReal	 199
#define OpDestInt	 200
#define OpDestReal	 201
#define OpCaseVal	 202
#define OpTailApply_n0	 203
#define OpDestString	 204
/* --SPARE--             205 */
#define OpPopTrap	 206
#define OpGetLocalB	 207
#define OpGetLiteralB	 208
#define OpGetLiteral1	 209
#define OpGetFreeB   	 210
#define OpGetFree1       211
#define OpSqueezeB       212
#define OpSlideB         213
#define OpTailApplyB     214
#define OpJumpB          215
#define OpFalseJumpB     216
#define OpTrueJumpB      217
#define OpDestTailApply  218
#define OpTrace          219
#define OpSqrt           220
#define OpSin            221
#define OpCos            222
#define OpArctan         223
#define OpExp            224
#define OpLn             225
#define OpFetchByte      226
#define OpUniqueStamp    227
#define OpStampOfFile    228
#define OpGetEnv         229
#define OpStoreByte      230
#define OpFlush          231
#define OpFUpPlus 	 232
#define OpFUpDiff 	 233
#define OpFUpTimes	 234
#define OpFUpDivide	 235
#define OpTextLength     236
#define OpFetchTextByte  237    /* 3 op-codes for extracting texts */
#define OpFetchTextWord  238
#define OpFetchTextLong  239
/* --SPARE--             240 */  /* was 3 fixed switches, see nc4esml */
/* --SPARE--             241 */
/* --SPARE--             242 */
/* --SPARE--             243 */
#define OpVetText        244    /* clear text ok for native code gen */
#define OpReplaceText    245    /* take the two text, linking them as approp */
#define OpProfHook       246    /* Get the popular funs links from the fam */
/* --SPARE--             248 */
/* --SPARE--             249 */
/* --SPARE--             250 */
/* --SPARE--             251 */
#ifdef SRGP_GRAPHICS
#define OpSrgpCall       252 
#endif
#define OpReRaise        253 /*RJG 24-Jan-90*/
#define OpRaiseMatch     254 /*RJG 22-Jan-90*/



/* Exception Indices */

#define NumExceptions           63

#define Exc_Hd 			0
#define Exc_Tl 			1
#define Exc_ProcLim 		2
#define Exc_ProcTerm 		3
#define Exc_ProcActive 		4
#define Exc_ProcNotOwner 	5
#define Exc_ProcDeadlock 	6
#define Exc_Array 		7
#define Exc_Subscript 		8
#define Exc_Update 		9
#define Exc_UnimpBigOp 		10
#define Exc_StringOfInt	 	11
#define Exc_NoFastEntry 	12
#define Exc_NotImplemented 	13
#define Exc_RealOfString 	14
#define Exc_Div 		15
#define Exc_Mod 		16
#define Exc_Bind 		17
#define Exc_Nth 		18
#define Exc_ChangeDir 		19
#define Exc_OpenStream 		20
#define Exc_CreateStream 	21
#define Exc_ReadStream 		22
#define Exc_EndOfInput 		23
#define Exc_LostStream 		24
#define Exc_ReadToString	25
#define Exc_WriteStream 	26
#define Exc_MakeText 		27
#define Exc_ImplodeAscii 	28
#define Exc_Substring 		29
#define Exc_StringHash 		30
#define Exc_MoveSubstring 	31
#define Exc_StringOfLength 	32
#define Exc_ScanString 		33
#define Exc_IntOfString 	34
#define Exc_As 			35
#define Exc_Outl 		36
#define Exc_Outr 		37
#define Exc_Corruption 		38
#define Exc_Interrupt 		39
#define Exc_Real 		40
#define Exc_CtrlZ 		41
#define Exc_Reenter 		42
#define Exc_OutOfDate 		43
#define Exc_BigDec 		44
#define Exc_Collect 		45
#define Exc_Export 		46
#define Exc_ArgStkOvfl 		47
#define Exc_CtlStkOvfl 		48
#define Exc_Floor 		49
#define Exc_Sqrt 		50
#define Exc_Exp 		51
#define Exc_Ln  		52
#define Exc_FDiv  		53
#define Exc_FTimes  		54
#define Exc_FPlus  		55
#define Exc_FMinus  		56
#define Exc_Import              57
#define Exc_TimeStampOf         58
#define Exc_Match		59
#define Exc_Abs			60
#define Exc_Neg			61
#define Exc_Execute		62
