home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d130 / hp.lha / Hp / hp_constants.h < prev    next >
Text File  |  1988-03-13  |  3KB  |  92 lines

  1.  
  2. /*------------------------------------*/
  3. /*    Filename:  hp_constants.h       */
  4. /*                                    */
  5. /*    Define strings and constants    */
  6. /*        used by routine hp.c        */
  7. /*------------------------------------*/
  8.  
  9. #define   STARTX      52
  10.                      
  11. #define   BINARY       2
  12. #define   OCTAL        8
  13. #define   DECIMAL     10
  14. #define   HEX         16
  15. #define   FLOAT        0
  16. #define   COMPLEX      1
  17.  
  18. #define   DEGREES      1
  19. #define   RADIANS      2
  20. #define   GRADIANS     3
  21.  
  22. #define   GREY         0
  23. #define   TAN          1
  24. #define   BLACK        2
  25. #define   YELLOW       3
  26. #define   BLUE         4
  27. #define   SCREENCOLOR  5
  28. #define   RED          6
  29. #define   GREEN        7
  30.  
  31. #define   TRUNC_MARGIN  1.0E-9
  32.  
  33. char *opcode[]  = { " None", "  7  ", "  8  ", "  9  ", "  /  ", "  4  ",
  34.                     "  5  ", "  6  ", "  x  ", "  1  ", "  2  ", "  3  ",
  35.            "  -  ", "  A  ", "  B  ", "  C  ", "  D  ", "  E  ", "  F  ",
  36.                     " BIN ", " OCT ", " DEC ", " HEX ", " FLT ", " CPX ",
  37.                     " deg ", " rad ", " grd ", " Sin ", " Cos ", " Tan ",
  38.                     " STO ", " RCL ", " 1/x ", " Asn ", " Acs ", " Atn ",
  39.                     " x^2 ", " SqX ", " y^x ", " log ", " lg2 ", " ln  ",
  40.                     "  pi ", " P-R ", " R-P ", " 10x ", " 2^x ", " e^x ",
  41.                     "  0  ", "  .  ", "  +  ", "ENTER", " CHS ", " EEX ",
  42.                     "Print", "RCLz ", "RCLt ", "LastX", " x<>y", " Drop",
  43.                     " Red ", "Green", "Blue ", " LF  " };
  44.  
  45.  
  46.   /*  The x-coordinate of the key labels for the operation modes  */
  47.   int  x_field[] = { 276, 332,  52,   0,   0,   0,   0,    0, 108,
  48.                        0, 164,   0,   0,   0,   0,   0,  220    };
  49.  
  50.   /*  The key labels  */
  51.   char *x_text[] = { "FLT", "CPX", "BIN", " ", " ", " ", " ", " ", "OCT",
  52.                        " ", "DEC", "   ", " ", " ", " ", " ", "HEX" };
  53.  
  54.   /*  The x-coordinate of the first display digit, per base  */
  55.   int  start_display[] = { 240, 240, 192, 0, 0, 0, 0, 0, 276,
  56.                              0, 280, 0, 0, 0, 0, 0, 288 };
  57.  
  58.   /*  The length of the display string for each base   */
  59.   int  display_length[] = { 19, 19, 32, 0, 0, 0, 0, 0, 11,
  60.                             0, 10, 0, 0, 0, 0, 0, 8 };
  61.  
  62.  
  63.   char digit_table[] = { ' ', '7', '8', '9', ' ', '4',
  64.                          '5', '6', ' ', '1', '2', '3',
  65.                     ' ', 'A', 'B', 'C', 'D', 'E', 'F',
  66.                          ' ', ' ', ' ', ' ', ' ', ' ',
  67.                          ' ', ' ', ' ', ' ', ' ', ' ',
  68.                          ' ', ' ', ' ', ' ', ' ', ' ',
  69.                          ' ', ' ', ' ', ' ', ' ', ' ',
  70.                          ' ', ' ', ' ', ' ', ' ', ' ',
  71.                          '0', '.', ' ', ' ', ' ', ' ' };
  72.  
  73.   char hex_char[] = { '0', '1', '2', '3', '4', '5', '6', '7' ,
  74.                       '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
  75.  
  76.   /*  Used by DisplayIntXY() to convert integer to ascii base n  */
  77.   unsigned long bitmask[] = { 0, 0x0001, 0, 0x0007, 0x000f };
  78.  
  79.   char *errstring[] = { "12345678901234",
  80.                         " Domain error ",
  81.                         "  Singularity ",
  82.                         "   Overflow   ",
  83.                         "   Underflow  ",
  84.                         "Loss of Digits",
  85.                         "Loss of Digits" };
  86.  
  87.   char nullentry[]   = "                     ";
  88.   char no_register[] = "     ";
  89.  
  90.  
  91.  
  92.