From uwasa.fi!ts Thu Aug 27 10:08:14 1992
Received: from uwasa.fi ([128.214.12.3]) by nic.funet.fi with SMTP id <37140>; Thu, 27 Aug 1992 10:08:08 +0300
Received: by uwasa.fi (4.1/101091(hh))
	id AA06601; Thu, 27 Aug 92 10:07:12 +0300
From:	ts@uwasa.fi (Timo Salmi)
Message-Id: <9208270707.AA06601@uwasa.fi>
Subject: TSPA29*.ZIP Turbo Pascal units updates at garbo (fwd)
To:	garbo-infolist@uwasa.fi (Garbo Infolist)
Date:	Thu, 27 Aug 1992 11:07:11 +0300
Cc:	ricki@rwthi3.informatik.rwth-aachen.d (Richard Breuer),
	bobb@vice.ICO.TEC.COM (Bob Beauchaine)
X-Mailer: ELM [version 2.3 PL11]
Status: OR

Forwarded message:
>From ts Thu Aug 27 10:03:46 EET 1992
Article: 5247 of comp.binaries.ibm.pc.archives
Xref: uwasa.fi comp.binaries.ibm.pc.archives:5247 comp.lang.pascal:11103
Newsgroups: comp.binaries.ibm.pc.archives,comp.lang.pascal
Path: uwasa.fi!ts
From: ts@uwasa.fi (Timo Salmi)
Subject: TSPA29*.ZIP Turbo Pascal units updates at garbo
Message-ID: <1992Aug27.070333.6413@uwasa.fi>
Followup-To: comp.lang.pascal
Organization: University of Vaasa, Finland
Date: Thu, 27 Aug 1992 07:03:33 GMT
Lines: 248

Wed 26-Aug-92: Updated my Turbo Pascal units collection. It is now
 garbo.uwasa.fi:/pc/ts/tspa29*.zip
where * = 40,50,55,60.

 94246 Aug 26 23:18 garbo.uwasa.fi:/pc/ts/tspa2940.zip
 96009 Aug 26 23:20 garbo.uwasa.fi:/pc/ts/tspa2950.zip
 98101 Aug 26 23:20 garbo.uwasa.fi:/pc/ts/tspa2955.zip
 98264 Aug 26 23:21 garbo.uwasa.fi:/pc/ts/tspa2960.zip

   Bug fixed (hopefully) the ISDIRFN "Is a name a directory or not"
function in TSUNTJ unit. My thanks are due to Richard (Ricki) Breuer
ricki@rwthi3.informatik.rwth-aachen.de for alerting me to the
problem.
   In the process we noticed a rather undesirable feature of DRDOS.
All my units are written for MsDos (command.com). The alternative
command interpreters like DRDOS and 4DOS can cause incompatibilities
since some of Turbo Pascal's routines (like IOResult) utilize the
values the system returns. There is nothing I can do about
incompatibilities like this, and it is a coincidence that we even
noticed, since I do not run 4DOS or DRDOS. Anyway, ISDIRFN eill not
work as expected if you are using DRDOS. I do not know about 4DOS.
   SETENV "Set a parent environment variable (variable=value)" in
the TSUNTENV unit now accepts cases like TARGET=A B C (formerly the
it was cut at the spaces).  Also this suggestion is to to Ricki. Be
careful.  Trailing white spaces and other invisible characters you
might put in there are included. Thus "TARGET=A" and "TARGET=A " are
not the same thing.
   Started a new 4.0+ specific unit TSUNTK. It contains the
following routines.
  BOOTDRFN Get boot device name (MsDos 4.0+)
  GETSERFN Get disk's serial number (MsDos 4.0+)
  GETVOLFN Special get disk volume label (MsDos 4.0+)
  SETSER   Set floppy's serial number (MsDos 4.0+)
The first, that is BOOTDRFN was transferred from the TSUNTH unit.
The others are brand new. I got the idea to get and set the disk
serial number from PC-Magazine (July 1992, Vol. 11, No. 13, p. 496)
which published TP 6.0 specific code for these tasks. Since my own
TP units are more general, that is for all the current MsDos TP
versions starting from TP 4.0, I decided to write routines of my own
for these tasks. But the users interested in a source code may wish
to look at the article.  (I did not bother to test whether the
PC-Magazine code works, but I don't see why not). I got interested
because I now use MsDos 5.0 in addition to 3.30 and 3.21 (and the
aggravating 4.01).
   Added HEXLNGFN "Convert hexadecimal string to decimal longint up
to 7FFFFFFF" to the conversion unit TSUNTB because TSUNTK internally
needs this conversion in accessing the disk serial number.
   Added to TSUNTE the following elementary routines, just because I
occasionally happen to need them myself.
  LABELFN  Get a disk's volume label (not for TP 4.0)
  DEFDRVFN Get the default drive
   Finally added HIBACK to TSUNTC to enable high intensity
background colors instead of enabling blinking text. The appropriate
interrupt was pointed out by Bob Beauchaine bobb@vice.ICO.TEC.COM on
the UseNet news in comp.lang.pascal. The routine requires an EGA,
MCGA, or a VGA.

TSUNTA: (uses Dos, Crt, TSUNTE)
  ATTRIBFN Color attribute for direct write to video memory
  HIGHTFN  Current height of text screen
  PANML    Scroll screen left
  PANMR    Scroll screen right
  VDAEXYFN Direct read of a screen video memory color attribute
  VDCHXY   Direct read from the screen video memory
  VIDXY    Direct write to the screen video memory
  WIDTHFN  Current width of the text screen

TSUNTB: (uses Dos)
  BINDECFN Convert binary string to decimal word
  BINFN    Convert decimal word to binary string
  BITONFN  Boolean status of a bit in a word
  BTEWRDFN Combine two bytes into a single word, inverse of Hi & Lo
  CONVBFN  Convert a number (string) of any base to any other base
  HEXDECFN Convert hexadecimal string to decimal word
  HEXFN    Convert decimal word to hexadecimal string
  HEXLNGFN Convert hexadecimal string to decimal longint up to 7FFFFFFF
  HIWORDFN The high-order (hi) word of the longint argument
  LBINFN   Convert decimal longint to binary string
  LHEXFN   Convert decimal longint to hexadecimal string
  LOWORDFN The low-order (lo) word of the longint argument
  POWERFN  Conventional raising of a positive real to a power
  POWERGFN Generalized raising of any real to a real power
  POWERLFN Raise longint to a non-negative integer power fast
  R16TOFN  Sixteen to a power fast (word)
  TICKSFN  Count of 18.2 times per second ticks (longint)
  TIMERFN  Seconds elapsed since midnight (real)
  TWOTOFN  Two to a power fast (word)
  WRDLNGFN Combine two words into a longint

TSUNTC: (uses Dos, Crt)
  HIBACK   Enable hi-intensity (bright) background colors
  PLAYNOTE Play a note
  REVCOLOR Reverse text colors (a toggle)

TSUNTD: (uses Dos)
  AUDIO    Enhanced Sound procedure, no Crt unit needed
  DOSDELAY Delay without needing the Crt unit
  GETPRTFN Get the number of printer default timeout retry times
  LEADFN   Lead a string with a multiple character (i.e. pad left)
  LOWCASFN The opposite of UpCase (inline coded)
  LPTONLFN Get the online status of the first parallel printer
  PARSE    Extract all substrings from a string faster (1st method)
  PARSENFN Number of substrings in a string (resembles ParamCount)
  PARSERFN Get substrings from a string (resembles ParamStr)
  PRTONLFN Get the online status of a printer (may fail)
  PRTSCR   Print the current screen
  SETPRT   Set the number of default printer timeout retry times
  SPARTFN  Returns a specified substring (resembles ParamStr)
  STRCNTFN Number of substrings in a string (resembles ParamCount)
  TRAILFN  Trail a string with a multiple character (i.e. pad right)
  TRIMLFFN Trim a string left
  TRIMRGFN Trim a string right

TSUNTE: (uses Dos)
  ALLSIZFN Allocated true size of a file in bytes
  BORDER   Change border color (CGA, VGA)
  CAPS     Turn CapsLock on, or off
  CAPSONFN Get CapsLock status
  CLB      Clear the keyboard buffer
  CLUSIZFN Cluster size on a device (cluster is the allocation unit)
  CMDLNFN  Returns the entire command line
  CURSOFF  Turn off cursor (keeps other cursor attributes)
  CURSON   Turn cursor back on as it was
  CURSOR   Change cursor size
  DATEOKFN Is a date a valid, existing date
  DEFDRVFN Get the default drive
  FEXISTFN File existence status, handles ReadOnly files correctly
  FSIZE2FN File size in bytes, alternative method
  FSIZEFN  File size in bytes as in directory (never on open file)
  LABELFN  Get a disk's volume label
  LASTDMFN The number of days in a given month and year
  MONOFN   Is it a monochrome
  NUMLOCK  Turn NumLock on, or off
  NUMLONFN Get NumLock status
  SCRLOCK  Turn ScrollLock on, or off
  SCRLONFN Get ScrollLock status
  WEEKNRFN Returns the week number for a given date
  WKDAYFN  Returns modern weekday
  ZELLERFN Zeller's congruence (for comparing dates etc)

TSUNTF: (uses Dos, Crt)
  EDRDLN   Readln with line-editing potential
  EDREADLN Readln with line-editing, recall, and insert toggle
  EDREABLN Edreadln with ctrl-c and break trapping

TSUNTG: (uses Dos)
  ALTFN    Is the alt key depressed
  CLS      Set 25*80 text mode and clear screen (no Crt required)
  CLS40    Set 25*40 text mode and clear screen (no Crt required)
  COLDBOOT Reboot computer, including memory tests
  CTRLFN   Is the ctrl key depressed
  DRIVESFN Number of diskette drives on the system
  DSKCNTFN Get the number of disk devices (MsDos 3.0+)
  FDRIVEFN The name of the first diskette drive on the system
  FIXEDFN  Is a drive a fixed disk or not
  GETESCAN Get scancode of key pressed, enhanced keyboard.
  GETSCAN  Get scancode of key pressed, XT keyboard.
  GOATXY   As the ordinary GoToXY but no Crt unit required
  INDRIVFN Is a media present in the given drive
  INKEYFN  Basic-like timed character input
  ISANSIFN Has ansi.sys or a similar screen driver been loaded
  KEYPREFN As the ordinary KeyPressed but no Crt unit required
  LFALTFN  Is the left alt key depressed
  LFCTRLFN Is the left ctrl key depressed
  LFSHFTFN Is the left shift key depressed
  RDENKEFN Enhanced keyboard ReadKey, detects also F11 and F12
  READKEFN As the ordinary ReadKey but no Crt unit required
  REVAREA  Reverse the colors of an area
  RTALTFN  Is the right alt key depressed
  RTCTRLFN Is the right ctrl key depressed
  RTSHFTFN Is the right shift key depressed
  SYSRQFN  Is the SysRq key depressed
  USECON   Restore write and writeln direction to the screen
  USEPRN   Redirect write and writeln to the printer
  WARMBOOT Warm reboot of the computer (as alt-ctrl-del)
  WHEREXFN As the ordinary WhereX but no Crt unit required
  WHEREYFN As the ordinary WhereY but no Crt unit required

TSUNTH: (uses Dos)
  CHIPFN   Get the type of the processor chip (volatile, don't trust)
  COUNTRFN Get country code (MsDos 3.0+)
  DATEFMFN Country-dependent date format (MsDos 3.0+)
  FATSFN   Get number of file allocation tables, not XTs
  GRTABLFN Has MsDos GRAFTABL been loaded or not
  INTERLFN Get interleave coefficient of a harddisk, not XTs
  ISENHAFN To detect an enhanced keyboard
  ISMOUSFN A simple true/true false test of mouse available
  LASTDRFN Get last drive of the system, softcoded, not XTs
  MATHCOFN Is a math coprocessor present
  MOUSTAFN Status (type byte) of the mouse hardware and driver
  NRCYLFN  Number of cylinders on a drive if media present (MsDos 3.2+)
  PARPORFN Get the number of parallel ports (printers installed)
  ROMDTEFN Get ROM BIOS version (date)
  RS232FN  Get the number of serial ports
  TIMEFMFN Country-dependent time format (MsDos 3.0+)
  Z2ASZFN  Convert an Asciiz string into an ordinary ascii string

TSUNTI: (uses Dos)
  BRANDEXE Store information within your program's .exe file (MsDos 3.0+)
  CHKSUMFN Checksum selftest to detect any tampering (MsDos 3.0+)
  USECOUNT Get the number of times the program has been used

TSUNTJ: (uses Dos)
  COPYFILE Copy a file from within a Turbo Pascal program
  INTRADDR Show the memory address to which the interrupt points
  INTRLOCA Show the memory address where the interrupt is located
  ISDIRFN  Is a name a directory or not (not for DRDOS)
  OPENEDFN Is an assigned textfile still open or not
  PIPEDIFN Is the standard input from redirection
  PIPEDNFN Is the standard output redirected to nul
  PIPEDOFN Is the standard output redirected

TSUNTK: (uses Dos, TSUNTB)
  BOOTDRFN Get boot device name (MsDos 4.0+)
  GETSERFN Get disk's serial number (MsDos 4.0+)
  GETVOLFN Special get disk volume label (MsDos 4.0+)
  SETSER   Set floppy's serial number (MsDos 4.0+)

TSUNTENV: (uses Dos)
  ENVADDFN Get the starting segment address of the parent environment
  ENVSIZFN Get the size of the parent environment
  ENVUSEFN Get the current use of the parent environment
  SETENV   Set a parent environment variable (variable=value)
  SETENVSH Set an environment variable for the duration of shelling
  SHOWENV  Write the parent environment table on stdout (for testing)

SELFTEST.PAS: (uses Dos)
  SELFTEST Selftest .exe file's size and date to detect tampering

TSUNT45: (Uses Dos)  (Needed for TP 4.0 only)
  DosVersion Get Dos version
  EnvCount   The number of strings contained in the DOS environment
  EnvStr     The value of an environment string defined by index count
  FExpand    Expand a file name into a fully qualified file name
  GetCBreak  Get the state of Ctr-Break checking in DOS
  GetEnv     The value of an environment string defined by string id
  GetVerify  Get the status of the MsDos write verify flag
  ParamStr0  The name of the program
  SetCBreak  Set the state of Ctr-Break checking in DOS
  SetVerify  Set the status of the MsDos write verify flag

TSERR: (Include verbal run-time error messages)

..................................................................
Prof. Timo Salmi
Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa
Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland



