home *** CD-ROM | disk | FTP | other *** search
-
- NORTHWESTERN UNIVERSITY TURBO USERS GROUP
-
- NUTILITY V1.1 - A set of library routines for use with
- Turbo Pascal PC-DOS Version 4.0
-
- This set of routines is based on the original NUTILITY routines
- written by J. E. Hilliard. These were converted to make the files
- compatible with Turbo Pascal Version 4.0. Surprisingly, most of
- the routines are not made obsolete with version 4.0 of Turbo
- Pascal; the pedagogical nature of the routines and the extensive
- discussion would make them worthwhile regardless. The conversion
- to 4.0 compatibility was actually quite minimal; indeed, I
- probably did not do the routines justice in my efforts to make
- the 4.0 compatible. Misc, Video, and RealFast were transformed
- into units so that they could be easily used. The other routines
- were largely just compiled with most of the minor changes that
- Borland recommended. The remainder of the documentation is just
- as Professor Hilliard had written it. The NUTUG Bulletin Board
- number is (312)491-3215.
-
- Scott E. Lindsey
- November 22, 1987
-
-
-
- NUTILITY V1.0 - A set of library routines for use with
- Turbo Pascal PC-DOS Version 3.0
-
- Copyright (C) J. E. Hilliard 1986
- Distribution limited to members of NUTUG
-
- INTRODUCTION
-
- When Scott Lindsey and I were discussing the possible formation
- of a Turbo Pascal user's group at Northwestern, one of the
- services we thought that such a group should provide for its
- members was a set of utilities. Since I had written a fair number
- of miscellaneous routines for use in a grading program, I volun-
- teered to be the first editor. It occurred to me that such a
- package should also serve an instructional purpose if it was to
- be of any more value than the many such packages already avail-
- able on BBS' or from commercial sources.
-
- Consequently, this set of utilities includes a fair number of
- what might be termed 'tutorial' comments in addition to the usual
- documentation. The tutorial comments are distinguished from the
- others by enclosing them between {/ /} instead of { }. This
- makes them easy to search for and facilitates their deletion
- after they have served their purpose. (A file 'REFORM' is
- included for doing the latter automatically.)
-
-
- 1
- In the tutorial comments frequent references are made to:
- 'Programmer's Guide to the IBM PC', Peter Norton, MicroSoft
- Press, Washington, DC.
-
- This book is usually in stock at Crown Books on Sherman Avenue in
- Evanston and I strongly recommend its purchase if you intend to
- use Turbo's DOS function calls.
-
- All the routines were carefully tested when they were first
- written, and most of them have been used extensively. But it is
- quite possible that some bugs may have crept in during editing
- for this compilation. Please let me know of any problems so that
- they can be corrected. (After all, that's what Version 1.1's are
- for.) One other note: In order to avoid side effects, the rou-
- tines use only local variables. However, it is impossible to
- avoid declaring some global TYPES. Each file includes the defin-
- itions required for the routines in that particular file, and it
- may be necessary to transfer the definitions to your program when
- some of the routines are used.
-
- Hopefully, this will be an ongoing project for other members of
- the group. The present set of utilities only scratch the surface.
- For example, there are no routines for directory display or for
- direct writing to screen memory.
-
- FILE ORGANIZATION
-
-
- NUTILITY includes some 65 Procedures and Functions. They are
- divided between the first seven files as follows:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2
- VIDEO .PAS Modification of video modes; identification of
- monitor type; monitor switching; transfers
- between video buffers and RAM (including heap);
- text page switching on C/G board; windows;
- frames; cursor control. Instructions for changing
- video attributes of Turbo's editor.
- MISC .PAS Text formatting; number lock switching; detection
- of function and other special keys; saving of
- Turbo COM file by user after modification.
-
- DATETIME.PAS Getting and setting DOS system time and date; DOS
- and clock board timers.
-
- BASECON .PAS Dec to Hex and Bin. BCD to Dec.
-
- DATIM .PAS Self-contained program that displays a greeting
- and the date and time in full. Useful addition to
- AUTOEXEC.BAT if you have a clock/calender board.
-
- REALFAST.PAS Lives up to its name. Ten microsecond floating
- point multiply and divide with full precision!
- Put a Cray on your desk!
-
- REFORM .PAS For reformatting of preceding files. Includes
- procedure for deleting tutorial comments and
- blank lines.
-
- NUTDOC .ASC ASCII Version of this document which can be used
- to obtain a print out.
-
- NUTDOC .WP WordPerfect 4.2 version of this document.
-
- NUTDOC .COM Displays this document using some of the routines
- in VIDEO.PAS for snappy screens.
- (This file is not present in version 1.1. Use the
- ReadMe.com program supplied with Turbo Pascal V.
- 4.0)
-
- LIST OF PROCEDURES AND FUNCTIONS
-
-
- 1 ASTDateTime (VAR H, M, S, mS, Y, Mo, D : Integer) [DATETIME.PAS]
- 2 ASTTimer : real; [DATETIME.PAS]
- 3 BackSpace (Numb : byte); [MISC .PAS]
- 4 BlinkVid; [VIDEO .PAS]
- 5 Chirp; {A pleasantly soft audio signal. } [MISC .PAS]
- 6 ClearPage (P : integer); [VIDEO .PAS]
- 7 Compiled87 : Boolean; [REALFAST.PAS]
- 8 CopyPage (P1, P2 : integer); [VIDEO .PAS]
- 9 CopyBufferToPage (VAR Buffer; P : integer); [VIDEO .PAS]
- 10 CtrLn (Line : MaxLine) : MaxLine; [MISC .PAS]
-
- 3
- 11 Cursor (ONorOFF : Boolean); [VIDEO .PAS]
- 12 DATIM; {Program} [DATIM .PAS]
- 13 DOSTimer : real; [DATETIME.PAS]
- 14 DateTimeDemo; [DATETIME.PAS]
- 15 DeleteBlankLines (FN : integer); [REFORM .PAS]
- 16 DeleteTutorialLines (FN : Integer); [REFORM .PAS]
- 17 DisplayMode : byte; [VIDEO .PAS]
- 18 DisplayP : ScrPtrType; [VIDEO .PAS]
- 19 DisplayPage (P : integer); [VIDEO .PAS]
- 20 DisplayVideoModes; [VIDEO .PAS]
- 21 FTrimLine (StrT : MaxLine) : MaxLine; [MISC .PAS]
- 22 FileToScreen (FileName : MaxLine) : Boolean; [VIDEO .PAS]
- 23 Frame (TX, TY, BX, BY : integer; Form : byte); [VIDEO .PAS]
- 24 GetDosDate (VAR M, DofM, Y, DofW : integer); [DATETIME.PAS]
- 25 GetDosTime (VAR Hour, Min, Sec, CSec : integer); [DATETIME.PAS]
- 26 HeapOK (BytesReqd : real) : Boolean; [VIDEO .PAS]
- 27 Honk; {An unpleasant audio signal. } [MISC .PAS]
- 28 InBCD (Input : integer) : integer; [BASECON .PAS]
- 29 JTimer : real; [DATETIME.PAS]
- 30 KeyCheck : char; [MISC .PAS]
- 31 LJust (Line : MaxLine; F : byte): MaxLine; [MISC .PAS]
- 32 LPushPopScr (ONorOFF : Boolean) : Boolean; [VIDEO .PAS]
- 33 LVid; [VIDEO .PAS]
- 34 ListDeclarations (FN : integer); [REFORM .PAS]
- 35 Message; [VIDEO .PAS]
- 36 ModeCG : Boolean; [VIDEO .PAS]
- 37 ModeMono : Boolean; [VIDEO .PAS]
- 38 MulDiv (VAR Input : RealRec; N : integer); [REALFAST.PAS]
- 39 MulDiv87 (VAR Input : RealRec87; N : integer); [REALFAST.PAS]
- 40 NVid; [VIDEO .PAS]
- 41 NoVid; [VIDEO .PAS]
- 42 NumSuf (N : integer): String2; [DATIM .PAS]
- 43 NumberLock (ONorOFF : Boolean); [MISC .PAS]
- 44 OutBin (Dec : integer) : String20; [BASECON .PAS]
- 45 OutHex (Dec : integer) : String10; [BASECON .PAS]
- 46 PageDemonstration; [VIDEO .PAS]
- 47 Pop; [VIDEO .PAS]
- 48 PrintScreen; [VIDEO .PAS]
- 49 Push; [VIDEO .PAS]
- 50 Query : Boolean; [MISC .PAS]
- 51 RVid; [VIDEO .PAS]
- 52 RealFastDemo; [REALFAST.PAS]
- 53 Reformat; [REFORM .PAS]
- 54 SaveCOMFile (PathFileName : MaxLine) : Boolean; [MISC .PAS]
- 55 ScreenToFile (FileName : MaxLine) : Boolean; [VIDEO .PAS]
- 56 SetDosDate (Month, Day, Year : integer) : Boolean [DATETIME.PAS]
- 57 SetDosTime (Hour24, Min, Sec : integer) : Boolean [DATETIME.PAS]
- 58 SwapPage (P1, P2 : integer); [VIDEO .PAS]
- 59 TPushPopScr (ONorOFF : Boolean) : Boolean; [VIDEO .PAS]
- 60 Tab (Ind : byte); [MISC .PAS]
- 61 TrimLine (Var StrT : MaxLine); [MISC .PAS]
- 62 UVid; [VIDEO .PAS]
- 4
- 63 UpCaseStr (InString : MaxLine): MaxLine; [MISC .PAS]
- 64 WindowDemo; [VIDEO .PAS]
-
- John E. Hilliard
- Department of Materials Science and Engineering
- June 1986
-
-
-
- Note:
- Professor Hilliard went to be with his Maker on April 17, 1987.
- The Department of Materials Science and Engineering at
- Northwestern University has set up the John E. Hilliard Memorial
- Fund in his memory. Although the initial distribution was only to
- paid NUTUG members, we have decided to put it in the Public
- Domain. If you find these routines enlightening, we ask that you
- honor Professor Hilliard by sending $5.00 or more to the John E.
- Hilliard Memorial Fund. Please make out your checks to
- Northwestern University. (These donations ARE tax deductible).
- The address is:
-
- John E. Hilliard Memorial Fund
- Department of Materials Science
- Northwestern University
- Evanston, Il. 60208
-
-
-
-
- Scott E. Lindsey
- May 1987
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-