C, C++, Modula-2 and Pascal Source Code

Herein lies source code for various personal (noncommercial) C, C++, Pascal and Modula-2 programs that I wrote between 1987 and 1995. While not stated explicitly in the source code (simply because I haven't gotten around to it), the following excerpt from the GNU General Public License (also available locally) applies to all the programs listed on this page:

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

I've made these programs available under the GNU GPL in the hope that they will, if not save the world, provide a source of help, inspiration, or amusement to other programmers.

You'll notice that a fair number of these programs that resemble Unix-based utilities. This is because I needed these functions for one thing or another and figured it would be a good learning exercise to write them myself.

Note that these programs are provided as-is, i.e. without any warranty whatsoever. Many are complete and working while others are incomplete and may have bugs; use them at your own risk.

If you find these programs useful, or if you find any bugs, please drop me a line.

DateSizeNameDescription
11/28/1990 04:48a52310H.Csample code for setting interrupt 10h
10/26/1988 04:12p7438TO2.Ccopies stdin to stdout, first converting all leading sequences of 8 spaces to 2 (i.e. makes indenting smaller)
03/06/1995 01:13a49,289ANAGRAMS.Ccreates anagrams from words and phrases (see this page for more info)
07/31/1990 03:31a1,967ANIM.Cthe beginning of a low-res (CGA) drawing and animation package; not finished
07/31/1990 02:15a713ANIM.Hextra stuff for anim.c
06/08/1994 04:09a135ASCII.CPPprints all 255 ASCII characters and their corresponding codes
08/19/1990 05:57a818BIBLEFIL.Cextract chapter/verse headings from text files in BIBLExx.ZIP files
11/17/1991 06:03p3,439BIGARRAY.Cdisk-based arrays
11/17/1991 06:54a1,078BIGARRAY.Hheader file for bigarray.c
10/08/1993 11:06p3,771BMP2ASC.Cdisplays information about BMP files
10/12/1988 03:07p8,926C64TOIBM.MODdisplays C-64 Doodle file in IBM EGA 200x320 16-color mode
02/05/1989 04:47p2,992CBM2IBM.Ccopies stdin to stdout, converting CBM "PETASCII" to IBM PC [MS DOS] ASCII format, or vice versa
02/26/1989 03:45a16,264CHECKUP.Creads the hard drive's boot sector, C:\COMMAND.COM, C:\IBMBIO.COM, and C:\IBMDOS.COM. Then, either writes image of boot sector and information about three files mentioned to an image file or compares them with an already existing image file; useful for checking whether your DOS system has been infected with a virus or otherwise compromised
10/28/1989 05:11p5,820CMP.Ccompresses and decompresses files
09/30/1989 04:16a2,365CODE.Cfilter to encode stdin and send it to stdout; useful for things like ROT13
06/07/1989 05:27p1,659COMPARE.Ccompares two text files and shows the differences
05/21/1991 02:43a7,407COMPRESS.Ccompress and decompress files
09/01/1987 01:32a6,492CONVERT.PASconverts Ventura Publisher ".C00" files to mountable Xerox 4045 laser printer form files (i.e. constant pages) with ".LTR" extensions.
05/29/1990 05:45p918CRAZY.CEnglish-like C code
01/07/1989 01:02a16,277DD2BIN.MODdisplays C-64 Doodle file in IBM EGA 200x320 16-color mode
04/24/1992 01:55p4,899DELDIR.Cremoves a given directory, including any files it contains; optionally recurses subdirectories
05/06/1990 03:20a6,508DISK_PI.Ccomputes Pi to any given number of decimal places; features disk-based swapping
02/02/1989 04:01p2,854DROP.C"Drops" text on screen
08/20/1992 05:42p1,210EPRINT.CPPfilters text files, changing formfeed (CTRL-L) characters into appropriate number of newlines
04/14/1989 04:39p3,081EXTRACT.Cextracts a run of bytes from a specified file to stdout
11/10/1990 04:40a9,962FAKETEXT.Canalyzes text files for frequency of all "windows" of text of a given size, then creates an output file based on the frequencies of all "windows" found (I think this was based on my interest in Markov Chains)
11/03/1989 03:50a11,763FILES.Cdisplays variations of full path name of each file in a given directory to stdout; optionally recurses subdirectories
03/01/1989 12:34a9,020FINDBUG.Cfinds the "Dungeon" virus on either the boot sector or all files
04/14/1991 02:34a1,780FIX.Cremoves unalphabetized lines in a file
03/17/1991 09:56p14,704FLISTS.Cgeneric linked list utilities (for linked lists stored in a file)
03/17/1991 09:55p2,589FLISTS.Hheader file for flists.c
12/05/1992 01:34p3,968FULLSPEC.Cdisplays full filespec of all files in current directory and below
03/15/1990 12:26a1,700GAME.Csome sort of game I was working on (similar to Tetris?)
01/30/1990 03:03a604GAMEGLOB.Cglobals for game.c
03/10/1990 09:04p313GAMEGLOB.Hheader file for gameglob.c
03/12/1990 03:16a9,918GAMEVID.Cvideo stuff for game.c
03/10/1990 09:18p1,526GAMEVID.Hheader file for gamevid.c
09/04/1990 03:21a608INTER.Csample code for setting interrupt vectors
12/03/1989 02:32a498KEY.Cdisplays what's in the keyboard buffer
04/06/1989 07:45p102KIM.Ctest for kmvid.c
03/08/1991 05:20p11,013KMVID.Cmy video functions
03/08/1991 05:21p4,772KMVID.Hheader file for kmvid.c
03/20/1992 03:53p4,332LATIN.Creads standard input and writes Pig Latin or Egg Latin equivalent to standard output
08/03/1988 06:37a5,091LATIN.MODreads standard input and writes Pig Latin or Egg Latin equivalent to standard output
04/06/1989 03:30a63,638LIFE.CJohn Conway's game of Life for Windows
09/22/1993 01:51a24,804LIFE.CPPJohn Conway's game of Life for Windows
09/07/1992 03:28p352LIFE.Hheader file for life.cpp
01/26/1989 02:17p56,794LIFE0126.Cdevelopment version of Life
08/29/1988 07:05a10,139LIFE0829.Cdevelopment version of Life
09/05/1988 07:35p21,150LIFE0905.Cdevelopment version of Life
09/07/1988 04:09a26,336LIFE0907.Cdevelopment version of Life
09/09/1988 10:47p27,996LIFE0909.Cdevelopment version of Life
09/15/1988 03:35a31,905LIFE0914.Cdevelopment version of Life
09/21/1988 05:26p33,591LIFE0921.Cdevelopment version of Life
11/04/1991 07:08p13,391LISTS.Cgeneric linked list utilities
02/21/1993 04:00p13,402LISTS.CPPgeneric linked list utilities
02/21/1993 03:53p2,914LISTS.Hheader file for lists.c and list.cpp
10/22/1990 01:19p19,845LISTS.PASgeneric linked list utilities (for Turbo Pascal)
10/20/1990 05:53p1,793LISTTEST.PASlinked list test
11/15/1988 01:49p15,534MAKENDX.MODreads 320x200 Doodle pictures and adds them to an .NDX as EGA images
09/02/1989 05:52p6,010MENU.Cgeneric menu system
05/04/1988 04:40p6,417MENU.PRGgeneric menu system for dBase III+
04/14/1991 05:36p3,225MERGE.Cgiven two files of sorted words, merges them to stdout; if any words are duplicated, then takes the marked one
04/13/1991 10:17p3,836MERGEALL.Cextracts and outputs words according to length
04/27/1989 10:27p12,338MINE.CMine Field game
09/14/1989 08:00p3,381MMFILT.Cfilters MultiMate .DOC files and creates new file with ".DDD" extension; adds filename to first 8 characters of file, fixes bullet characters, and replaces '>' with '|'
08/26/1992 10:00p8,492MOM.CPPMagpie Offline Mailer; the beginning of an offline mail reader for Magpie BBS systems
08/25/1992 05:38p511MOM.Hheader file for mom.cpp
09/07/1991 04:59a448MS2U.CCopies stdin to stdout, converting newlines to CHR(10)'s (MS-DOS format to Unix format)
07/25/1993 05:15p19,792MY_PI.Ccomputes Pi to a given number of decimal places
09/02/1991 02:02a737NOCRLF.Cremoves all instances of adjacent newlines from stdin
12/13/1989 04:26a170NOTMACRO.Creplaces non-consecutive newlines with carets
05/08/1992 02:52p5,829OBJECTS.CPPA.I. type thing for describing and querying things
05/02/1992 04:39p1,845PALIN.PAStests strings for "palindrome-ness"
03/04/1989 05:33a1,041PCB.Ccopies text from stdin to stdout, removing newlines (except where explicitly requested via "\n")
02/01/1991 03:20a2,425PERM.Cdoes permutations
09/28/1989 12:01a575PFSPRINT.Csome type of printer utility
07/25/1993 01:15p19,792PI.Ccalcuate Pi to an arbitrary number of decimal places; added support for disk swapping, continuing a saved session, and variable memory usage
1/21/1989 03:31a1,668POP.MODvisual "pop" routine tests
10/09/1991 04:40a1,565READSTR.Creads string from console and echoes it; useful for batch files that want user input
11/21/1988 09:57p20,822REFDEF.MODfinds unreferenced identifiers and multiply defined global identifiers within a module and generates a .LST file compatible with Logitech's MOD editor
05/15/1992 03:40p2,741ROMAN.CPPconvert Roman numerals to Arabic and vice versa
05/06/1990 06:53p5,588RWTEST.Cperforms a read/write test on every track and sector of a given drive and reports any bad sectors
04/16/1989 07:08p10,620SEARCH.Cvery, very basic grep-like utility
04/06/1989 09:04p949SFX.Cspecial effects for wiping/clearing screen; apparently not completed
04/13/1991 08:34p1,069SPLIT.Cgiven a SORTED text file, splits it into 26 different files, A.OUT, B.OUT, C.OUT, ... , Z.OUT, each containing words which begin with the letter of the filename
11/16/1988 08:22p3,412SS.Cslide show demo
11/20/1990 04:43a13,973STARDEMO.Cstar field graphics demo
04/14/1992 03:44p2,654STR.CPPstring class test
09/07/1991 05:25a1,198STRIP.Ccopies stdin to stdout, stripping characters specified
02/13/1994 10:32p744STRUTILS.Ccontains a function to add commas to floating point numbers
01/29/1989 05:49a875TC-CRASH.Csample code that causes Borland's Turbo-C 2.0 compiler to crash
04/13/1989 10:20p1,838TEE.Ccopies stdin to both stdout and to the file specified
04/09/1992 09:36p1,242TEST2.CPPclass test
08/10/1992 02:48p15,244TIMEDATE.CPPlow-level time and date functions
08/10/1992 02:19p5,940TIMEDATE.Hheader file for timedate.cpp
12/04/1990 01:27a13,316TOKEN.Cvery basic grep-like utility
05/26/1991 06:34p6,227TXTINFO.Csimilar to Unix's wc utility
09/07/1991 04:54a372U2MS.Ccopies stdin to stdout, converting chr(10) to newlines (Unix format to MS-DOS format)
04/03/1993 08:22p3,399UNIQ.Cwrites either unique or non-unique lines from stdin; similar to the Unix utility by the same name
04/16/1989 09:27p3,000UNIQ2.Cdifferent version of uniq.c
11/7/1988 10:27a3,207UNPACK.MODunpacks a packed Doodle file
12/22/1988 11:30p15,903VIEWC64.MODdisplays C-64 Doodle file in IBM EGA 200x320 16-color mode
11/17/1988 10:36p105,000VLC/"Very Limited Compiler" (VLC): a college assignment I did in Modula-2
02/18/1995 04:02p305WOOD.Cprints the "99 Bottles of Beer" lyrics, only with cords of wood
12/27/1990 08:59p1,160WORDS.Cparses words from stdin to stdout
12/29/1990 07:41p1,541WPFILT.Cfilters print-screen dumps from WP's SPELL.EXE program and dumps raw words to stdout
10/24/1996 10:08a1,541XXXXBEER.SPAL program that prints the words to the "99 bottles of beer" song

Return to Kim Moser's Generic Home Page.
Copyright © 2024 by Kim Moser (email)
Last modified: Sun 06 January 2008 06:30:07