This content is old! It’s still useful, but it’s old, and there may be bit rot, newer/better tools or ways to do things. Sanity check and do your research.
Pause.c
A tiny C program that does the same thing as the DOS pause command.
UUConvert.c
An old program that reassembles and uu-decodes binary Usenet threads
saved by old mail readers such as Tin. I did not write this and I
don’t know who did.
Assembly SCR programs
WrmBoot.com and
CldBoot.com (16bytes)
A Warm Boot (CTRL-ALT-DEL) and Cold Boot (same as reset switch) on a
PC. Here is the C, BASIC, and debug .scr source
code.
This zip file is a collection of old “scr”
programs, many collected from old computer magazines. Here is a listing:
ADDTOIT.SCR Extend path environment variable to any length.
ALREADY.SCR Run programs or batch files only ONCE a day, at the first BOOT-UP.
ANSITEST.SCR Returns an ERRORLEVEL 0 if Ansi.sys is active, 1 if it is not.
ANTIBOOT.SCR Disables CTRL-ALT-DEL keyboard re-boot.
AUTOASK.SCR Returns the ASCII code of the character entered at the prompt.
AUTOCAPS.SCR Automatically turns the CAPs lock OFF when you press the shift key.
BIGBUF.SCR TSR to enlarge DOS's usual 15 character keyboard buffer to 127.
BUFFER.SCR Stuffs characters into the key buffer.
CLDBOOT.SCR Cold boot the PC.
CLEARKEY.SCR Empty the keyboard buffer
D2H.SCR Convert decimal numbers to hexadecimal.
ENCRYPT.SCR Simple file encryption (use PGP or something better instead).
ESC.SCR Inserts the escape character in batch files (eg. esc [10m).
FASTKEY.SCR Resets the keyboard repeat rate and delay rate to the fastest possible.
FULLSCR.SCR Script to switch DOS session to full screen in MS-Win.
H2D.SCR Convert hexadecimal numbers to decimal.
ISAREADY.TXT Detail and batch files with a utility to test if Drive a: is ready.
ISAREADY.SCR Utility to test if Drive a: is ready.
KEYCODE.SCR Returns the ASCII and scan codes for pressed keys.
MEGSFREE.SCR Returns an ERRORLEVEL = to the number of free megs.
NOPRSCR.SCR Turns OFF the prn-scr key.
NOSOUND.SCR Disable your PC's internal speaker.
NOWAIT.SCR Resets the number of re-tries BIOS makes to the printer.
NUMLOCK.SCR Toggles the numlock key.
PRSCR.SCR Turns ON the prn-scr key.
PRTLOG.SCR Toggle print logging of the command line.
REBOOT.SCR Warm boot the PC.
RENDIR.SCR Rename directories.
SHIFTKEY.SCR Change the bypass autoexec.bat key in Windows.
SHIFTMOD.SCR Make " , " & " . " keys "unshifted".
WAIT.SCR Timed pause.
Other
Here’s a very simple awk script to
prepare text for inclusion into a HTML file by changing URL’s in a
plain-text file into into HTML links to that URL. I’m not really sure
who wrote it, but I didn’t.
See this zip file for
some date and time related code and routines. I didn’t write any of this
either.
This content is old! It’s still useful, but it’s old, and there may be bit rot, newer/better tools or ways to do things. Sanity check and do your research.
Programs to print a BLACK page to an HP LaserJet. I plan to move this to https://github.com/vossenjp/
at some point…
C Source
#include<stdio.h>/* Program to print a BLACK page to an HP LaserJet */main()
{ /* begin of main */printf("\n\n\nBlack PC Computing October 1991");
printf("\n\nNow printing black page...\n");
fprintf(stdprn,"%c%s",'\33',"&l0E");
fprintf(stdprn,"%c%s",'\33',"&l0L");
fprintf(stdprn,"%c%s",'\33',"*p0x0Y");
fprintf(stdprn,"%c%s",'\33',"*c2400a3300B");
fprintf(stdprn,"%c%s",'\33',"*c0P");
fprintf(stdprn,"%c%s",'\33',"E");
} /* end of main */
BASIC Source
10 REM Program to print a BLACK page on an HP LaserJet20 PRINT:PRINT:PRINT"BLACK PC Computing October 1991"30 PRINT:PRINT"Now printing Black page..."40 OPEN"lpt1"FOROUTPUTAS#150 PRINT#1, CHR$(27) +"&l0E"60 PRINT#1, CHR$(27) +"&l0L"70 PRINT#1, CHR$(27) +"*p0x0Y"80 PRINT#1, CHR$(27) +"*c2400a3300B"90 PRINT#1, CHR$(27) +"*c0P"100 PRINT#1, CHR$(27) +"E"110 CLOSE#1
When saving, rename from *.pl.txt to *.pl or whatever you use for Perl.
If using on Unix, you may need to convert CRLF to LF, and modify
the “shebang” line (e.g. #!/usr/local/bin). “CleanUp”
can fix the line termination. Or find a good dos2unix and unix2dos
program like those found in the UNXUtils.
Perl (Practical Extraction and Report Language or Pathologically
Eclectic Rubbish Lister) is an interpreted language optimized for
scanning arbitrary text files, extracting information from those text
files, and printing reports based on that information. It’s also a good
language for many system management tasks. Start at
www.perl.com, and check getting the latest
Perl. See the
Win32 section especially if you use Win95 or WinNT (Hint: these versions
can access the NT event logs, making collection and auditing them
much easier…). I use
ActiveState’sActivePerl.
I’ve also used IndigoStar’sIndigoPerl (which has
Apache built in) and
Perl2Exe which can “compile”
Perl. And check out the Open Perl
IDE.
Scripts
Clicking on the name of a script will open the code here, so you probably
want to open ina a new tab instead.
General purpose utility to clean up messy text files. Can convert
tabs (see Tab above), UPPER or lower case the entire file, remove
leading “>”, trim, convert CRLF <–> LF, number output, etc.
Ironocally, the code for this is very messy too. One of these days I
need to start fresh, but…
Generate random passwords of arbitrary length and complexity. v3 is
a re-write to clean up the code and make it more modular. It also
now changes interface modes based on script name (.cgi or .pl, still
need to manually edit and add -T). New for 2.2 was dual
interfaces–GenPass can run as a CGI script or from the command
line. New for 2.1 was a Hex option, for generating WEP keys. Try the
CGI/web interface!
Count the frequency of a list of regular expressions in arbitrary
input data so that a file for use with ’egrep -f’ can have the most
frequent expressions first so it runs faster.
A more simple and generic program to merge lines two data files with
a common, unique key. This program is similar to the UNIX join
command, but is intended more to process TAB delimited files cut
from and pasted back into a spreadsheet. It creates a table or
matrix of data, where each line is merged on a unique key (hence
MergeL).
GenSite is the simple script (relative to “real” Content Management
Systems (CMS) anyway) that created the HTML code for this site up until 2026.
My main constraint is that the ISP where most of the site is hosted does not
support SSI, CGI, or anything else that would facilitate a modern site.
I have various reasons for staying there, not the least of which is
inertia. (That changed probably decades ago…)
So I needed a simple solution that would create a navigable
site without any those technologies. Also, after the last redesign
JavaScript fiasco, I wanted totally PURE HTML. Since the site is mostly
static, that was fine, except for being able to actually maintain it. So
I wrote this.
Generate a static HTML-only web site from templates. (See also my
GenSite wrapper web.)
OLD
Old Content
This content is old! It’s still useful, but it’s old, and there may be bit rot, newer/better tools or ways to do things. Sanity check and do your research.
Some Perl modules you might need (especially since I used them in some
of these scripts). Just extract the files (use WinZip) and copy *.pm to
\perl\lib\Number, \perl\lib\time or the correct path.
Fix-wls v1.0a 19-Mar-2000
Converts those annoying WatchGuard *.WLS files to Self-Extracting
archives. This is obsolete with current versions of Live Security.
LCaseHTML v1.1 05-Apr-1996
Converts HTML commands to lower case in HTML code, overwriting
original file. (I got tired of inconsistent case on my HTML code.
Talk about anal…)
URL2HTML v1.1b 15-Nov-2000
Converts URLs (in the form of URL{tab}description) to Bulleted HTML
lists.
REM From PC Mag, Vol11 Number 5DECLARE SUB ReBoot (Warm%)
CALL ReBoot(1) 'be sure to save this program before running it!SUB ReBoot (Warm%) STATICIF Warm%THEN'if they want a warm bootDEF SEG=0'assign the value 1234 HexPOKE&H473, &H12 'to address 0000:0473 HexPOKE&H472, &H34
ENDIFDEF SEG=&HFFFF 'either way call the BIOSCALL Absolute(0) 'routine at FFFF:0000 HexENDSUB
Assembly
To use these “scripts” cut&paste the source into a file, then issue the
following command “debug < cldboot.scr”.
CLDBoot.scr
A 0100
MOV AX,40
MOV DS,AX
JMP FFFF:0000
N CLDBOOT.COM
RCX
10
W
Q
WRMBoot.scr
A 0100
MOV AX,40
MOV DS,AX
MOV WORD PTR [72],1234
JMP FFFF:0000
N REBOOT.COM
RCX
10
W
Q