home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / NUTUG11.ZIP / NUTDOC.ASC < prev    next >
Encoding:
Text File  |  1987-11-22  |  12.6 KB  |  267 lines

  1.  
  2.                     NORTHWESTERN UNIVERSITY TURBO USERS GROUP
  3.  
  4.              NUTILITY V1.1 - A set of library routines for use with
  5.                          Turbo Pascal PC-DOS Version 4.0
  6.  
  7.         This set  of routines  is based on the original NUTILITY routines
  8.         written by J. E. Hilliard. These were converted to make the files
  9.         compatible with  Turbo Pascal  Version 4.0. Surprisingly, most of
  10.         the routines are not made  obsolete  with  version  4.0  of Turbo
  11.         Pascal; the  pedagogical nature of the routines and the extensive
  12.         discussion would make them worthwhile regardless.  The conversion
  13.         to  4.0  compatibility  was  actually  quite  minimal;  indeed, I
  14.         probably did not do the routines  justice in  my efforts  to make
  15.         the 4.0  compatible. Misc,  Video, and  RealFast were transformed
  16.         into units so that they could be easily used. The  other routines
  17.         were largely  just compiled  with most  of the minor changes that
  18.         Borland recommended. The remainder  of the  documentation is just
  19.         as Professor  Hilliard had  written it.  The NUTUG Bulletin Board
  20.         number is (312)491-3215.
  21.  
  22.                                                          Scott E. Lindsey
  23.                                                         November 22, 1987
  24.  
  25.  
  26.  
  27.              NUTILITY V1.0 - A set of library routines for use with 
  28.                          Turbo Pascal PC-DOS Version 3.0
  29.  
  30.                         Copyright (C) J. E. Hilliard 1986
  31.                     Distribution limited to members of NUTUG
  32.  
  33.                                   INTRODUCTION
  34.  
  35.         When Scott Lindsey and I were  discussing the  possible formation
  36.         of  a  Turbo  Pascal  user's  group  at  Northwestern, one of the
  37.         services we thought that such  a  group  should  provide  for its
  38.         members was a set of utilities. Since I had written a fair number
  39.         of miscellaneous routines for use in a grading  program, I volun-
  40.         teered to  be the  first editor.  It occurred  to me  that such a
  41.         package should also serve an instructional  purpose if  it was to
  42.         be of  any more  value than the many such packages already avail-
  43.         able on BBS' or from commercial sources.
  44.  
  45.         Consequently, this set of utilities  includes  a  fair  number of
  46.         what might be termed 'tutorial' comments in addition to the usual
  47.         documentation. The tutorial comments  are distinguished  from the
  48.         others by  enclosing them  between {/   /}  instead of {  }. This
  49.         makes them easy to  search  for  and  facilitates  their deletion
  50.         after  they  have  served  their  purpose.  (A  file  'REFORM' is
  51.         included for doing the latter automatically.)
  52.  
  53.  
  54.                                           1
  55.         In the tutorial comments frequent references are made to:
  56.         'Programmer's Guide  to  the  IBM  PC',  Peter  Norton, MicroSoft
  57.         Press, Washington, DC.
  58.  
  59.         This book is usually in stock at Crown Books on Sherman Avenue in
  60.         Evanston and I strongly recommend its  purchase if  you intend to
  61.         use Turbo's DOS function calls.
  62.  
  63.         All  the  routines  were  carefully  tested  when they were first
  64.         written, and most of them have been used  extensively. But  it is
  65.         quite possible  that some  bugs may  have crept in during editing
  66.         for this compilation. Please let me know of any problems  so that
  67.         they can  be corrected. (After all, that's what Version 1.1's are
  68.         for.) One other note: In order  to avoid  side effects,  the rou-
  69.         tines  use  only  local  variables.  However, it is impossible to
  70.         avoid declaring some global TYPES. Each file includes  the defin-
  71.         itions required  for the routines in that particular file, and it
  72.         may be necessary to transfer the definitions to your program when
  73.         some of the routines are used. 
  74.  
  75.           Hopefully, this will be an ongoing project for other members of
  76.         the group. The present set of utilities only scratch the surface.
  77.         For example,  there are  no routines for directory display or for
  78.         direct writing to screen memory.
  79.  
  80.                                 FILE ORGANIZATION
  81.  
  82.  
  83.         NUTILITY includes some  65  Procedures  and  Functions.  They are
  84.         divided between the first seven files as follows:
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.                                           2
  108.         VIDEO   .PAS    Modification  of  video  modes; identification of
  109.                         monitor   type;   monitor   switching;  transfers
  110.                         between video  buffers and  RAM (including heap);
  111.                         text  page  switching  on   C/G  board;  windows;
  112.                         frames; cursor control. Instructions for changing
  113.                         video attributes of Turbo's editor.
  114.         MISC    .PAS    Text formatting; number lock switching; detection
  115.                         of  function  and  other  special keys; saving of
  116.                         Turbo COM file by user after modification.
  117.  
  118.         DATETIME.PAS    Getting and setting DOS system time and date; DOS
  119.                         and clock board timers.
  120.  
  121.         BASECON .PAS    Dec to Hex and Bin. BCD to Dec.
  122.  
  123.         DATIM   .PAS    Self-contained  program  that displays a greeting
  124.                         and the date and time in full. Useful addition to
  125.                         AUTOEXEC.BAT if you have a clock/calender board.
  126.  
  127.         REALFAST.PAS    Lives  up  to  its name. Ten microsecond floating
  128.                         point multiply and  divide  with  full precision!
  129.                         Put a Cray on your desk!
  130.  
  131.         REFORM  .PAS    For  reformatting  of  preceding  files. Includes
  132.                         procedure  for  deleting  tutorial  comments  and
  133.                         blank lines.
  134.  
  135.         NUTDOC  .ASC    ASCII Version  of this document which can be used
  136.                         to obtain a print out.
  137.  
  138.         NUTDOC  .WP     WordPerfect 4.2 version of this document.
  139.  
  140.         NUTDOC  .COM    Displays this document using some of the routines
  141.                         in VIDEO.PAS for snappy screens.
  142.                         (This file is not present in version 1.1. Use the
  143.                         ReadMe.com program supplied with  Turbo Pascal V.
  144.                         4.0)
  145.  
  146.                         LIST OF PROCEDURES AND FUNCTIONS
  147.  
  148.  
  149.       1 ASTDateTime (VAR H, M, S, mS, Y, Mo, D : Integer) [DATETIME.PAS]
  150.       2 ASTTimer : real;                                  [DATETIME.PAS]
  151.       3 BackSpace (Numb : byte);                          [MISC    .PAS]
  152.       4 BlinkVid;                                         [VIDEO   .PAS]
  153.       5 Chirp; {A pleasantly soft audio signal. }         [MISC    .PAS]
  154.       6 ClearPage (P : integer);                          [VIDEO   .PAS]
  155.       7 Compiled87 : Boolean;                             [REALFAST.PAS]
  156.       8 CopyPage (P1, P2 : integer);                      [VIDEO   .PAS]
  157.       9 CopyBufferToPage (VAR Buffer; P : integer);       [VIDEO   .PAS]
  158.      10 CtrLn (Line : MaxLine) : MaxLine;                 [MISC    .PAS]
  159.  
  160.                                           3
  161.      11 Cursor (ONorOFF : Boolean);                       [VIDEO   .PAS]
  162.      12 DATIM; {Program}                                  [DATIM   .PAS]
  163.      13 DOSTimer : real;                                  [DATETIME.PAS]
  164.      14 DateTimeDemo;                                     [DATETIME.PAS]
  165.      15 DeleteBlankLines (FN : integer);                  [REFORM  .PAS]
  166.      16 DeleteTutorialLines (FN : Integer);               [REFORM  .PAS]
  167.      17 DisplayMode : byte;                               [VIDEO   .PAS]
  168.      18 DisplayP : ScrPtrType;                            [VIDEO   .PAS]
  169.      19 DisplayPage (P : integer);                        [VIDEO   .PAS]
  170.      20 DisplayVideoModes;                                [VIDEO   .PAS]
  171.      21 FTrimLine (StrT : MaxLine) : MaxLine;             [MISC    .PAS]
  172.      22 FileToScreen (FileName : MaxLine) : Boolean;      [VIDEO   .PAS]
  173.      23 Frame (TX, TY, BX, BY : integer; Form : byte);    [VIDEO   .PAS]
  174.      24 GetDosDate (VAR M, DofM, Y, DofW : integer);      [DATETIME.PAS]
  175.      25 GetDosTime (VAR Hour, Min, Sec, CSec : integer);  [DATETIME.PAS]
  176.      26 HeapOK (BytesReqd : real) : Boolean;              [VIDEO   .PAS]
  177.      27 Honk; {An unpleasant audio signal. }              [MISC    .PAS]
  178.      28 InBCD (Input : integer) : integer;                [BASECON .PAS]
  179.      29 JTimer : real;                                    [DATETIME.PAS]
  180.      30 KeyCheck : char;                                  [MISC    .PAS]
  181.      31 LJust (Line : MaxLine; F : byte): MaxLine;        [MISC    .PAS]
  182.      32 LPushPopScr (ONorOFF : Boolean) : Boolean;        [VIDEO   .PAS]
  183.      33 LVid;                                             [VIDEO   .PAS]
  184.      34 ListDeclarations (FN : integer);                  [REFORM  .PAS]
  185.      35 Message;                                          [VIDEO   .PAS]
  186.      36 ModeCG : Boolean;                                 [VIDEO   .PAS]
  187.      37 ModeMono : Boolean;                               [VIDEO   .PAS]
  188.      38 MulDiv (VAR Input : RealRec; N : integer);        [REALFAST.PAS]
  189.      39 MulDiv87 (VAR Input : RealRec87; N : integer);    [REALFAST.PAS]
  190.      40 NVid;                                             [VIDEO   .PAS]
  191.      41 NoVid;                                            [VIDEO   .PAS]
  192.      42 NumSuf (N : integer): String2;                    [DATIM   .PAS]
  193.      43 NumberLock (ONorOFF : Boolean);                   [MISC    .PAS]
  194.      44 OutBin (Dec : integer) : String20;                [BASECON .PAS]
  195.      45 OutHex (Dec : integer) : String10;                [BASECON .PAS]
  196.      46 PageDemonstration;                                [VIDEO   .PAS]
  197.      47 Pop;                                              [VIDEO   .PAS]
  198.      48 PrintScreen;                                      [VIDEO   .PAS]
  199.      49 Push;                                             [VIDEO   .PAS]
  200.      50 Query : Boolean;                                  [MISC    .PAS]
  201.      51 RVid;                                             [VIDEO   .PAS]
  202.      52 RealFastDemo;                                     [REALFAST.PAS]
  203.      53 Reformat;                                         [REFORM  .PAS]
  204.      54 SaveCOMFile (PathFileName : MaxLine) : Boolean;   [MISC    .PAS]
  205.      55 ScreenToFile (FileName : MaxLine) : Boolean;      [VIDEO   .PAS]
  206.      56 SetDosDate (Month, Day, Year : integer) : Boolean [DATETIME.PAS]
  207.      57 SetDosTime (Hour24, Min, Sec : integer) : Boolean [DATETIME.PAS]
  208.      58 SwapPage (P1, P2 : integer);                      [VIDEO   .PAS]
  209.      59 TPushPopScr (ONorOFF : Boolean) : Boolean;        [VIDEO   .PAS]
  210.      60 Tab (Ind : byte);                                 [MISC    .PAS]
  211.      61 TrimLine (Var StrT : MaxLine);                    [MISC    .PAS]
  212.      62 UVid;                                             [VIDEO   .PAS]
  213.                                           4
  214.      63 UpCaseStr (InString : MaxLine): MaxLine;          [MISC    .PAS]
  215.      64 WindowDemo;                                       [VIDEO   .PAS]
  216.  
  217.                                                          John E. Hilliard
  218.                           Department of Materials Science and Engineering
  219.                                                                 June 1986
  220.  
  221.                                                                          
  222.  
  223.         Note:
  224.           Professor Hilliard went to be with his Maker on April 17, 1987.
  225.         The  Department  of   Materials   Science   and   Engineering  at
  226.         Northwestern University  has set up the John E. Hilliard Memorial
  227.         Fund in his memory. Although the initial distribution was only to
  228.         paid  NUTUG  members,  we  have  decided  to put it in the Public
  229.         Domain. If you find these routines enlightening, we  ask that you
  230.         honor Professor  Hilliard by sending $5.00 or more to the John E.
  231.         Hilliard  Memorial   Fund.  Please   make  out   your  checks  to
  232.         Northwestern  University.  (These  donations ARE tax deductible).
  233.         The address is:
  234.  
  235.                          John E. Hilliard Memorial Fund
  236.                          Department of Materials Science
  237.                              Northwestern University
  238.                                Evanston, Il. 60208
  239.  
  240.  
  241.  
  242.  
  243.                                                          Scott E. Lindsey
  244.                                                                  May 1987
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.                                           5
  267.