[comp.lang.pascal] Use reprogrammed units

ts@uwasa.fi (Timo Salmi) (04/07/91)

In article <1991Apr06.103655.1480@lynx.CS.ORST.EDU> hopkins@prism.cs.orst.edu (Scott Hopkins) writes:
>
>	This has probably been answered before but hopefully someone can help
>me out. I need a way to disable/enable the cursor from blinking in Turbo Pascal
>5.5 . I have read that you can use the Intr function to do this and set Dx to
>-1, I think, but do not understand how to use it. I'm really frustrated by
>this because I am writing a program that has a clock update in it but doesn't
>look good enough because of the blinking cursor in the window of the screen
>update. Any info will be helpful. Thanks in advance...

To answer (again, since it is asked again) this, and similar
questions I refer once more to /pc/ts/tspa23##.arc (##=40,50,55,60). 
(To forestal any disappointments later: "No source code is included
in these packages"). 

Sat 5-January-1991

Summary of the Functions and Procedures in the TSPAS Package

Functions are indicated by the ending FN, the procedures by the lack
of it.

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
  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
  LBINFN   Convert decimal longint to binary string
  LHEXFN   Convert secimal longint to hexadecimal string
  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)

TSUNTC: (uses Dos, Crt)
  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 oppsite 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
  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)
  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+ only)
  FDRIVEFN The name of the first diskette drive on the system
  FIXEDFN  Is a drive a fixed disk or not
  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
  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 coputer (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
  COPYFILE Copy a file from within a Turbo Pascal program
  COUNTRFN Get country code
  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
  ISDIRFN  Is a name a directory or not
  ISENHAFN To detect an enhanced keyboard
  LASTDRFN Get last drive of the system, softcoded, not XTs
  MATHCOFN Is a math coprocessor present
  OPENEDFN Is an assigned textfile still open or not
  PARPORFN Get the number of parallel ports (printers installed)
  ROMDTEFN Get ROM BIOS version (date)
  RS232FN  Get the number of serial ports

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

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

TSUNT45.PAS: (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
  GetEnv     The value of an environment string defined by string id
  ParamStr0  The name of the program

TSERR: (Include for verbal run-time error messages)

The wares are available by anonymous ftp from garbo.uwasa.fi, Vaasa,
Finland, 128.214.12.37, or by using our mail server (use the latter
if, and only if you don't have anonymous ftp).  If you are not
familiar with anonymous ftp or mail servers, I am prepared to send
prerecorded instructions on request.  (If you don't get the
instructions from me within a few days, it will mean that your email
address cannot be reached by a simple email reply.  Contact your
system manager for devicing a proper mail path for you, because
unless you do, you wouldn't be able to utilize the mail server
anyway.  If you are in North America first consider using an ftp
site near you to spare the overseas load.)

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

ts@uwasa.fi (Timo Salmi) (04/09/91)

In article <7243@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Bob Beauchaine) writes:
>In article <1991Apr7.055141.5233@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes:
>>of it.
>>
>>  LHEXFN   Convert secimal longint to hexadecimal string
>                    ^^
>		    What's this?  A short decimal??
>
>		    Sorry, Timo, couldn't resist :).

   No problem.  I'll at once release a new major version where I'll
correct just this one error, and tell nobody in advance.  :-)
   Seriously, though, all feedback (even on typos) is useful, and
appreciated. 
   All the best, Timo

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun