home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pascal.zip / pcode / pcode_id.h < prev    next >
Text File  |  1995-10-29  |  3KB  |  60 lines

  1. /*
  2.  *        C . A . P .   P C O D E   G E N E R A T O R
  3.  *
  4.  *        G L O B A L   I N C L U D E   F I L E ,   I D E N T I F I E R S
  5.  *
  6.  *        Stéphane Charette @ C.A.P. Services
  7.  *
  8.  *        Last modified:  Stéphane Charette, 1995 October 29
  9.  *
  10.  *****************************************************************************
  11.  *
  12.  *        Project:    BILL
  13.  *        Group:    pcode
  14.  *        File:        pcode\pcode_id.h
  15.  *
  16.  *        This file contains all of the ids in the pcode generator used with
  17.  *        the interpreter BILL.
  18.  */
  19.  
  20.  
  21.  
  22. #ifndef _PCODE_IDS_H_GLOBAL
  23.  
  24.     #define _PCODE_IDS_H_GLOBAL
  25.  
  26.     /*
  27.      *        Defines
  28.      */
  29.         #define        NEG        1            // negate top of stack
  30.         #define        ADD        2            // add next-to-top to top-of-stack, leave result as top-of-stack
  31.         #define        SUB        3            // substact top-of-stack from next-to-top, leave result as top-of-stack
  32.         #define        MUL        4            // multiply next-to-top by top-of-stack, leave result as top-of-stack
  33.         #define        DVD        5            // divide next-to-top by top-of-stack, leave result as top-of-stack
  34.         #define        EQL        6            // leave 1 as top-of-stack if next-to-top == top-of-stack, 0 otherwise
  35.         #define        NEQ        7            // leave 1 as top-of-stack if next-to-top <> top-of-stack, 0 otherwise
  36.         #define        GTR        8            // leave 1 as top-of-stack if next-to-top > top-of-stack, 0 otherwise
  37.         #define        LSS        9            // leave 1 as top-of-stack if next-to-top < top-of-stack, 0 otherwise
  38.         #define        LEQ        10            // leave 1 as top-of-stack if next-to-top <= top-of-stack, 0 otherwise
  39.         #define        GEQ        11            // leave 1 as top-of-stack if next-to-top => top-of-stack, 0 otherwise
  40.         #define        STK        12            // dump stack to printer
  41.         #define        PRN        13            // print top-of-stack as an integer, pop stack
  42.         #define        PRS        14            // print the top-of-stack elements below top of stack as ASCII, pop top-of-stack + 1
  43.         #define        NLN        15            // print carriage-return-line-feed sequence
  44.         #define        INN        16            // read integer value, store on stack element whose address is top-of-stack, pop stack
  45.         #define        INT        17            // increment stack pointer by A (where A is constant)
  46.         #define        LDI        18            // push integer value A onto stack
  47.         #define        LDA        19            // push address of A onto stack
  48.         #define        LDV        20            // replace top of stack by element whose address is currently top-of-stack
  49.         #define        STO        21            // store top-of-stack in memory at the address given as next-to-top, pop two elements
  50.         #define        HLT        22            // halt
  51.         #define        BRN        23            // unconditional branch to instruction A
  52.         #define        BZE        24            // branch to instruction A if top-of-stack is zero, pop stack
  53.         #define        NOP        25            // no operation
  54.         #define        OD            26            // leave 1 if top-of-stack is odd, otherwise 0
  55.  
  56.  
  57.  
  58. #endif
  59.  
  60.