home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / turbo_c / reslb201.arc / RESLB201.DOC < prev    next >
Text File  |  1987-10-31  |  38KB  |  2,185 lines

  1.  
  2.                 KyCorp Memory Resident Library Version 2.01
  3.             Copyright (C) 1987, KyCorp Information Group, Inc.
  4.  
  5.                              Table of Contents
  6.  
  7. Create a blinking color attribute  . . . . . . . . . . . . . . . . . . .  2
  8. Set the video border color . . . . . . . . . . . . . . . . . . . . . . .  3
  9. Draw a box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
  10. Create a high intensity attribute  . . . . . . . . . . . . . . . . . . .  5
  11. Check the display in 80 column mode  . . . . . . . . . . . . . . . . . .  6
  12. Create a color attribute byte  . . . . . . . . . . . . . . . . . . . . .  7
  13. Change the cursor size . . . . . . . . . . . . . . . . . . . . . . . . .  8
  14. Send a character directly to the screen  . . . . . . . . . . . . . . . .  9
  15. Send a string directly to the screen . . . . . . . . . . . . . . . . . . 10
  16. Remove your program from memory  . . . . . . . . . . . . . . . . . . . . 11
  17. Erase a section of the screen  . . . . . . . . . . . . . . . . . . . . . 12
  18. Exchange a portion of the screen and a window  . . . . . . . . . . . . . 13
  19. Get the current cursor position  . . . . . . . . . . . . . . . . . . . . 14
  20. Have the program go memory resident  . . . . . . . . . . . . . . . . . . 15
  21. Hide the cursor  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
  22. Change a section of the screen's attributes  . . . . . . . . . . . . . . 17
  23. Draw a horizontal line . . . . . . . . . . . . . . . . . . . . . . . . . 18
  24. Check to is if a color card is being used  . . . . . . . . . . . . . . . 19
  25. Pass a string to the keyboard buffer . . . . . . . . . . . . . . . . . . 20
  26. Move a window with the keypad  . . . . . . . . . . . . . . . . . . . . . 21
  27. Check to see if the routine is already memory resident . . . . . . . . . 22
  28. Create a window  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
  29. Move a window directly . . . . . . . . . . . . . . . . . . . . . . . . . 24
  30. Set the cursor to default size . . . . . . . . . . . . . . . . . . . . . 25
  31. Save a portion of the screen in a window buffer  . . . . . . . . . . . . 26
  32. Set the amount of acceptable screen "flicker"  . . . . . . . . . . . . . 27
  33. Set the cursor position  . . . . . . . . . . . . . . . . . . . . . . . . 28
  34. Produce a sound through the speaker  . . . . . . . . . . . . . . . . . . 29
  35. Set the size of the stack  . . . . . . . . . . . . . . . . . . . . . . . 30
  36. Check to see if another program is loaded on top of yours  . . . . . . . 31
  37. Create and underline attribute . . . . . . . . . . . . . . . . . . . . . 32
  38. Draw a vertical line . . . . . . . . . . . . . . . . . . . . . . . . . . 33
  39. Window definition  . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
  40.  
  41. Appendix A:  Warrantee . . . . . . . . . . . . . . . . . . . . . . . . . 35
  42.  
  43. Appendix B:  Instructions for compiling & linking TEST.C . . . . . . . . 36
  44.  
  45. Appendix C:  License for use . . . . . . . . . . . . . . . . . . . . . . 37
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                             1
  61.                 KyCorp Memory Resident Library Version 2.01
  62.  
  63. int blinking (attribute)
  64.    int attribute;                   Attribute to be modified to blinking
  65.  
  66. Description:   This function can be used to modify either monochrome or
  67.                color display attributes to cause a blinking color.
  68.  
  69. Return Value:  (attribute | 0x80)
  70.  
  71. #include <resident.h>
  72. main ()
  73.    {
  74.       int dis_color = MONOCHROME; /* assume monochrome */
  75.  
  76.       if (iscolor ())
  77.          dis_color = color (YELLOW, BLUE);
  78.       dis_color = blinking (dis_color);
  79.       dis_str (10, 20, "This display is blinking", dis_color);
  80.    }
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.                                             2
  120.                 KyCorp Memory Resident Library Version 2.01
  121.  
  122. void border (color)
  123.    int color;                    Color attribute for the display border
  124.  
  125. Description:   Changes the border of the display to "color" attribute.
  126.  
  127. Return Value:  None.
  128.  
  129. #include <resident.h>
  130. main ()
  131.    {
  132.       border (BLUE);
  133.    }
  134.  
  135. SEE ALSO: color
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.                                             3
  179.                 KyCorp Memory Resident Library Version 2.01
  180.  
  181. void box (upper_row, left_column, lower_row, right_column, type, color)
  182.    int upper_row, left_column    Upper left corner of the box
  183.    int lower_row, right_column   Lower right corner of the box
  184.    int type                      Type of box to draw
  185.    int color                     Color attribute of the box
  186.  
  187. Description:   Draws a particular "type" of box.
  188.                "type" NULL uses the SPACE character to draw the box (for
  189.                       erasing a box).
  190.                "type" 1 uses all double lines.
  191.                "type" 2 uses all single lines.
  192.                "type" 3 draws the vertical lines double and the horizontal
  193.                       lines single.
  194.                "type" 4 draws the vertical lines single and the horizontal
  195.                       lines double.
  196.  
  197. Return Value:  None.
  198.  
  199. #include <resident.h>
  200. main ()
  201.    {
  202.       dis_str (11, 21, "This box is a blinking", color (YELLOW, BLUE));
  203.       while (!kbhit ()) {
  204.          box (10, 20, 12, 43, 1, color (YELLOW, BLUE));
  205.          sound (0, 18); /* one second delay */
  206.          box (10, 20, 12, 43, 0, color (YELLOW, BLUE));
  207.          sound (0, 18);
  208.       }
  209.    }
  210.  
  211. SEE ALSO: hor_line, ver_line, make_window, WINDOW
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.                                             4
  238.                 KyCorp Memory Resident Library Version 2.01
  239.  
  240. int bright (attribute)
  241.    int attribute;                   Attribute to be modified to bright
  242.  
  243. Description:   This function changes a display attribute to high intensity. 
  244.                On colors that are already at high intensity, such as YELLOW
  245.                and WHITE, this function has no effect.
  246.  
  247. Return Value:  (attribute | 8)
  248.  
  249. #include <resident.h>
  250. main ()
  251.    {
  252.       int dis_color = MONOCHROME;
  253.  
  254.       if (iscolor ())
  255.          dis_color = color (RED, BLACK);
  256.       dis_str (10, 20, "This is bright & blinking", 
  257.                bright (blinking (dis_color)));
  258.    }
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.                                             5
  297.                 KyCorp Memory Resident Library Version 2.01
  298.  
  299. int chk_video ()
  300.  
  301. Description:   A macro function which returns TRUE if the video is in 80
  302.                character display mode (modes 2, 3, or 7).  This function
  303.                should be used in conjunction with the window features since
  304.                they will not operate correctly with the display in a
  305.                graphics mode.
  306.  
  307. Return Value:  TRUE if the video is in mode 2, 3, or 7, and FALSE for any
  308.                other video mode.
  309.  
  310. #include <resident.h>
  311. main ()
  312.    {
  313.       if (chk_video ())
  314.          printf ("The display is in an 80 column mode");
  315.    }
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.                                             6
  356.                 KyCorp Memory Resident Library Version 2.01
  357.  
  358. int color (letters, background)
  359.    int letters;                  Color byte for the characters
  360.    int background;               Color byte for the background
  361.  
  362. Description:   A function to combine two colors into an attribute byte for
  363.                the video display functions.
  364.  
  365. Return Value:  (background << 4 | letters)
  366.  
  367. #include <resident.h>
  368. main ()
  369.    {
  370.       dis_str (10, 20, "On a color display this is yellow on blue",
  371.                color (YELLOW, BLUE));
  372.    }
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                             7
  415.                 KyCorp Memory Resident Library Version 2.01
  416.  
  417. void cursize (top_line, bottom_line)
  418.    int top_line;                 Cursor top scan line
  419.    int bottom_line;              Cursor bottom scan line
  420.  
  421. Description:   The "cursize" function makes a call to the video bios to
  422.                change the size of the cursor.
  423.  
  424. Return Value:  None.
  425.  
  426. #include <resident.h>
  427. main ()
  428.    {
  429.       cursize (11, 12); /* normal cursor size for monochrome display */
  430.    }
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.                                             8
  474.                 KyCorp Memory Resident Library Version 2.01
  475.  
  476. void dis_chr (row, column, character, color)
  477.    int row, column;              Position on the screen to put the character
  478.    int character;                Character to be displayed
  479.    int color;                    Color attribute of the character
  480.  
  481. Description:   Displays the "character" at position "row" and "column" with
  482.                the "color" attribute.
  483.  
  484. Return Value:  None.
  485.  
  486. #include <resident.h>
  487. main ()
  488.    {
  489.       dis_str (10, 20, "This is a right arrow:  ", color (YELLOW, BLUE));
  490.       dis_chr (10, 43, 26, color (YELLOW, BLUE));
  491.    }
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                             9
  533.                 KyCorp Memory Resident Library Version 2.01
  534.  
  535. void dis_str (row, column, string, color)
  536.    int row, column;              Position on the screen to display
  537.    char *string;                 String to be displayed
  538.    int color;                    Color attribute of the display
  539.  
  540. Description:   Displays the "string" at position "row" and "column" with the
  541.                "color" attribute.
  542.  
  543.                See SCREEN_SPEED for setting either very fast display time or
  544.                a "snow free" display.
  545.  
  546. Return Value:  None.
  547.  
  548. #include <resident.h>
  549. main ()
  550.    {
  551.       dis_str (10, 20, "Hi there!", MONOCHROME);
  552.    }
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.                                            10
  592.                 KyCorp Memory Resident Library Version 2.01
  593.  
  594. int drop_tsr (void)
  595.  
  596. Description:   Check's to see if a resident program is loaded on top of your
  597.                routine and if there isn't it will remove the program from
  598.                memory and immediately exited.
  599.  
  600. Return Value:  TRUE if a resident program loaded on top and unable to remove
  601.                the program from memory.
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.                                            11
  651.                 KyCorp Memory Resident Library Version 2.01
  652.  
  653. void erase (row, column, length, color)
  654.    int row, col;                 Position on screen to start erasing
  655.    int length;                   Number of characters to erase
  656.    int color;                    Color attribute of erase section.
  657.  
  658. Description:   This function will replace "length" number of characters with
  659.                the SPACE character starting at position "row" and "column"
  660.                using the "color" attribute.
  661.  
  662. Return Value:  None.
  663.  
  664. #include <resident.h>
  665. main ()
  666.    {
  667.       while (!kbhit ()) {
  668.          dis_str (10, 20, "This slowly blinks", color (YELLOW, BLUE));
  669.          sound (0, 18);   /* one second delay */
  670.          erase (10, 20, 19, color (YELLOW, BLUE));
  671.          sound (0, 18);
  672.       }
  673.    }
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.                                            12
  710.                 KyCorp Memory Resident Library Version 2.01
  711.  
  712. void exch_window (window)
  713.    struct WINDOW *window;        Structure defining the window
  714.  
  715. Description:   The "exch_window" function exchanges the characters and color
  716.                attributes of the area of the display screen (as defined by
  717.                the appropriate members of the "window" structure) with those
  718.                in "(*window).buffer".
  719.  
  720. Return Value:  None.
  721.  
  722. For an example of proper usage, see the TEST.C file.
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.                                            13
  769.                 KyCorp Memory Resident Library Version 2.01
  770.  
  771. int getcur ()
  772.  
  773. Description:   Returns the position of the cursor on page zero as a
  774.                hexadecimal number RRCC where RR is the row and CC is the
  775.                column.
  776.  
  777. Return Value:  The cursor position on page zero.
  778.  
  779. #include <resident.h>
  780. main ()
  781.    {
  782.       int position;
  783.  
  784.       position = getcur ();
  785.       printf ("Cursor position on page zero is row %d, column %d",
  786.                position / 256, position % 256);
  787.    }
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.                                            14
  828.                 KyCorp Memory Resident Library Version 2.01
  829.  
  830. int go_resident (routine, scan1, scan2, scan3)
  831.    void (*routine) ();              Routine to be called from the keyboard
  832.    int scan1;                       Primary key to activate routine
  833.    int scan2;                       Modifier key
  834.    int scan3;                       Modifier key
  835.  
  836. Description:   The "go_resident" function first checks to ensure "routine"
  837.                has not already been made resident by calling "loaded",
  838.                closes all open files, resets the stack to STACK_SIZE, sets
  839.                up the system to execute the function "routine" whenever
  840.                "scan1", "scan2", and "scan3" are held down at the same time,
  841.                and then exits to DOS.
  842.  
  843.                If you wish to have "routine" called up on only two keys then
  844.                set either "scan2" or "scan3" to NULL.   Likewise if you wish
  845.                it to call up on only one key set both "scan2" and "scan3" to
  846.                NULL.  "scan1" must always be set.
  847.  
  848.                Note that the primary key ("scan1") is never seen by the
  849.                system so keys such as KEY_NUM_LOCK can be used without
  850.                changing the status of the system.  However, the modifier
  851.                keys ("scan2" & "scan3") are seen by the system and must be
  852.                held down before the primary key is press.
  853.  
  854. Return Value:  Returns (1) if "routine" has already been made resident or if
  855.                "go_resident" is called during the execution of "routine". 
  856.                Returns (0) if "scan1" is set to zero.
  857.  
  858. #include <resident.h>
  859. void resident_function ()
  860.    {
  861.       sound (440, 2);
  862.    }
  863.  
  864. main ()
  865.    {
  866.       go_resident (resident_function, KEY_CAPS_LOCK, KEY_ALT, 
  867.                    KEY_LEFT_SHIFT);
  868.    }
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.                                            15
  887.                 KyCorp Memory Resident Library Version 2.01
  888.  
  889. void hidecur ()
  890.  
  891. Description:   This function is a macro which causes the cursor to
  892.                disappear.
  893.  
  894. Return Value:  None.
  895.  
  896. #include <resident.h>
  897. main ()
  898.    {
  899.       hidecur ();
  900.       display_routine ();
  901.       normalcur ();
  902.    }
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.                                            16
  946.                 KyCorp Memory Resident Library Version 2.01
  947.  
  948. void hilight (row, column, length, color)
  949.    int row, column;              Position on screen to start hilighting
  950.    int length;                   Number of characters to hilight
  951.    int color;                    Color attribute to change characters to
  952.  
  953. Description:   Changes the color attributes of a section of the display
  954.                screen.
  955.  
  956. Return Value:  None.
  957.  
  958. #include <resident.h>
  959. main ()
  960.    {
  961.       int low_color = MONOCHROME, hi_color;
  962.       int row = 10, column = 20;
  963.       static char string [] = "This is blinking in intensity";
  964.  
  965.       if (iscolor ())
  966.          low_color = color (RED, BLACK);
  967.       hi_color = bright (low_color);
  968.       dis_str (row, column, string, low_color);
  969.       while (!kyhit ()) {
  970.          sound (0, 9); /* half second delay */
  971.          hilight (row, column, strlen (string), hi_color);
  972.          sound (0, 9);
  973.          hilight (row, column, strlen (string), low_color);
  974.       }
  975.    }
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.                                            17
  1005.                 KyCorp Memory Resident Library Version 2.01
  1006.  
  1007. void hor_line (row, column, length, character, color)
  1008.    int row, column;              Position on screen to start drawing
  1009.    int length;                   Length of the line to draw
  1010.    int character;                Character to use for the line
  1011.    int color;                    Color attribute of the line
  1012.  
  1013. Description:   Draws a horizontal line starting at position "row" and
  1014.                "column" by displaying "length" number of "character" onto
  1015.                the screen with the "color" attribute.
  1016.  
  1017. Return Value:  None.
  1018.  
  1019. #include <resident.h>
  1020. main ()
  1021.    {
  1022.       hor_line (10, 20, 20, 205, color (YELLOW, BLUE));
  1023.       /* draws a double line horizontally that is 20 characters long */
  1024.    }
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.                                            18
  1064.                 KyCorp Memory Resident Library Version 2.01
  1065.  
  1066. int iscolor ()
  1067.  
  1068. Description:   This function returns TRUE if a color display mode is being
  1069.                used.
  1070.  
  1071. Return Value:  Returns FALSE if the display is not in mode 7.
  1072.  
  1073. #include <resident.h>
  1074. main ()
  1075.    {
  1076.       int low_color = MONOCHROME;
  1077.  
  1078.       if (iscolor ())
  1079.          low_color = color (YELLOW, BLUE);
  1080.       dis_str (10, 20, "Hi there!", low_color);
  1081.    }
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.                                            19
  1123.                 KyCorp Memory Resident Library Version 2.01
  1124.  
  1125. void keystrokes (string, int_array)
  1126.    char string [];          String to be passed 
  1127.    int int_array [];        Storage space for scan code conversion 
  1128.  
  1129. Description:   When control is given back to the host program "string" is
  1130.                passed into the keyboard buffer via the storage space
  1131.                "int_array".  "int_array" should be large enough to hold the
  1132.                same number of elements as "string" plus one, i.e. if
  1133.                "string" is 10 characters then "int_array" should be able to
  1134.                hold at least 11 elements.
  1135.  
  1136.                Note that "int_array" must global since local variables are
  1137.                not preserved beyond the lifetime of their associated
  1138.                functions.
  1139.  
  1140. Return Value:  None
  1141.  
  1142.  
  1143. #include <resident.h>
  1144.  
  1145. int int_array [ 11 ];
  1146. void resident_function ()
  1147.    {
  1148.       static char string [] = "0123456789";
  1149.  
  1150.       keystrokes (string, int_array);
  1151.    }
  1152.  
  1153. main ()
  1154.    {
  1155.       go_resident (resident_function, KEY_RIGHT_SHIFT, KEY_ALT, KEY_CTRL);
  1156.    }
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.                                            20
  1182.                 KyCorp Memory Resident Library Version 2.01
  1183.  
  1184. void key_window (key, window);
  1185.    int key;                            Scan code for keypad key
  1186.    struct WINDOW *window;              Structure defining the window
  1187.  
  1188. Description:   The "key_window" function uses the scan code for a particular
  1189.                key on the keypad to move a window.  For example, if "key" is
  1190.                equal to KEY_PGUP then the window defined by the structure
  1191.                "*window" is moved to the upper right-hand corner of the
  1192.                screen.  Similarly, if "key" is equal to KEY_UP the window is
  1193.                moved up one row.
  1194.  
  1195.                Note that by using "key_window" the window will not be moved
  1196.                outside the boundaries of the screen.  Also, if "key" is not
  1197.                equal to a scan code corresponding to the keypad (i.e. not an
  1198.                arrow or paging key) no action is taken.
  1199.  
  1200. Return Value:  None.
  1201.  
  1202. #include <resident.h>
  1203. main ()
  1204.    {
  1205.       struct WINDOW window_one;
  1206.       int window_one_buffer [ (37 + 2) * (3 + 5) ];
  1207.  
  1208.       window_one.row = 10;
  1209.       window_one.col = 20;
  1210.       window_one.hlen = 37;
  1211.       window_one.vlen = 3;
  1212.       window_one.color = color (YELLOW, BLUE);
  1213.       window_one.buffer = window_one_buffer;
  1214.       window_one.vtype = DOUBLE_LINE;
  1215.       window_one.htype = DOUBLE_LINE;
  1216.  
  1217.       make_window (&window_one);  /* makes a window at 10, 20 */
  1218.       while (!getch ()) 
  1219.          key_window (getch (), &window_one)
  1220.       /* moves "window_one" around the screen so until a key is press
  1221.          that does not produce a two byte code (NULL then scan code). */
  1222.    }
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.                                            21
  1241.                 KyCorp Memory Resident Library Version 2.01
  1242.  
  1243. int loaded (void)
  1244.  
  1245. Description:   The "loaded" function polls the chain of memory resident
  1246.                functions in the system to see if any have a function call
  1247.                equal to the function pointer "routine".  If one responds
  1248.                then the function returns TRUE; if there is no response the
  1249.                return is FALSE.
  1250.  
  1251. Return Value:  TRUE if "routine" already loaded.
  1252.                FALSE if no memory resident function responds to the
  1253.                "routine" pointer poll.
  1254.  
  1255. #include <resident.h>
  1256. void resident_function ()
  1257.    {
  1258.       sound (440, 5);
  1259.    }
  1260.  
  1261. main ()
  1262.    {
  1263.       if (loaded ())
  1264.          printf ("The resident function has already been loaded.");
  1265.       go_resident (resident_function, KEY_R, KEY_LEFT_SHIFT,
  1266.                    KEY_RIGHT_SHIFT);
  1267.       /* note that the "go_resident" function also checks to see if
  1268.          "resident_function" is loaded and does nothing if it is */
  1269.    }
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.                                            22
  1300.                 KyCorp Memory Resident Library Version 2.01
  1301.  
  1302. void make_window (window)
  1303.    struct WINDOW *window;              Structure defining the window
  1304.  
  1305. Description:   The "make_window" function saves the video characters and
  1306.                color attributes where the window is to be made into
  1307.                "(*window).buffer", erases that section of the screen, and
  1308.                draws the appropriate box based on "(*window).vtype" and
  1309.                "(*window).htype".
  1310.  
  1311.                Note that "(*window).vlen" and "(*window).hlen" refer to the
  1312.                inside dimensions of the box, therefore the size of
  1313.                (*window).buffer should be the horizontal length plus two
  1314.                multiplied by the vertical length plus two.  The plus two is
  1315.                to account for the borders of the box.  For example, a window
  1316.                with inside dimensions of 3 by 10 should have a buffer of
  1317.                "int window_buffer [ (3 + 2) * (10 + 2) ]".
  1318.  
  1319.                Also note that "(*window).row" and "(*window).col" refer to
  1320.                the position of the upper left-hand corner of the window box.
  1321.  
  1322. Return Value:  None.
  1323.  
  1324. #include <resident.h>
  1325. main ()
  1326.    {
  1327.       struct WINDOW window_one;
  1328.       int window_one_buffer [ (37 + 2) * (3 + 5) ];
  1329.  
  1330.       window_one.row = 10;
  1331.       window_one.col = 20;
  1332.       window_one.hlen = 37;
  1333.       window_one.vlen = 3;
  1334.       window_one.color = MONCHROME;
  1335.       window_one.buffer = window_one_buffer;
  1336.       window_one.vtype = DOUBLE_LINE;
  1337.       window_one.htype = DOUBLE_LINE;
  1338.  
  1339.       if (iscolor ())
  1340.          window_one.color = color (YELLOW, BLUE);
  1341.       make_window (&window_one);  /* makes a window at 10, 20 */
  1342.    }
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.                                            23
  1359.                 KyCorp Memory Resident Library Version 2.01
  1360.  
  1361. void move_window (window, row, column)
  1362.    struct WINDOW *window;              Structure defining the window
  1363.    int row, column;                    Position where window is to be moved
  1364.  
  1365. Description:   The "move_window" function moves a window by first exchanging
  1366.                the display with "(*window).buffer", then setting
  1367.                "(*window).row" and "(*window).col" to the new values, and
  1368.                finally exchanging the display again with "(*window).buffer".
  1369.  
  1370. Return Value:  None.
  1371.  
  1372. #include <resident.h>
  1373. main ()
  1374.    {
  1375.       struct WINDOW window_one;
  1376.       int window_one_buffer [ (37 + 2) * (3 + 5) ];
  1377.  
  1378.       window_one.row = 10;
  1379.       window_one.col = 20;
  1380.       window_one.hlen = 37;
  1381.       window_one.vlen = 3;
  1382.       window_one.color = color (YELLOW, BLUE);
  1383.       window_one.buffer = window_one_buffer;
  1384.       window_one.vtype = DOUBLE_LINE;
  1385.       window_one.htype = DOUBLE_LINE;
  1386.  
  1387.       make_window (&window_one);  /* makes a window at 10, 20 */
  1388.       move_window (&window_one, 0, 0);
  1389.       /* moves "window_one" to the upper left-hand corner of the screen */
  1390.    }
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.                                            24
  1418.                 KyCorp Memory Resident Library Version 2.01
  1419.  
  1420. void normalcur ()
  1421.  
  1422. Description:   This is a macro function to cause the cursor to return to its
  1423.                default size.
  1424.  
  1425. Return Value:  None.
  1426.  
  1427. #include <resident.h>
  1428. main ()
  1429.    {
  1430.       hidecur ();
  1431.       display_routine ();
  1432.       normalcur ();
  1433.    }
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.                                            25
  1477.                 KyCorp Memory Resident Library Version 2.01
  1478.  
  1479. void save_window (window)
  1480.    struct WINDOW *window;              Structure defining the window
  1481.  
  1482. Description:   The "save_window" function saves the characters and color
  1483.                attributes of the area of the display screen (as defined by
  1484.                the appropriate members of the "window" structure) in
  1485.                "(*window).buffer".
  1486.  
  1487.                Note that this function in conjunction with "move_window" can
  1488.                be used to copy sections of the screen from one location to
  1489.                another.
  1490.  
  1491. Return Value:  None.
  1492.  
  1493. #include <resident.h>
  1494. main ()
  1495.    {
  1496.       struct WINDOW window_one;
  1497.       int window_one_buffer [ (37 + 2) * (3 + 2) ];
  1498.  
  1499.       window_one.row = 10;
  1500.       window_one.col = 20;
  1501.       window_one.hlen = 37;
  1502.       window_one.vlen = 3;
  1503.       window_one.color = MONOCHROME;
  1504.       window_one.buffer = window_one_buffer;
  1505.       window_one.vtype = NO_LINES;
  1506.       window_one.htype = NO_LINES;
  1507.  
  1508.       save_window (&window_one);
  1509.       move_window (&window_one, 0, 0);
  1510.       /* copies the section of the screen defined by the structure
  1511.          "window_one" to the upper left-hand corner of the screen */
  1512.    }
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.                                            26
  1536.                 KyCorp Memory Resident Library Version 2.01
  1537.  
  1538. int SCREEN_SPEED
  1539.  
  1540. Description:   SCREEN_SPEED is a global variable which determines how the
  1541.                video routines send there data to the screen.  With some
  1542.                video cards, if the CPU and the video card are trying to
  1543.                access the video memory at the same time you will get snow on
  1544.                the display screen.
  1545.  
  1546.                Setting SCREEN_SPEED to SCREEN_SLOW causes the video routines
  1547.                to check to ensure the raster is in a vertical retrace
  1548.                (sometimes referred to as a vertical blank) before sending a
  1549.                piece of data to the screen.  While the raster is in vertical
  1550.                retrace the video card is not accessing memory and the video
  1551.                memory can be changed without any snow on the screen.
  1552.  
  1553.                Setting SCREEN_SPEED to SCREEN_FAST causes the video routines
  1554.                to just check to ensure the video card is not accessing
  1555.                memory, such as when the raster is in horizontal retrace. 
  1556.                There is a small amount of overlap when data is sent to
  1557.                display memory right before the raster has completed it's
  1558.                horizontal retrace.  This sometimes results in a small amount
  1559.                of snow in the first 4 or 5 columns on the left side of the
  1560.                screen.
  1561.  
  1562.                Setting SCREEN_SPEED to SCREEN_DIRECT causes the video
  1563.                routines to ignore the state of the video display which could
  1564.                result in snow in various places on the screen depending on
  1565.                the type of display card used.  Some of the newer cards do
  1566.                not have problems with snow.
  1567.  
  1568.                SCREEN_SPEED has no effect if the display is monochrome.
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.                                            27
  1595.                 KyCorp Memory Resident Library Version 2.01
  1596.  
  1597. void setcur (position)
  1598.    int position;                 Hexadecimal cursor position
  1599.  
  1600. Description:   Places the cursor at a particular location on the screen.
  1601.  
  1602. Return Value:  None.
  1603.  
  1604. example1 ()
  1605.    {
  1606.       int   row = 10;
  1607.       int   col = 20;
  1608.  
  1609.       setcur (row * 256 + col);
  1610.    }
  1611.  
  1612. example2 ()
  1613.    {
  1614.       int   save_position;
  1615.  
  1616.       save_position = getcur ();
  1617.       display_routine ();
  1618.       setcur (save_position);
  1619.    }
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.                                            28
  1654.                 KyCorp Memory Resident Library Version 2.01
  1655.  
  1656. void sound (frequency, duration)
  1657.    int frequency;                Frequency in cycles per second
  1658.    int duration;                 18.6 duration units per second
  1659.  
  1660. Description:   The "sound" function will cause the speaker to emit a tone at
  1661.                the pitch specified by "frequency" for "duration" / 18.6
  1662.                seconds.  Passing a "frequency" of NULL produces no tone, but
  1663.                halts execution of the program for "duration".
  1664.  
  1665. Return Value:  None.
  1666.  
  1667. #include <resident.h>
  1668. main ()
  1669.    {
  1670.       sound (440, 5);
  1671.       sound (0, 2);
  1672.       sound (220, 5);
  1673.    }
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.                                            29
  1713.                 KyCorp Memory Resident Library Version 2.01
  1714.  
  1715. unsigned int STACK_SIZE;
  1716.  
  1717. Description:   STACK_SIZE is a global variable used to set the size of the
  1718.                stack when the "go_resident" function is executed.  The
  1719.                default value is 2000.  Changing the value of STACK_SIZE to
  1720.                something larger before the "go_resident" function is execute
  1721.                creates a bigger stack - and a bigger program in memory.  The
  1722.                default value should be sufficient for most needs unless you
  1723.                are using large local variables or routines that are heavily
  1724.                recursive.
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.                                            30
  1772.                 KyCorp Memory Resident Library Version 2.01
  1773.  
  1774. int top_tsr (void)
  1775.  
  1776. Description:   Returns TRUE if the program is currently the topmost resident
  1777.                program.  This is done by checking that all the interupt
  1778.                vectors modified by GO_RESIDENT are still set to their
  1779.                original values.
  1780.  
  1781. Return Value:  Returns FALSE if another resident program is loaded on top,
  1782.                i.e. an interupt vector has been changed.
  1783.  
  1784. #include <resident.h>
  1785. test ()
  1786.    {
  1787.       if (!top_tsr)
  1788.          dis_str (10, 20, "This is not the top-most resident program",
  1789.                   bright (MONOCHROME));
  1790.    }
  1791.  
  1792. main ()
  1793.    {
  1794.       go_resident (test, KEY_T, KEY_CTRL, KEY_ALT);
  1795.    }
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.                                            31
  1831.                 KyCorp Memory Resident Library Version 2.01
  1832.  
  1833. int underlined (attribute)
  1834.    int attribute;                Monochrome attribute underline
  1835.  
  1836. Description:   Modifies a monochrome attribute to one that is underlined. 
  1837.                If used on a color attribute the color will be changed to
  1838.                either a BLUE or LT_BLUE character with the background color
  1839.                left unchanged.
  1840.  
  1841. Return Value:  ((attribute | 1) & 0xf9)
  1842.  
  1843. #include <resident.h>
  1844. main ()
  1845.    {
  1846.       dis_str (10, 20, "This is underlined, bright, & blinking",
  1847.                underlined (bright (blinking (MONOCHROME))));
  1848.    }
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.                                            32
  1890.                 KyCorp Memory Resident Library Version 2.01
  1891.  
  1892. void ver_line (row, column, length, character, color)
  1893.    int row, column;              Position on screen to start drawing
  1894.    int length;                   Length of the line to draw
  1895.    int character;                Character to use for the line
  1896.    int color;                    Color attribute of the line
  1897.  
  1898. Description:   Draws a vertical line starting at position "row" and "column"
  1899.                by displaying "length" number of "character" onto the screen
  1900.                with the "color" attribute.
  1901.  
  1902. Return Value:  None.
  1903.  
  1904. #include <resident.h>
  1905. main ()
  1906.    {
  1907.       ver_line (10, 20, 10, 186, color (YELLOW, BLUE));
  1908.       /* draws a double line vertically that is 10 characters long */
  1909.    }
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.                                            33
  1949.                 KyCorp Memory Resident Library Version 2.01
  1950.  
  1951. struct WINDOW
  1952.    {
  1953.       unsigned int row, col;           Upper left-hand corner position
  1954.       unsigned int hlen, vlen;         Window's inside dimensions
  1955.       unsigned int color;              Window's color attribute
  1956.       int *buffer;                     Storage space
  1957.       unsigned int vtype, htype;       Window line types
  1958.    };
  1959.  
  1960. Description:   This structure should be used to define a window which can be
  1961.                easily passed to other functions such as "make_window" and
  1962.                "move_window".
  1963.  
  1964.                Note that if either "vtype" or "htype" is set to NO_LINES
  1965.                then a type NULL box is drawn with the MAKE_WINDOW function. 
  1966.                Otherwise these members should be set to either SINGLE_LINE
  1967.                or DOUBLE_LINE.
  1968.  
  1969. Return Value:  None.
  1970.  
  1971. #include <resident.h>
  1972. main ()
  1973.    {
  1974.       struct WINDOW window_one;
  1975.       int window_one_buffer [ (37 + 2) * (3 + 2) ];
  1976.          /* allocate enough storage space for all characters & color 
  1977.             attributes for a window with inside dimensions of
  1978.             3 rows by 37 columns */
  1979.  
  1980.       window_one.row = 10;
  1981.       window_one.col = 20;
  1982.          /* put upper left-hand corner of the window at 10, 20 */
  1983.  
  1984.       window_one.hlen = 37;
  1985.       window_one.vlen = 3;
  1986.          /* make inside dimensions 3 rows by 37 columns */
  1987.  
  1988.       window_one.color = color (YELLOW, BLUE);
  1989.          /* make color attribute yellow characters on a blue background */
  1990.  
  1991.       window_one.buffer = window_one_buffer;
  1992.          /* use window_one_buffer as the storage space */
  1993.  
  1994.       window_one.vtype = SINGLE_LINE;
  1995.       window_one.htype = DOUBLE_LINE;
  1996.       /* draw the box using single lines for the vertical sides and
  1997.          double lines for the top and bottom */
  1998.  
  1999.       make_window (&window_one);  /* makes a window at 10, 20 */
  2000.    }
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.                                            34
  2008.                 KyCorp Memory Resident Library Version 2.01
  2009.  
  2010.                           Appendix A:  Warrantee
  2011.  
  2012. This software and instructions are provided "as is" without warranty of any
  2013. kind either expressed or implied including but not limited to fitness for a
  2014. particular purpose. The entire risk as to the results and performance of the
  2015. software is assumed by the user.
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.                                            35
  2067.                 KyCorp Memory Resident Library Version 2.01
  2068.  
  2069.                   Appendix B:  Compiling & Linking TEST.C 
  2070.  
  2071. The only requirement while compiling and linking with these library modules
  2072. is to use the small memory model and suppress the stack checking.  For Turbo
  2073. C this is the default model.  For Microsoft use the /Gs switch.
  2074.  
  2075. Microsoft C:
  2076.    msc test /Gs ;
  2077.    link test ,,, msres201
  2078.  
  2079. Turbo C:
  2080.    tcc test tbres201.lib
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086.  
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.                                            36
  2126.                 KyCorp Memory Resident Library Version 2.01
  2127.  
  2128.                        Appendix C:  License for Use
  2129.  
  2130. These KyCorp Memory Resident Library modules may be copied, distributed
  2131. (free of charge), and used non-commercially provided that they are not
  2132. modified in any way.
  2133.  
  2134. If you would like to use these routines in a program to be distributed for
  2135. profit (this includes shareware programs) then send a check or money order
  2136. for $65 to the mailing address below.
  2137.  
  2138. Send all electronic correspondence to:
  2139.    KYMASTER on Genie
  2140.    70441,3353 on CompuServe
  2141.  
  2142. Mailing Address:
  2143.    KyCorp Information Group, Inc.
  2144.    725 Market Street
  2145.    Wilmington, DE 19801
  2146.  
  2147. If you find these routines useful, please do me a favor and let me know what
  2148. you think of them.  As a fellow programmer you probably know how I love to
  2149. get constructive feedback on my work almost as much as getting paid for it. 
  2150. Remember, I said almost.
  2151.  
  2152. Happy Programming!
  2153.  
  2154.                            - Mark C. Peterson
  2155.                              Programmer and Chief Bottle Washer
  2156.                              KyCorp Information Group, Inc.
  2157.  
  2158. P.S. That's pronounced "KEY-corp"!
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.                                            37
  2185.