home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource4 / 269_01 / manual3.doc < prev    next >
Encoding:
Text File  |  1987-05-17  |  30.8 KB  |  1,497 lines

  1. Unicorn 1 Documentation  3.1                                      page 79
  2.  
  3. __________________________________________________________________________
  4.  
  5.  
  6.                               prtbs
  7.  
  8.  
  9. Sends a backspace character to the printer.
  10.  
  11.  
  12.  
  13.  
  14. Call:         prtbs();
  15.  
  16.  
  17.  
  18.  
  19.  
  20. Example:      main()
  21.               {
  22.                  prtbs();  /* send a back space to the printer */
  23.               }
  24.  
  25.  
  26.  
  27. Unicorn 1 Documentation  3.1                                      page 80
  28.  
  29. __________________________________________________________________________
  30.  
  31.  
  32.                               prtbuzz
  33.  
  34.  
  35. Sounds the printers alarm buzzer.
  36.  
  37.  
  38.  
  39. Call:         prtbuzz();
  40.  
  41.  
  42.  
  43.  
  44. Example:      main()
  45.               {
  46.                  prtbuzz();  /* sound the printer buzzer */
  47.               }
  48.  
  49.  
  50.  
  51. Unicorn 1 Documentation  3.1                                      page 81
  52.  
  53. __________________________________________________________________________
  54.  
  55.  
  56.                               prtcan
  57.  
  58.  
  59. Sends a cancel character to the printer and stops the print.
  60.  
  61.  
  62.  
  63.  
  64. Call:         prtcan();
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Example:      main()
  71.               {
  72.                  prtcan();   /* send a cancel to the printer */
  73.               }
  74.  
  75.  
  76.  
  77. Unicorn 1 Documentation  3.1                                      page 82
  78.  
  79. __________________________________________________________________________
  80.  
  81.  
  82.                               prtcomof
  83.  
  84.  
  85.  
  86. Turns off the printers compressed print mode.
  87.  
  88.  
  89.  
  90.  
  91. Call:         prtcomof();
  92.  
  93.  
  94.  
  95.  
  96.  
  97. Example:      main()
  98.               {
  99.                  prtcomof();  /* Turn off compressed print */
  100.  
  101.  
  102.  
  103. Unicorn 1 Documentation  3.1                                      page 83
  104.  
  105. __________________________________________________________________________
  106.  
  107.  
  108.                               prtcomon
  109.  
  110.  
  111.  
  112. Turns on the printers compressed print mode.
  113.  
  114.  
  115.  
  116.  
  117. Call:         prtcomon();
  118.  
  119.  
  120.  
  121.  
  122. Example:      main()
  123.               {
  124.                  prtcomon();  /*  turn on the compressed mode */
  125.               }
  126.  
  127.  
  128.  
  129. Unicorn 1 Documentation  3.1                                      page 84
  130.  
  131. __________________________________________________________________________
  132.  
  133.  
  134.                               prtcr
  135.  
  136.  
  137.  
  138. Sends a carriage return character to the printer.
  139.  
  140.  
  141.  
  142.  
  143. Call:         prtcr();
  144.  
  145.  
  146.  
  147.  
  148.  
  149. Example:      main()
  150.               {
  151.                  prtcr();   /* send a carriage return to the printer */
  152.               }
  153.  
  154.  
  155.  
  156. Unicorn 1 Documentation  3.1                                      page 85
  157.  
  158. __________________________________________________________________________
  159.  
  160.  
  161.                               prtduboff
  162.  
  163.  
  164. This function turns off the double strike character mode.  Each character is
  165. struck twice by the print head.
  166.  
  167.  
  168.  
  169.  
  170. Call:         prtduboff();
  171.  
  172.  
  173.  
  174.  
  175. Example:      main()
  176.               {
  177.                  prtduboff();   /* turn off the double struck characters */
  178.               }
  179.  
  180.  
  181.  
  182. Unicorn 1 Documentation  3.1                                      page 86
  183.  
  184. __________________________________________________________________________
  185.  
  186.  
  187.                               prtdubon
  188.  
  189.  
  190.  
  191. This function turns on the double strike character mode.  Each character is
  192. struck twice by the print head.
  193.  
  194.  
  195.  
  196.  
  197. Call:         prtdubon();
  198.  
  199.  
  200.  
  201.  
  202. Example:      main()
  203.               {
  204.                  prtdubon();   /* turn on the double struck characters */
  205.               }
  206.  
  207.  
  208.  
  209.  
  210. Unicorn 1 Documentation  3.1                                      page 87
  211.  
  212. __________________________________________________________________________
  213.  
  214.  
  215.                               prtempof
  216.  
  217.  
  218. This function turns off the emphasized print mode.
  219.  
  220.  
  221.  
  222.  
  223.  
  224. Call:         prtempof();
  225.  
  226.  
  227.  
  228.  
  229. Example:      main()
  230.               {
  231.                  prtempof();  /* turn off the emphasized print mode */
  232.               }
  233.  
  234.  
  235.  
  236. Unicorn 1 Documentation  3.1                                      page 88
  237.  
  238. __________________________________________________________________________
  239.  
  240.  
  241.                               prtempon
  242.  
  243.  
  244. Turns on the emphasized print mode.
  245.  
  246.  
  247.  
  248.  
  249. Call:         prtempon();
  250.  
  251.  
  252.  
  253.  
  254. Example:      main()
  255.               {
  256.                  prtempon();  /* Turn on the emphasized print mode */
  257.               }
  258.  
  259.  
  260.  
  261. Unicorn 1 Documentation  3.1                                      page 89
  262.  
  263. __________________________________________________________________________
  264.  
  265.  
  266.                               prtesc
  267.  
  268.  
  269. Sends an escape character to the printer.
  270.  
  271.  
  272.  
  273.  
  274. Call:         prtesc();
  275.  
  276.  
  277.  
  278.  
  279.  
  280. Example:      main()
  281.               {
  282.                  prtesc();  /* send an escape to the printer */
  283.               }
  284.  
  285.  
  286.  
  287. Unicorn 1 Documentation  3.1                                      page 90
  288.  
  289. __________________________________________________________________________
  290.  
  291.  
  292.                               prtff
  293.  
  294.  
  295. Sends a form feed character to the printer.
  296.  
  297.  
  298.  
  299.  
  300. Call:         prtff();
  301.  
  302.  
  303.  
  304.  
  305.  
  306. Example:      main()
  307.               {
  308.                  prtff();   /* send a form feed to the printer */
  309.               }
  310.  
  311.  
  312.  
  313. Unicorn 1 Documentation  3.1                                      page 91
  314.  
  315. __________________________________________________________________________
  316.  
  317.  
  318.                               prtlf
  319.  
  320.  
  321. Sends a line feed character to the printer.
  322.  
  323.  
  324.  
  325.  
  326. Call:         prtlf();
  327.  
  328.  
  329.  
  330.  
  331.  
  332. Example:      main()
  333.               {
  334.                  prtlf();   /* send a line feed to the printer */
  335.               }
  336.  
  337.  
  338.  
  339. Unicorn 1 Documentation  3.1                                      page 92
  340.  
  341. __________________________________________________________________________
  342.  
  343.  
  344.                               prttab
  345.  
  346.  
  347. Sends a tab character to the printer.
  348.  
  349.  
  350.  
  351.  
  352. Call:         prttab();
  353.  
  354.  
  355.  
  356.  
  357.  
  358. Example:      main()
  359.               {
  360.                  prttab();   /* send a tab to the printer */
  361.               }
  362.  
  363.  
  364.  
  365. Unicorn 1 Documentation  3.1                                      page 93
  366.  
  367. __________________________________________________________________________
  368.  
  369.  
  370.                               prtwidoff
  371.  
  372.  
  373. This function turns of the wide or double width character mode.
  374.  
  375.  
  376.  
  377. Call:         prtwidoff();
  378.  
  379.  
  380.  
  381. Example:      main()
  382.               {
  383.                  prtwidoff();   /* turn off the double width characters */
  384.               }
  385.  
  386.  
  387.  
  388. Unicorn 1 Documentation  3.1                                      page 94
  389.  
  390. __________________________________________________________________________
  391.  
  392.  
  393.                               prtwidon
  394.  
  395.  
  396. Turns on the printer wide or double width character mode.  This mode is
  397. automatically canceled at the next new line sent to the printer.
  398.  
  399.  
  400.  
  401. Call:         prtwidon();
  402.  
  403.  
  404.  
  405.  
  406. Example:      main()
  407.               {
  408.                  prtwidon();    /* turn on the wide mode */
  409.               }
  410.  
  411.  
  412.  
  413.  
  414. E
  415.      Unicorn Library Documentation  3.1                         page 95
  416.  
  417.      __________________________________________________________________
  418.  
  419.                               rad2deg
  420. F
  421.      Converts angles expressed in radians to the equivalent angle
  422.      expressed in degrees.   Both the angle and the return are
  423.      doubles.
  424.  
  425.  
  426.  
  427.  
  428.  
  429.      Call:   rad2deg(angle);
  430.  
  431.              angle  =  angle expressed in radians
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.      Example:    main()
  439.                  {
  440.                     double a, rad2deg();
  441.  
  442.                     a = rad2deg(3.45);
  443.                   }
  444.  
  445.  
  446.  
  447. E
  448.      Unicorn Library Documentation  3.1                         page 96
  449.  
  450.      __________________________________________________________________
  451.  
  452.                                raschar
  453.  
  454. F     Prints a single large character on the graphics screen using the
  455.      internal ROM character descriptions.
  456.  
  457.  
  458.  
  459.  
  460.      Call:   raschar(char, ulc, ulr, hmag, vmag, color);
  461.  
  462.              char   =  character to print
  463.              ulc    =  upper left corner column
  464.              ulr    =  upper left corner row
  465.              hmag   =  horizontal magnification factor
  466.              vmag   =  vertical magnification factor
  467.              color  =  color of the character
  468.  
  469.  
  470.      Example:   main()
  471.                 {
  472.                    sm(4);  /* set graphics mode */
  473.                    /* print a large 'A' in color 3 */
  474.                    raschar('A', 50, 50, 4, 4, 3);
  475.                 }
  476.  
  477.  
  478. Unicorn 1 Documentation  3.1                                      page 97
  479.  
  480. __________________________________________________________________________
  481.  
  482.  
  483.                               readkey
  484.  
  485.  
  486. Returns a key for both ascii and scan codes.  Scan code is in high byte of
  487. integer return and ascii code is in low byte.  This is a destructive read.
  488.  
  489.  
  490.  
  491.  
  492. Call:         readkey();
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499. Example:      main()
  500.               {
  501.                  int a;
  502.                  a = readkey(); /* get a key */
  503.               }
  504.  
  505.  
  506. Unicorn 1 Documentation  3.1                                      page 98
  507.  
  508. __________________________________________________________________________
  509.  
  510.  
  511.                               redalert
  512.  
  513.  
  514. Sounds a series of 4 rapid upward glissandos forming a red alert signal.
  515.  
  516.  
  517.  
  518.  
  519.  
  520. Call:         redalert();
  521.  
  522.  
  523.  
  524.  
  525.  
  526. Example:      main()
  527.               {
  528.                  redalert();   /* Sound the red alert */
  529.               }
  530.  
  531.  
  532.  
  533.  
  534. E
  535.      Unicorn Library Documentation  3.1                         page 99
  536.  
  537.      __________________________________________________________________
  538.  
  539.                               replacech
  540.  
  541. F     Replaces all occurances of a character in a string with a new
  542.      character.
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.      Call:   replacech(str, old, new);
  550.  
  551.              str  =  string to be searched
  552.              old  =  original character to be replaced
  553.              new  =  the new replacement character for string
  554.  
  555.  
  556.  
  557.  
  558.      Example:     main()
  559.                   {
  560.                      char *a = "This is a test";
  561.                      /* replace all lower case t's with upper case T's */
  562.                      replacech(a, 't', 'T');
  563.                   }
  564.  
  565.  
  566. Unicorn 1 Documentation  3.1                                      page 100
  567.  
  568. __________________________________________________________________________
  569.  
  570.  
  571.                               scankey
  572.  
  573.  
  574. This function returns 0 if no key is avialable.  If the return is non 0
  575. then the key is read non-destructively and the scan code is returned in
  576. the high byte of an integer and the ascii code is returned in the low byte.
  577.  
  578.  
  579.  
  580.  
  581.  
  582. Call:         scankey();
  583.  
  584.  
  585.  
  586.  
  587.  
  588. Example:      main()
  589.               {
  590.                  int a;
  591.                  a = scankey(); /* get values if a key is available */
  592.               }
  593.  
  594.  
  595.  
  596. E
  597.      Unicorn Library Documentation  3.1                         page 101
  598.  
  599.      __________________________________________________________________
  600.  
  601.                                setatten
  602.  
  603. F                            Tandy 1000 only
  604.  
  605.      Sound primative function to allow setting the attenuation of any
  606.      of the 3 sound channels.
  607.  
  608.  
  609.  
  610.  
  611.      Call:  setatten(voice, level);
  612.  
  613.             voice  =  1, 2, or 3
  614.             level  =  1 to 15 with 15 being the maximum attenuation or
  615.                       soundoff.
  616.  
  617.  
  618.  
  619.      Example:   main()
  620.                 {
  621.                    /*  set the sound level in voice 1 to very loud and
  622.                        voice 2 to off                                 */
  623.                    setatten(1, 1);
  624.                    setatten(2, 15);
  625.                 }
  626.  
  627.  
  628.  
  629. E
  630.      Unicorn Library Documentation  3.1                         page 102
  631.  
  632.      __________________________________________________________________
  633.  
  634.                                setcurp
  635.  
  636. F     Sets the cursor position to a specified row an column.
  637.  
  638.  
  639.  
  640.  
  641.      Call:   setcurp(row, column);
  642.  
  643.              row     =  row to set cursor in
  644.              column  =  column to set cursor in
  645.  
  646.  
  647.  
  648.  
  649.      Example:   main()
  650.                 {
  651.                   sm(4);   /* set graphics mode  */
  652.                   /* move cursor to row 10, column 43 */
  653.                   setcurp(10, 43);
  654.                 }
  655.  
  656.  
  657.  
  658.  
  659. E
  660.      Unicorn Library Documentation  3.1                         page 103
  661.  
  662.      __________________________________________________________________
  663.  
  664.                                setcurt
  665.  
  666. F     Sets the cursor type. (start and stop lines.)
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.      Call:  setcurt(start, stop);
  674.  
  675.             start  =  the line in character cell where cursor starts
  676.             stop   =  the line in character cell where cursor stops
  677.  
  678.  
  679.  
  680.  
  681.      Example:    main()
  682.                  {
  683.                     /*  set the normal 2 line high cursor  */
  684.  
  685.                     setcurt(0,1);
  686.                  }
  687.  
  688.  
  689.  
  690.  
  691. E
  692.      Unicorn Library Documentation  3.1                         page 104
  693.  
  694.      __________________________________________________________________
  695.  
  696.                                setfreq
  697.  
  698. F                         Tandy 1000 only
  699.  
  700.      Sound function to set a value into a sound register for a specified
  701.      voice.  The value to set is calculated by the formula:
  702.  
  703.                         value = 111843 / frequency
  704.  
  705.  
  706.  
  707.  
  708.  
  709.      Call:   setfreq(voice, frequency);
  710.  
  711.              voice      =  voice ( 0-3)
  712.              frequency  =  frequency to set into voice register
  713.  
  714.  
  715.  
  716.  
  717.  
  718.      Example:   main()
  719.                 {
  720.                    /*  set a 1000 hz tone into voice 2 */
  721.  
  722.                    setfreq(2, 1000);
  723.                 }
  724.  
  725.  
  726.  
  727. E
  728.      Unicorn Library Documentation  3.1                         page 105
  729.  
  730.      __________________________________________________________________
  731.  
  732.                                setpal
  733.  
  734. F                         Tandy 1000 only
  735.  
  736.      Allows the user to set any color into a plalette register.
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.      Call:   setpal(pal_reg, color);
  744.  
  745.              pal_reg  =  the number of the palette register to change
  746.              color    =  color to set into palette register
  747.  
  748.  
  749.  
  750.      Example:     main()
  751.                   {
  752.                      sm(4);  /*  set graphics mode */
  753.                      /*  set palette register 14 to color 4 (red);
  754.                      setpal(14, 4);
  755.                      /*  any reference to color 14 (yellow) will now
  756.                          display color 4 (red) instead.              */
  757.                   }
  758.  
  759.  
  760. Unicorn 1 Documentation  3.1                                      page 106
  761.  
  762. __________________________________________________________________________
  763.  
  764.  
  765.                               siren
  766.  
  767.  
  768. This function sounds a series of up and down glissandos simulating a siren
  769. sound.
  770.  
  771.  
  772.  
  773.  
  774.  
  775. Call:         siren(number);
  776.  
  777.               number = the number of up/down glissandos to sound */
  778.  
  779.  
  780.  
  781.  
  782.  
  783. Example:      main()
  784.               {
  785.                  siren(5);  /* sound 5 up/down siren sounds */
  786.               }
  787.  
  788.  
  789.  
  790. E
  791.      Unicorn Library Documentation  3.1                         page 107
  792.  
  793.      __________________________________________________________________
  794.  
  795.                                sm
  796.  
  797. F     Sets the video mode.  For this library to work properly all
  798.      graphics must be done in mode 4 for the IBM-PC version and in mode
  799.      9 for the tandy version.  The mode 4 version may be used on a
  800.      Tandy 1000 to create fully compatible IBM-PC programs.
  801.      In addition upon exiting a tandy version (mode 9) program the mode
  802.      must be reset back to mode 3.  Failure to do so will probably cause
  803.      the machine to crash.
  804.  
  805.  
  806.  
  807.  
  808.      Call:   sm(mode);
  809.  
  810.              mode  =  video mode desired according to below table
  811.  
  812.              Mode Table
  813.  
  814.              0  -  40x25 balck and white
  815.              1  -  40x25 color
  816.              2  -  80x25 black and white
  817.              3  -  80x25 color
  818.              4  -  320x200 4 color graphics
  819.              5  -  320x200 black and white graphics
  820.              6  -  640x200 black and white graphics
  821.              7  -  EDo NOT Use!F
  822.              8  -  160x200 color graphics with 16 colors
  823.              9  -  320x200 color graphics with 16 colors
  824.              10 -  640x200 color graphics with 4 colors
  825.  
  826.  
  827.      Example:   main()
  828.                 {
  829.                   sm(9);  /* set graphics mode 9 for Tandy 1000 */
  830.                 }
  831.  
  832.  
  833.  
  834. E
  835.      Unicorn Library Documentation  3.1                         page 108
  836.  
  837.      __________________________________________________________________
  838.  
  839.                                soundoff
  840.  
  841. F                          Tandy 1000 only
  842.  
  843.      Turns off the complex sound generator chip.
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.      Call:   soundoff();
  853.  
  854.  
  855.  
  856.  
  857.      Example:    main()
  858.                  {
  859.                     /*  Turn off the complex sound generator chip */
  860.  
  861.                     soundoff();
  862.                  }
  863.  
  864.  
  865.  
  866.  
  867. E
  868.      Unicorn Library Documentation  3.1                         page 109
  869.  
  870.      __________________________________________________________________
  871.  
  872.                                soundon
  873.  
  874. F                        Tandy 1000 only
  875.  
  876.      Turns on the complex sound generator chip.  Must be called prior to
  877.      any call to other sound functions.
  878.  
  879.  
  880.  
  881.  
  882.  
  883.      Call:   soundon();
  884.  
  885.  
  886.  
  887.  
  888.      Example:    main()
  889.                  {
  890.                     /* turn on the sound chip */
  891.                     soundon();
  892.                  }
  893.  
  894.  
  895.  
  896. E
  897.      Unicorn Library Documentation  3.1                         page 110
  898.  
  899.      __________________________________________________________________
  900.  
  901.                                spalreg
  902.  
  903. F                          Tandy 1000 only
  904.  
  905.      Changes the defined color of any palette register from 0 to 15.
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.      Call:    spalreg(reg_num, color);
  914.  
  915.               reg_num  =  register to change
  916.               color    =  new color fro the register
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.      Example:     main()
  924.                   {
  925.                      sm(4);  /*  set graphics mode */
  926.                      /*  set palette register 14 to color 4 (red);
  927.                      spalreg(14, 4);
  928.                      /*  any reference to color 14 (yellow) will now
  929.                          display color 4 (red) instead.              */
  930.                   }
  931.  
  932.  
  933.  
  934.  
  935. E
  936.      Unicorn Library Documentation  3.1                         page 111
  937.  
  938.      __________________________________________________________________
  939.  
  940.                                sstring
  941.  
  942. F     Print a stroke character string on the graphics screen.
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.      Call:   sstring(string, ulc, ulr, hmag, vmag, colorb, colorf);
  950.  
  951.              string  =  string to be printed
  952.              ulc     =  upper left corner column
  953.              ulr     =  upper left corner row
  954.              hmag    =  horizontal magnification
  955.              vmag    =  vertical magnification
  956.              colorb  =  border outline color
  957.              colorf  =  color to use in filling characters
  958.  
  959.  
  960.  
  961.  
  962.  
  963.      Example:     main()
  964.                   {
  965.                      sm(4);  /* set graphics mode */
  966.                      /* print the string "test" using stroke characters
  967.                         with a red outline and filled with yellow      */
  968.                      sstring("test", 10, 20, 2, 2, 4, 14);
  969.  
  970.  
  971.  
  972. E
  973.      Unicorn Library Documentation  3.1                         page 112
  974.  
  975.      __________________________________________________________________
  976.  
  977.                                stchar
  978.  
  979. F     Prints a single stroke character on the graphics screen
  980.  
  981.  
  982.  
  983.  
  984.  
  985.      Call:   stchar(char, ulc, ulr, hmag, vmag, colorb, colorf);
  986.  
  987.              char    =  character to be printed
  988.              ulc     =  upper left corner column
  989.              ulr     =  upper left corner row
  990.              hmag    =  horizontal magnification
  991.              vmag    =  vertical magnification
  992.              colorb  =  border outline color
  993.              colorf  =  color to use in filling characters
  994.  
  995.  
  996.  
  997.  
  998.  
  999.      Example:     main()
  1000.                   {
  1001.                      sm(4);  /* set graphics mode */
  1002.                      /* print the character 't' using stroke characters
  1003.                         with a red outline and filled with yellow      */
  1004.                       stchar('t', 10, 20, 2, 2, 4, 14);
  1005.  
  1006.  
  1007.  
  1008. E
  1009.      Unicorn Library Documentation  3.1                         page 113
  1010.  
  1011.      __________________________________________________________________
  1012.  
  1013.                                stratt
  1014.  
  1015. F     Prints a string using an attribute byte.
  1016.  
  1017.  
  1018.  
  1019.  
  1020.      Call:   stratt(attribute, string);
  1021.  
  1022.              attribute  =  attribute to use in printing character
  1023.              string     =  string to be printed
  1024.  
  1025.              attribute byte is formed according to below bit definitions
  1026.  
  1027.              foreground;
  1028.                         bit 0 = blue
  1029.                         bit 1 = green
  1030.                         bit 2 = red
  1031.                         bit 3 = intensity
  1032.              background;
  1033.                         bit 4 = blue
  1034.                         bit 5 = green
  1035.                         bit 6 = red
  1036.                         bit 7 = blink
  1037.  
  1038.  
  1039.  
  1040.      Example:   main()
  1041.                 {
  1042.                    /*  print the string "test" with a blue background
  1043.                        using bright red characters.                   */
  1044.                    stratt(28, "test");
  1045.                 }
  1046.  
  1047.  
  1048.  
  1049. E
  1050.      Unicorn Library Documentation  3.1                         page 114
  1051.  
  1052.      __________________________________________________________________
  1053.  
  1054.                                strclr
  1055.  
  1056. F     Prints a string on the screen in one of 16 colors.
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.      Call:    strclr(color, string);
  1063.  
  1064.               color   =  color to use in printing string
  1065.               string  =  string to print
  1066.  
  1067.  
  1068.  
  1069.  
  1070.      Example:    main()
  1071.                  {
  1072.                     /*  print the string "test" in red */
  1073.                     strclr(4, "test");
  1074.                  }
  1075.  
  1076.  
  1077.  
  1078. E
  1079.      Unicorn Library Documentation  3.1                         page 115
  1080.  
  1081.      __________________________________________________________________
  1082.  
  1083.                               strdel
  1084.  
  1085. F     Deletes a substring from a given string starting at the character
  1086.      numbered 'first' and continuing for 'number' of characters.
  1087.  
  1088.  
  1089.  
  1090.  
  1091.      Call:   strdel(str, first, number);
  1092.  
  1093.              str     =  string to be operated upon
  1094.              first   =  character to start the delete operation
  1095.              number  =  number of characters to delete
  1096.  
  1097.  
  1098.  
  1099.      Example:     main()
  1100.                   {
  1101.                      /*  delete the word is */
  1102.                      strdel("This is a test", 5,2);
  1103.                   }
  1104.  
  1105.  
  1106.  
  1107. E
  1108.      Unicorn Library Documentation  3.1                         page 116
  1109.  
  1110.      __________________________________________________________________
  1111.  
  1112.                               strpad
  1113.  
  1114. F     Pad a string with blanks on the left.
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.      Call:   strpad(str, number);
  1123.  
  1124.              str     =  string to be padded
  1125.              number  =  number of spaces to be added to the left
  1126.  
  1127.  
  1128.  
  1129.      Example:    main();
  1130.                  {
  1131.                     /* add 5 spaces to left of "This is a test" */
  1132.                     strpad("This is a test", 5);
  1133.                  }
  1134.  
  1135.  
  1136.  
  1137. E
  1138.      Unicorn Library Documentation  3.1                         page 117
  1139.  
  1140.      __________________________________________________________________
  1141.  
  1142.                               strtolow
  1143.  
  1144. F     Converts all characters in a string to lower case.
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.      Call:   strtolow(str);
  1153.  
  1154.              str  = string to be changed to all lower case.
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.      Example:      main()
  1162.                    {
  1163.                       char *a = "Testing";
  1164.                       strtolow(a);
  1165.                    }
  1166.  
  1167.  
  1168.  
  1169. E
  1170.      Unicorn Library Documentation  3.1                         page 118
  1171.  
  1172.      __________________________________________________________________
  1173.  
  1174.                               strtoup
  1175.  
  1176. F     Converts all characters in a string to upper case.
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.      Call:   strtoup(str);
  1185.  
  1186.              str  = string to be changed to all upper case.
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.      Example:      main()
  1194.                    {
  1195.                       char *a = "Testing";
  1196.                       strtoup(a);
  1197.                    }
  1198.  
  1199.  
  1200.  
  1201. E
  1202.      Unicorn Library Documentation  3.1                         page 119
  1203.  
  1204.      __________________________________________________________________
  1205.  
  1206.                                turnleft
  1207.  
  1208. F     Turns the turtle's current heading left by a specified number of
  1209.      degrees.
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.      Call:    turnleft(angle);
  1217.  
  1218.               angle  =  angle to turn through
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.      Example:    main()
  1225.                  {
  1226.                     sm(4);   /*  set graphics mode  */
  1227.  
  1228.                     /*  turn the turtle's heading left 50 degrees */
  1229.  
  1230.                     turnleft(50);
  1231.                  }
  1232.  
  1233.  
  1234.  
  1235. E
  1236.      Unicorn Library Documentation  3.1                         page 120
  1237.  
  1238.      __________________________________________________________________
  1239.  
  1240.                                turnright
  1241.  
  1242. F     Turns the turtle's current heading right by a specified number of
  1243.      degrees.
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.      Call:    turnright(angle);
  1251.  
  1252.               angle  =  angle to turn through
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      Example:    main()
  1259.                  {
  1260.                     sm(4);   /*  set graphics mode  */
  1261.  
  1262.                     /*  turn the turtle's heading right 50 degrees */
  1263.  
  1264.                     turnright(50);
  1265.                  }
  1266.  
  1267.  
  1268.  
  1269. E
  1270.      Unicorn Library Documentation  3.1                         page 121
  1271.  
  1272.      __________________________________________________________________
  1273.  
  1274.                                usrfont
  1275.  
  1276. F
  1277.      Select and print characters in various fonts on the graphics screen.
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.      Call:   usrfont(char, ulc, ulr, hmag, vmag, color, font);
  1286.  
  1287.              char   =  character to be printed
  1288.              ulc    =  upper left corner column
  1289.              ulr    =  upper left corner row
  1290.              hmag   =  horizontal magnification
  1291.              vmag   =  vertical magnification
  1292.              color  =  color to use in printing character
  1293.              font   =  an integer used to select which font.
  1294.  
  1295.              Font Table:
  1296.  
  1297.              0  -  Thin block all capital letters
  1298.              1  -  small characters for sub/superscripts.  Generally
  1299.                    defined in upper 4 columns and 4 rows of character cell.
  1300.              2  -  NOT YET DEFINED
  1301.              3  -  NOT YET DEFINED
  1302.              4  -  NOT YET DEFINED
  1303.  
  1304.  
  1305.      Example:     main()
  1306.                   {
  1307.                      sm(4);  /*  set graphics mode  */
  1308.  
  1309.                      /*  print an 'A' from the sub/superscript font at
  1310.                          twice normal size in color 3                 */
  1311.                      usrfont('A', 10, 20, 2, 2, 3, 1);
  1312.                   }
  1313.  
  1314.  
  1315.  
  1316. E
  1317.      Unicorn Library Documentation  3.1                         page 122
  1318.  
  1319.      __________________________________________________________________
  1320.  
  1321.                                   wac
  1322.  
  1323. F     Prints a character on the screen using an attribute byte.
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.      Call:   wac(attribute, char);
  1330.  
  1331.              attribute  =  attribute to use in printing character
  1332.              char       =  character to be printed
  1333.  
  1334.              attribute byte is formed according to below bit definitions
  1335.  
  1336.              foreground;
  1337.                         bit 0 = blue
  1338.                         bit 1 = green
  1339.                         bit 2 = red
  1340.                         bit 3 = intensity
  1341.              background;
  1342.                         bit 4 = blue
  1343.                         bit 5 = green
  1344.                         bit 6 = red
  1345.                         bit 7 = blink
  1346.  
  1347.  
  1348.  
  1349.      Example:   main()
  1350.                 {
  1351.                    /*  print the character 't' with a blue background
  1352.                        using bright red character color.             */
  1353.                    wac(28, 't');
  1354.                 }
  1355.  
  1356.  
  1357.  
  1358.  
  1359. E
  1360.      Unicorn Library Documentation  3.1                         page 123
  1361.  
  1362.      __________________________________________________________________
  1363.  
  1364.                                 waitkey
  1365.  
  1366. F     Pauses the computer until a key is pressed.  It does NOT return
  1367.      the key scan code or ascii value.
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.      Call:   waitkey();
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.      Example:   main()
  1381.                 {
  1382.                    /* wait until a key is pressed */
  1383.                    waitkey();
  1384.                 }
  1385.  
  1386.  
  1387.  
  1388.  
  1389. E
  1390.      Unicorn Library Documentation  3.1                         page 124
  1391.  
  1392.      __________________________________________________________________
  1393.  
  1394.                                   wco
  1395.  
  1396. F     Prints a character only on the screen.  In the graphics modes a
  1397.      color may be specified.
  1398.  
  1399.  
  1400.  
  1401.  
  1402.      Call:    wco(char, color);
  1403.  
  1404.               char   =  character to print
  1405.               color  =  color to use, ignored in text modes
  1406.  
  1407.  
  1408.  
  1409.  
  1410.      Example:     main()
  1411.                   {
  1412.                      /* prints the character 'W' */
  1413.                      wco('W', 4);
  1414.                      waitkey();  /* wait until a key is pressed */
  1415.                      sm(4);     /*  set the graphics mode */
  1416.                      /* print a 'W' in red on the graphics screen */
  1417.                      wco('W', 4);
  1418.                    }
  1419.  
  1420.  
  1421. Unicorn 1 Documentation  3.1                                      page 125
  1422.  
  1423. __________________________________________________________________________
  1424.  
  1425.  
  1426.                               wnoise
  1427.  
  1428.  
  1429.  
  1430. Sounds a white noise signal that is between two user selected frequencies.
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436. Call:         wnoise(low, high, duration);
  1437.  
  1438.               low      = lowest frequency to use
  1439.               high     = highest frequency to use
  1440.               duration = time factor, larger number is longer time
  1441.  
  1442.  
  1443.  
  1444.  
  1445. Example:      main()
  1446.               {
  1447.                  wnoise(100, 1000, 100); /* white noise between 100 & 1000 */
  1448.               }
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454. E
  1455.      Unicorn Library Documentation  3.1                         page 126
  1456.  
  1457.      __________________________________________________________________
  1458.  
  1459.                                 wtty
  1460.  
  1461. F     Prints a character and attribute on the screen.  It advances the
  1462.      cursor and responds to control characters.
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.      Call:   wtty(attribute, character);
  1470.  
  1471.              attribute  =  attribute to use in printing character
  1472.              char       =  character to be printed
  1473.  
  1474.              attribute byte is formed according to below bit definitions
  1475.  
  1476.              foreground;
  1477.                         bit 0 = blue
  1478.                         bit 1 = green
  1479.                         bit 2 = red
  1480.                         bit 3 = intensity
  1481.              background;
  1482.                         bit 4 = blue
  1483.                         bit 5 = green
  1484.                         bit 6 = red
  1485.                         bit 7 = blink
  1486.  
  1487.  
  1488.  
  1489.      Example:   main()
  1490.                 {
  1491.                    /*  print the character 't' with a blue background
  1492.                        using bright red character color.             */
  1493.                    wtty(28, 't');
  1494.                 }
  1495.  
  1496.  
  1497.