home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / uni-lib.zip / MANUAL1.DOC < prev    next >
Text File  |  1987-05-24  |  34KB  |  1,520 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.             ╔════════════════════════════════════════════════╗
  7.             ║                                                ║
  8.             ║               Unicorn  Library                 ║
  9.             ║                of C functions                  ║
  10.             ║                                                ║
  11.             ║                  Version 4.0                   ║
  12.             ║                                                ║
  13.             ║               Reference Manual                 ║
  14.             ║                                                ║
  15.             ║                                                ║
  16.             ║                  For Turbo C                   ║
  17.             ║                                                ║
  18.             ║             IBM PC  or Tandy 1000              ║
  19.             ║                                                ║
  20.             ║           Copyright (c) 1986, 1987             ║
  21.             ║                     by                         ║
  22.             ║               David A. Miller                  ║
  23.             ║                     for                        ║
  24.             ║              Unicorn  Software                 ║
  25.             ║                                                ║
  26.             ╚════════════════════════════════════════════════╝
  27.  
  28.  
  29.  
  30.  
  31.        This library may be used for non-commercial purposes by individual
  32.      users without payment or royalties of any kind.  Registration with
  33.      the author provides the user with a license to use the library in
  34.      commercial programs without royalty payments, along with complete
  35.      (over 600K) Ecommented source codeF for the library.  The
  36.      registration fee is $25.00 for this version and will include
  37.      notification of all updates.  Updates will be $10.00 without a disk
  38.      or $8.00 with a disk.
  39.  
  40.      Please note that multiple versions of the library exist.  The
  41.      machine this version is to be used on is listed above.  The Tandy
  42.      1000 version provides full access to the full 16 color medium
  43.      resolution mode while the IBM version uses the 4 color medium
  44.      resolution mode.
  45.  
  46.      Some of the functions are listed for one machine only.  Using them
  47.      on the wrong machine will possibly cause a crash.
  48.  
  49.      If you are using an IBM-PC or wish to use 4 color graphics on a
  50.      Tandy-1000 you must link the library UCTURBO.LIB.  If you wish to
  51.      use 16 color graphics on a Tandy-1000 be sure to link UCTUR_TD.LIB.
  52.      These should be specified in your project file.
  53.  
  54.                     R E G I S T R A T I O N   F O R M
  55.  
  56.      Registration may be accomplished by filling out this page and sending
  57.      it to the author with a $25.00 donation to cover costs.  Help support
  58.      the idea of freeware.  It is a method whereby software authors may
  59.      make available to the general user various types of software at a
  60.      minimum cost.  It benefits the entire computer community so do your
  61.      part.
  62.  
  63.      Name: ________________________________________
  64.  
  65.      Address: _____________________________________
  66.  
  67.      City: _____________________
  68.  
  69.      State: ________
  70.  
  71.      Zip: _________
  72.  
  73.      Library Version:   Version 4.0 P    For Turbo C  small model
  74.  
  75.      Version Desired (circle 1):
  76.  
  77.           Microsoft C 4.0       Turbo C
  78.  
  79.           I wish a Tandy 1000 version also: yes / no
  80.  
  81.      Computer Type and model: _________________________
  82.  
  83.      Received this copy of the library from: ______________________
  84.      This will enable us to check distribution and provide updates.
  85.  
  86.      Comments concerning the library and additional functions desired may
  87.      be listed on the back of the page.
  88.  
  89.      I understand that by submitting this form with the proper donation I
  90.      will receive a disk with ALL source code for the latest version.  I also
  91.      undetstand that this allows me to use the library in any commercial or
  92.      non-commercial application I desire without payment of additional fees
  93.      of any type.
  94.  
  95.      I understand that the source code is proprietary and agree not to give
  96.      it to third parties although I understand I may give the actual libraries
  97.      to third parties as long as I include all documentation and copyright
  98.      notices with or without registering my library and no fee other than
  99.      a handling fee of no more than $10.00 is charged by a user group or
  100.      club.
  101.  
  102.  
  103.                             Technical
  104.  
  105. This library was compiled with the Turbo C compiler and the Microsoft MASM
  106. version 4.0.   All compilation assumed small memory model.
  107.  
  108.  
  109.  
  110.  
  111.  
  112.                             Getting Started
  113.  
  114. This library will only work with the small memory model.  Using it with other
  115. memory models will cause highly unpredictable results and probably crash
  116. your machine.  You must have a graphics adapter to use the graphics commands
  117. and if you wish to use mode 9 or any other Tandy only functions you must
  118. have a Tandy 1000.  Other memory model libraries will soon be available and
  119. will be supplied with an update request ($10.00) or free with registration.
  120.  
  121. Be sure you specify the appropriate library in your project file.  For
  122. example if you have a file named test as shown:
  123.  
  124.           main()
  125.           {
  126.                 sm(4);
  127.                 atsay(10, 5, 3, 1, "This is a test");
  128.                 waitkey();
  129.                 sm(3);
  130.           }
  131.  
  132. and you wish to link it with the library the your project file should look
  133. like the below.
  134.  
  135.      test.c
  136.      ucturbo.lib
  137.  
  138.  
  139.      Doing so will correctly compile the program.
  140.  
  141.      All parameters are integers unless otherwise noted in this document.
  142.  
  143.      EFor the Tandy version all parameters concerning color may be any of
  144.      the 16 colors.F  For the IBM the color set consists of colors 1, 2,
  145.      and 3 and a background color.
  146.  
  147.      The Author may be contacted at the below address for registration
  148.      of your copy of the library.  This library may be freely copied and
  149.      distributed as long as a reasonable fee of no more than $8.00 is
  150.      charged for the service.  Registration with the author will provide
  151.      you with a license to use the library in programs for sale or
  152.      distribution without royalty payments along with the library
  153.      commented source code.  The Esource code may NOT be distributed
  154.      without express written permission of the authorF.
  155.  
  156.      Future versions will add both graphics and non-graphics functions.
  157.      Contemplated at present are animation commands, further string and
  158.      data handling including screen generation and tree functions along
  159.      with others.  The author may be contacted directly concerning the
  160.      updates and/or suggested additions.
  161.  
  162.      Support this and all freeware programs.  It is a way for authors
  163.      to make programming available to users at a reasonable cost and
  164.      thus helps both the user and the end user.
  165. E
  166.  
  167.                              David A. Miller
  168.                              18559 8th Ave. NE
  169.                              Seattle, WA  98155
  170.                              (206) 361-0553
  171.                              please no
  172.                              collect calls
  173.  
  174.      This library is a product of Unicorn Software.
  175. F
  176.  
  177. E
  178.      Unicorn Library Documentation  3.1                         page 1
  179.  
  180.      __________________________________________________________________
  181.  
  182.                                 atsay
  183. F
  184.     This function is similar to the dBASE function of the same name.  It
  185.     allows the user to print a string in color at a specified location
  186.     on the screen.  The background color is ignored in graphics modes.
  187.  
  188.  
  189.     Call:      atsay(row, column, foreground_color, back_color, string);
  190.  
  191.                row                =  row in which to begin string
  192.                column             =  column in which to begin string
  193.                foreground_color   =  color in which to print string
  194.                back_color         =  background color for string
  195.                string             =  string to be printed
  196.  
  197.  
  198.  
  199.  
  200.     Example:   main()
  201.                {
  202.                   atsay(5, 10, 3, 1, "Testing!");
  203.                }
  204.  
  205.                This will print the string "Testing!" beginning at row 5
  206.                column 10 in color number 3 with a background of color 1.
  207.  
  208.  
  209.  
  210. E
  211.      Unicorn Library Documentation  3.1                         page 2
  212.  
  213.      __________________________________________________________________
  214.  
  215.                                backclr
  216. F
  217.      Sets the background color of the graphics screen.
  218.  
  219.  
  220.  
  221.      Call:   backclr(color);
  222.  
  223.              color  =  desired background color
  224.  
  225.  
  226.  
  227.      Example:    main()
  228.                  {
  229.                     sm(4);        /*  set the graphics mode */
  230.                     backclr(14);  /*  sets background color to yellow */
  231.                  }
  232.  
  233.  
  234.  
  235. E
  236.      Unicorn Library Documentation  3.1                         page 3
  237.  
  238.      __________________________________________________________________
  239.  
  240.                                 beepsp
  241.  
  242. F
  243.  
  244.      Beeps the internal speaker.
  245.  
  246.  
  247.      Call:    beepsp();
  248.  
  249.  
  250.  
  251.      Example:
  252.               main()
  253.               {
  254.                  beepsp();
  255.               }
  256.  
  257.  
  258.  
  259.  
  260.  
  261. E
  262.      Unicorn Library Documentation  3.1                         page 4
  263.  
  264.      __________________________________________________________________
  265.  
  266.                               box
  267. F
  268.      Plots a rectangular uotline on the graphics screen.  The upper left
  269.      corner and the lower right corner coordinates are used to define
  270.      the box.
  271.  
  272.      Call:      box(ulc, ulr, lrc, lrr, color);
  273.  
  274.                 ulc    =  upper left corner column
  275.                 ulr    =  upper left corner row
  276.                 lrc    =  lower right corner column
  277.                 lrr    =  lower right corner row
  278.                 color  =  color to draw box
  279.  
  280.  
  281.      Example:    main()
  282.                  {
  283.                      sm(4);     /*  Set graphics mode */
  284.  
  285.                      /* draw a box from 10, 20 to 100, 140 in color 3 */
  286.  
  287.                      box(10, 20, 100, 140, 3);
  288.                  }
  289.  
  290.  
  291. E
  292.      Unicorn Library Documentation  3.1                         page 5
  293.  
  294.      __________________________________________________________________
  295.  
  296.                              box1
  297. F
  298.      Paints a one pixel wide border around a filled box.  The fill and
  299.      border colors may be separately specified.
  300.  
  301.      Call:   box1(ulc, ulr, lrc, lrr, colorb, colorf);
  302.  
  303.              ulc     = upper left corner column
  304.              ulr     = upper left corner row
  305.              lrc     = lower right corner column
  306.              lrr     = lower right corner row
  307.              colorb  = border color
  308.              colorf  = fill color
  309.  
  310.  
  311. è
  312.      Example:   main()
  313.                 {
  314.                    sm(4);       /* set a graphics mode */
  315.  
  316.                    /*  make a box from 10, 20 to 100,140 with a border
  317.                        in color 3 and filled with color 2             */
  318.  
  319.                    box110,20,100,140,3,2);
  320.  
  321. E
  322.      Unicorn Library Documentation  3.1                         page 6
  323.  
  324.      __________________________________________________________________
  325.  
  326.                              box2
  327. F
  328.      Paints a two pixel wide border around a filled box.  The fill and
  329.      border colors may be separately specified.
  330.  
  331.  
  332.      Call:   box2(ulc, ulr, lrc, lrr, colorb, colorf);
  333.  
  334.              ulc     = upper left corner column
  335.              ulr     = upper left corner row
  336.              lrc     = lower right corner column
  337.              lrr     = lower right corner row
  338.              colorb  = border color
  339.              colorf  = fill color
  340.  
  341.  
  342.      Example:   main()
  343.                 {
  344.                    sm(4);       /* set a graphics mode */
  345.  
  346.                    /*  make a box from 10, 20 to 100,140 with a border
  347.                        in color 3 and filled with color 2             */
  348.  
  349.                    box2(10,20,100,140,3,2);
  350.  
  351. E
  352.      Unicorn Library Documentation  3.1                         page 7
  353.  
  354.      __________________________________________________________________
  355.  
  356.                              boxfill
  357. èF
  358.      A function to plot a solid filled rectangle on the graphics screen.
  359.      It draws using the upper left corner and lower right corner
  360.      coordinates.
  361.  
  362.  
  363.      Call:   boxfill(ulc, ulr, lrc, lrr, color);
  364.  
  365.              ulc    =  upper left corner column
  366.              ulr    =  upper left corner row
  367.              lrc    =  lower right corner column
  368.              lrr    =  lower right corner row
  369.              color  =  color to paint rectangle
  370.  
  371.      Example:   main()
  372.                 {
  373.                    sm(4);    /*  set a graphics mode  */
  374.  
  375.                    /*  paint a box from 10, 20 to 100, 140 in color 3 */
  376.  
  377.                    boxfill(10,20,100,140,3);
  378.                 }
  379.  
  380.  
  381. E
  382.      Unicorn Library Documentation  3.1                         page 8
  383.  
  384.      __________________________________________________________________
  385.  
  386.                                 burble
  387.  
  388. F
  389.      Creates a rather strange sound on the internal speaker.  Has to be
  390.      heard to be described.
  391.  
  392.  
  393.  
  394.      Call:  burble(1/pitch, timer);
  395.  
  396.      Where:
  397.             pitch  =  the basic pitch desired
  398.             timer  = a value sent to the timer port
  399.  
  400.  
  401.      Example:
  402.               main()
  403.               {
  404.                   burble(100, 300);
  405.               }
  406.  
  407.  
  408.  
  409.  
  410.  
  411. E
  412.      Unicorn Library Documentation  3.1                         page 9
  413.  
  414.      __________________________________________________________________
  415.  
  416.                                 button
  417.  
  418. F
  419.  
  420.      Returns the joystick button status.  The return is held in 4 bits
  421.      as follows.
  422.                  bit 0  -  right button #1
  423.                  bit 1  -  right button #2
  424.                  bit 2  -  left button #1
  425.                  bit 3  -  left button #2
  426.  
  427.  
  428.      Call:
  429.             button();
  430.  
  431.  
  432.  
  433.      Example:
  434.              main()
  435.              {
  436.                 int a;
  437.                 a = button();
  438.              }
  439.  
  440.              The button status will be held in a.
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448. E
  449.      Unicorn Library Documentation  3.1                         page 10
  450.  
  451.      __________________________________________________________________
  452.  
  453.                                circle
  454. F
  455.      Plots a circle on the graphics screen.
  456.  
  457.  
  458.  
  459.      Call:   circle(xc, yc, radius, aspectn, aspectd, color);
  460.  
  461.              xc       =  column coordinate of the center
  462.              yc       =  row coordinate of the center
  463.              aspectn  =  numerator of the aspect ratio
  464.              aspectd  =  denominator of the aspect ratio
  465.              color    =  color of the circle
  466.  
  467.  
  468.      Example:  main()
  469.                {
  470.                   sm(4);   /* set a grphics mode */
  471.  
  472.                   /* draw a circle of radius 20 centered at 50, 60 in
  473.                   color 2                                             */
  474.  
  475.                   circle(50, 60, 20, 1, 1, 2);
  476.                 }
  477.  
  478.  
  479. E
  480.      Unicorn Library Documentation  3.1                         page 11
  481.  
  482.      ___________________________________________________________________
  483.                               cls
  484. F
  485.  
  486.     Clears the screen and returns the current video mode in the low
  487.     byte and the number of screen columns in the high byte of an integer.
  488.  
  489.  
  490.     Call:   cls();
  491.  
  492.  
  493.     Example:
  494.              main()
  495.              {
  496.                 cls();
  497.              }
  498.  
  499.  
  500.  
  501.  
  502.  
  503. E
  504.      Unicorn Library Documentation  3.1                         page 12
  505.  
  506.      __________________________________________________________________
  507.  
  508.                               CM_INCH
  509. F
  510.  
  511.      Converts inches to centimeters.  This is defined as a macro in UC.H.
  512.  
  513.  
  514.  
  515.      Call:  CM_INCH(inches);
  516.  
  517.  
  518.      Example:
  519.            main()
  520.            {
  521.               printf("There are %lf cm in %lf inches\n", CM_INCH(4.5), 4.5);
  522.            }
  523.  
  524.  
  525.  
  526.  
  527. E
  528.      Unicorn Library Documentation  3.1                         page 13
  529.  
  530.      __________________________________________________________________
  531.  
  532.                               countch
  533.  
  534. F     Returns the number of times a character appears in a given string.
  535.  
  536.  
  537.      Call:   countch(str, ch);
  538.  
  539.              str  =  string to search
  540. è             ch   =  character to search for
  541.  
  542.      Example:    main()
  543.                  {
  544.                     /* find the number of i's in the string "This is a
  545.                        test".  should return 2 */
  546.                     countch("This is a test", 'i');
  547.                   }
  548.  
  549.  
  550. Unicorn 1 Documentation  3.1                                      page 14
  551.  
  552. __________________________________________________________________________
  553.  
  554.  
  555.                                ctone
  556.  
  557.  
  558. This function sounds a tone using the IBM mode of sound.  Compatible with
  559. IBM-PC and close compatibles.
  560.  
  561. Call:         ctone(freq, duration);
  562.  
  563.               freq      =  the frequency in HZ for the tone
  564.               duration  =  the duration of the tone in milliseconds
  565.  
  566.  
  567. Example:      main()
  568.               {
  569.                  ctone(1000, 500);  /* sound a 500 msec tone of 1000 HZ */
  570.               }
  571.  
  572. E
  573.      Unicorn Library Documentation  3.1                         page 15
  574.  
  575.      __________________________________________________________________
  576. è
  577.                              DEG_RAD
  578. F
  579.      Converts angles in degrees to the equivalent radian value.  Both the
  580.      angle and the return are doubles.  Defined as a macro in UC.H.
  581.  
  582.  
  583.  
  584.  
  585.  
  586.      Call:   DEG_RAD(angle);
  587.  
  588.              angle  =  angle in degrees
  589.  
  590.  
  591.  
  592.  
  593.  
  594.      Example:     main()
  595.                   {
  596.                      a = DEG_RAD(56.78);
  597.                   }
  598.  
  599.  
  600.  
  601.  
  602. E
  603.      Unicorn Library Documentation  3.1                         page 16
  604.  
  605.      __________________________________________________________________
  606.  
  607.                                delay
  608. F
  609.      Delays in multiples of 1 millisecond.
  610.  
  611.  
  612.  
  613.  
  614.      Call:  delay(count);
  615.  
  616.             count  =  the number of milliseconds to delay
  617.  
  618.  
  619.  
  620.  
  621.      Example:   main()
  622.                 {
  623.                    delay(1000); /* pause for 1 second */
  624.                 }
  625.  
  626.  
  627.  
  628. E
  629.      Unicorn Library Documentation                               page 17
  630.  
  631.      ___________________________________________________________________
  632.  
  633.  
  634.                                drawrow
  635. F
  636.  
  637.     This function is used in windowing to draw a row of a single character
  638.     on the screen.
  639.  
  640.  
  641.     Call:   drawrow(row, column, count, ch);
  642.  
  643.     Where:
  644.           row    =  the row to draw in
  645.           col    = the starting column
  646.           count  = the numbe of characters to draw
  647.           ch     = the character to draw
  648.  
  649.  
  650.     Example:
  651.             main()
  652.             {
  653.                drawrow(10, 10, 50, "-");
  654.             }
  655.  
  656.      Draws a row of 50 dashes in row 10 starting in column 10.
  657.  
  658.  
  659.  
  660.  
  661.  
  662. E
  663.      Unicorn Library Documentation                               page 18
  664.  
  665.      ___________________________________________________________________
  666.  
  667.  
  668.                                dwarn2
  669. F
  670.  
  671.      This function issues a warning message in the version of DOS in
  672.      current use is not at least version 2.00
  673.  
  674.  
  675.      Call:  dwarn2();
  676.  
  677.  
  678.  
  679.      Example:
  680.               main()
  681.               {
  682.                  dwarn2();
  683.               }
  684.  
  685.       If DOS 2.00 or higher is not being used it will issue a message and
  686.       exit the program.
  687.  
  688.  
  689.  
  690. E
  691.      Unicorn Library Documentation                               page 19
  692.  
  693.      ___________________________________________________________________
  694.  
  695.  
  696.                                dwarn3
  697. F
  698.  
  699.      This function issues a warning message in the version of DOS in
  700.      current use is not at least version 3.00
  701.  
  702.  
  703.      Call:  dwarn3();
  704.  
  705.  
  706.  
  707.      Example:
  708.               main()
  709.               {
  710.                  dwarn3();
  711.               }
  712.  
  713.       If DOS 3.00 or higher is not being used it will issue a message and
  714.       exit the program.
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722. E
  723.      Unicorn Library Documentation                               page 20
  724.  
  725.      ___________________________________________________________________
  726.  
  727.  
  728.                                dx120bs
  729. F
  730.  
  731.      This function backspaces the daisy wheel printer 1/120 th of an inch.
  732.  
  733.  
  734.  
  735.  
  736. Call:         dx120bs();
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743. Example:      main()
  744.               {
  745.                  dx120bs();  /* backspace the printer 1/120 the inch */
  746.               }
  747.  
  748.  
  749.  
  750. Unicorn 1 Documentation  3.1                                      page 21
  751.  
  752. è__________________________________________________________________________
  753.  
  754.  
  755.                                dxback
  756.  
  757.  
  758. Select backwards prining.  Does not affect cr, tabs or paper movement
  759. commands.
  760.  
  761.  
  762.  
  763.  
  764.  
  765. Call:         dxback();
  766.  
  767.  
  768.  
  769.  
  770. Example:      main()
  771.               {
  772.                  dxback(); /* select backwards printing */
  773.               }
  774.  
  775.  
  776.  
  777. Unicorn 1 Documentation  3.1                                      page 22
  778.  
  779. __________________________________________________________________________
  780.  
  781.  
  782.                                dxbi
  783.  
  784.  
  785. This function sets the bidirectional print mode for the daisy wheel
  786. printer.
  787.  
  788.  
  789.  
  790.  
  791. Call:         dxbi();
  792.  
  793.  
  794.  
  795.  
  796.  
  797. Example:      main()
  798.               {
  799.                  dxbi();  /* set bi-directional mode */
  800.               }
  801.  
  802.  
  803.  
  804. Unicorn 1 Documentation  3.1                                      page 23
  805.  
  806. __________________________________________________________________________
  807. è
  808.  
  809.                                dxboldst
  810.  
  811.  
  812. This sets the daisy wheel printer to begin bold printing.
  813.  
  814.  
  815.  
  816. Call:         dxboldst();
  817.  
  818.  
  819.  
  820.  
  821. Example:      main()
  822.               {
  823.                  dxboldst();  /* start bold printing */
  824.               }
  825.  
  826.  
  827.  
  828. Unicorn 1 Documentation  3.1                                      page 24
  829.  
  830. __________________________________________________________________________
  831.  
  832.  
  833.                                dxbs
  834.  
  835.  
  836. This function backspaces the daisy wheel printer 1 full character width.
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843. Call:         dxbs();
  844.  
  845.  
  846.  
  847.  
  848. Example:      main()
  849.               {
  850.                  dxbs(); /* back space the daisy wheel 1 character width */
  851.               }
  852.  
  853.  
  854.  
  855. Unicorn 1 Documentation  3.1                                      page 25
  856.  
  857. __________________________________________________________________________
  858.  
  859.  
  860.                                dxbsend
  861.  
  862. èThis ends bold and shadow modes of printing on the daisy wheel printer.
  863.  
  864.  
  865.  
  866.  
  867. Call:         dxbsend();
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874. Example:      main()
  875.               {
  876.                  dxbsend(); /* end any bold or shadow printing */
  877.               }
  878.  
  879.  
  880. Unicorn 1 Documentation  3.1                                      page 26
  881.  
  882. __________________________________________________________________________
  883.  
  884.  
  885.                                dxchwide
  886.  
  887.  
  888. Set the character width in 1/120 ths inch.  Also know as the HMI (horizontal
  889. motion index).
  890.  
  891.  
  892.  
  893.  
  894. Call:         dxchwide(n);
  895.  
  896.               n = the number of 120ths of an inch
  897.  
  898.  
  899.  
  900.  
  901. Example:      main()
  902.               {
  903.                  dxchwide(10); /* set to 10/120 inch or 12 pitch */
  904.               }
  905.  
  906.  
  907.   Unicorn 1 Documentation  3.1                                   page 27
  908.  
  909. __________________________________________________________________________
  910.  
  911.  
  912.                                dxclr1tb
  913.  
  914.  
  915. This clears a single tab setting on the daisy wheel printer at the current
  916. column.
  917. è
  918.  
  919.  
  920.  
  921.  
  922. Call:         dxclr1tb();
  923.  
  924.  
  925.  
  926.  
  927.  
  928. Example:      main()
  929.               {
  930.                  dxclr1tb(); /* clears a tab at current column */
  931.               }
  932.  
  933.  
  934.  
  935. Unicorn 1 Documentation  3.1                                      page 28
  936.  
  937. __________________________________________________________________________
  938.  
  939.  
  940.                                dxclrtab
  941.  
  942.  
  943. Clears all horizontal tabs that were set by the dxsetht command.
  944.  
  945.  
  946.  
  947.  
  948.  
  949. Call:         dxclrtab();
  950.  
  951.  
  952.  
  953.  
  954.  
  955. Example:      main()
  956.               {
  957.                  dxclrtab(); /* clear ALL horizontal tabs */
  958.               }
  959.  
  960.  
  961.  
  962. Unicorn 1 Documentation  3.1                                      page 29
  963.  
  964. __________________________________________________________________________
  965.  
  966.  
  967.                                dxcr
  968.  
  969.  
  970. Sends a carriage return to the printer.  May or may not start a new line
  971. depending on switch settings.
  972. è
  973.  
  974.  
  975.  
  976. Call:         dxcr();
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983. Example:      main()
  984.               {
  985.                  dxcr();  /* send a carriage return */
  986.               }
  987.  
  988.  
  989.  
  990. Unicorn 1 Documentation  3.1                                      page 30
  991.  
  992. __________________________________________________________________________
  993.  
  994.  
  995.                                dxdefwid
  996.  
  997.  
  998. Select the default character width or HMI.
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004. Call:         dxdefwid();
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Example:      main()
  1011.               {
  1012.                  dxdefwid(); /* select the default width according to
  1013.                                 switch settings.                      */
  1014.               }
  1015.  
  1016.  
  1017. Unicorn 1 Documentation  3.1                                      page 31
  1018.  
  1019. __________________________________________________________________________
  1020.  
  1021.  
  1022.                                dxeject
  1023.  
  1024.  
  1025.  
  1026. Eject a single sheet of paper without loading a new sheet when using the
  1027. èsingle sheet feeder option.
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033. Call:         dxeject();
  1034.  
  1035.  
  1036.  
  1037.  
  1038. Example:      main()
  1039.               {
  1040.                  dxeject();  /* eject page without loding new paper */
  1041.               }
  1042.  
  1043.  
  1044. Unicorn 1 Documentation  3.1                                      page 32
  1045.  
  1046. __________________________________________________________________________
  1047.  
  1048.  
  1049.                                dxff
  1050.  
  1051.  
  1052. Send a form feed character to the daisy wheel printer.
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058. Call:         dxff();
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065. Example:      main()
  1066.               {
  1067.                  dxff();  /* send form feed to daisy wheel printer */
  1068.               }
  1069.  
  1070.  
  1071. Unicorn 1 Documentation  3.1                                      page 33
  1072.  
  1073. __________________________________________________________________________
  1074.  
  1075.  
  1076.                                dxfor
  1077.  
  1078.  
  1079. Selects forward printing.  Used to cancel the backwards printing selected
  1080. by dxback.
  1081.  
  1082. è
  1083.  
  1084.  
  1085.  
  1086. Call:         dxfor();
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094. Example:      main()
  1095.               {
  1096.                  dxback();  /* select backwards printing */
  1097.                  dxfor();   /* cancel backwards printing */
  1098.               }
  1099.  
  1100.  
  1101. Unicorn 1 Documentation  3.1                                      page 34
  1102.  
  1103. __________________________________________________________________________
  1104.  
  1105.  
  1106.                                dxhlf
  1107.  
  1108.  
  1109. Advances the page 1/2 of the current line spacing.  Used with dxrhlf to
  1110. produce sub/superscripts.
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116. Call:         dxhlf();
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123. Example:      main()
  1124.               {
  1125.                  dxhlf();  /* move half line feed for a subscript */
  1126.                  dxrhlf(); /* move back to previous line */
  1127.               }
  1128.  
  1129.  
  1130. Unicorn 1 Documentation  3.1                                      page 35
  1131.  
  1132. __________________________________________________________________________
  1133.  
  1134.  
  1135.                                dxht
  1136.  
  1137. è
  1138. Sends a horizontal tab (HT) character to the daisy wheel printer.  Tab
  1139. stops must be set with dxsetht.
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145. Call:         dxht();
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152. Example:      main()
  1153.               {
  1154.                  dxht(); /* move to next tab stop set by dxsetht */
  1155.               }
  1156.  
  1157.  
  1158. Unicorn 1 Documentation  3.1                                      page 36
  1159.  
  1160. __________________________________________________________________________
  1161.  
  1162.  
  1163.                                dxinit
  1164.  
  1165.  
  1166. Initializes daisy wheel printer to normal power on settings.
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172. Call:         dxinit();
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. Example:      main()
  1180.               {
  1181.                  dxinit(); /* cancel all previous settings and return to
  1182.                               default power on settings */
  1183.               }
  1184.  
  1185.  
  1186.  
  1187. Unicorn 1 Documentation  3.1                                      page 37
  1188.  
  1189. __________________________________________________________________________
  1190.  
  1191.  
  1192. è                               dxlf
  1193.  
  1194.  
  1195.  
  1196. Advances the paper one current line spacing.  Remains in current column.
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202. Call:         dxlf();
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210. Example:      main()
  1211.               {
  1212.                  dxlf(); /* advance paper one line */
  1213.               }
  1214.  
  1215.  
  1216.  
  1217. Unicorn 1 Documentation  3.1                                      page 38
  1218.  
  1219. __________________________________________________________________________
  1220.  
  1221.  
  1222.                                dxlinsp
  1223.  
  1224.  
  1225.  
  1226. Sets the line spacing for line feed characters to (n-1)/48 inch.  The value
  1227. of n can range from 1 to 126.  This is sometimes refered to as vertical
  1228. motion index (VMI).
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234. Call:         dxlinsp();
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240. Example:      main()
  1241.               {
  1242.                  dxlinsp(6); /* set line spacing to 6/48 inch or 8 lines/in */
  1243.               }
  1244.  
  1245.  
  1246. Unicorn 1 Documentation  3.1                                      page 39
  1247. è
  1248. __________________________________________________________________________
  1249.  
  1250.  
  1251.                                dxlmarg
  1252.  
  1253.  
  1254. Set the left margin at the current column.
  1255.  
  1256.  
  1257.  
  1258.  
  1259. Call:         dxlmarg();
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265. Example:      main()
  1266.               {
  1267.                  dxlmarg(); /* set the left margin to current location */
  1268.               }
  1269.  
  1270.  
  1271. Unicorn 1 Documentation  3.1                                      page 40
  1272.  
  1273. __________________________________________________________________________
  1274.  
  1275.  
  1276.                                dxpglen
  1277.  
  1278.  
  1279. Sets the page length to n lines.   This is stored as an absolute length
  1280. and does not change if you change line spacing.  This also sets the top
  1281. of form to current paper location.
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287. Call:         dxpglen(n);
  1288.  
  1289.               n = number of lines on one page
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296. Example:      main()
  1297.               {
  1298.                  dxpglen(66); /* set page to 66 lines, normal 11" paper */
  1299.               }
  1300.  
  1301.  
  1302. è
  1303. Unicorn 1 Documentation  3.1                                      page 41
  1304.  
  1305. __________________________________________________________________________
  1306.  
  1307.  
  1308.                                dxrhlf
  1309.  
  1310.  
  1311. Roll the paper down one half current line spacing.  See dxhlf for further
  1312. uses and details.
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318. Call:         dxrhlf();
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326. Example:      main()
  1327.               {
  1328.                  dxhlf();  /* move half line feed for a subscript */
  1329.                  dxrhlf(); /* move back to previous line */
  1330.               }
  1331.  
  1332.  
  1333. Unicorn 1 Documentation  3.1                                      page 42
  1334.  
  1335. __________________________________________________________________________
  1336.  
  1337.  
  1338.                                dxrlf
  1339.  
  1340.  
  1341.  
  1342. Moves paper down one line which in effect moves the print position up one
  1343. line.
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350. Call:         dxrlf();
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357. è
  1358. Example:      main()
  1359.               {
  1360.                  dxrlf(); /* move print position up one line spacing */
  1361.               }
  1362.  
  1363.  
  1364. Unicorn 1 Documentation  3.1                                      page 43
  1365.  
  1366. __________________________________________________________________________
  1367.  
  1368.  
  1369.                                dxsetht
  1370.  
  1371.  
  1372.  
  1373.  
  1374. Sets a horizontal tab at current position.  Up to 160 HT's may be set.
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381. Call:         dxsetht();
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388. Example:      main()
  1389.               {
  1390.                  dxsetht();  /* set a tab at current column */
  1391.               }
  1392.  
  1393.  
  1394.  
  1395.  
  1396. Unicorn 1 Documentation  3.1                                      page 44
  1397.  
  1398. __________________________________________________________________________
  1399.  
  1400.  
  1401.                                dxshast
  1402.  
  1403.  
  1404.  
  1405. Select shadow print.  This is canceled by dxbsend or a carriage return.
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411. Call:         dxshast();
  1412. è
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418. Example:      main()
  1419.               {
  1420.                  dxshast();   /* turn on shadow printing */
  1421.               }
  1422.  
  1423.  
  1424.  
  1425.  
  1426. Unicorn 1 Documentation  3.1                                      page 45
  1427.  
  1428. __________________________________________________________________________
  1429.  
  1430.  
  1431.                                dxundend
  1432.  
  1433.  
  1434.  
  1435. Cancels underlining set by dxundlst.
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441. Call:         dxundend();
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449. Example:      main()
  1450.               {
  1451.                  dxundlst();  /* start underline */
  1452.                  lputch('a'); /* send an a to the printer and underline it */
  1453.                  dxundend();  /* stop the underlining */
  1454.               }
  1455.  
  1456.  
  1457.  
  1458. Unicorn 1 Documentation  3.1                                      page 46
  1459.  
  1460. __________________________________________________________________________
  1461.  
  1462.  
  1463.                                dxunldst
  1464.  
  1465.  
  1466.  
  1467. èStarts underlining.  All characters including spaces are underlined except
  1468. spaces before the first printable character or after the last printable
  1469. character.
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475. Call:         dxundlst();
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482. Example:      main()
  1483.               {
  1484.                  dxundlst();  /* start underline */
  1485.                  lputch('a'); /* send an a to the printer and underline it */
  1486.                  dxundend();  /* stop the underlining */
  1487.               }
  1488.  
  1489.  
  1490.  
  1491. Unicorn 1 Documentation  3.1                                      page 47
  1492.  
  1493. __________________________________________________________________________
  1494.  
  1495.  
  1496.                                dxuni
  1497.  
  1498.  
  1499. Selects uni-directional printing.  Used to print in one direction only
  1500. which improves alignment when printing vertical columns.
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506. Call:         dxuni();
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513. Example:      main()
  1514.               {
  1515.                  dxuni();  /* select unidirectional printing */
  1516.               }
  1517.  
  1518.  
  1519.  
  1520.