Dec 132017
Latest version of D & D style adventure game similiar to Hack.
File LARN13.ZIP from The Programmer’s Corner in
Category Games and Entertainment
Latest version of D & D style adventure game similiar to Hack.
File Name File Size Zip Size Zip Type
-README- 3874 1685 deflated
FIXED.BUG 12037 5130 deflated
LARN.DOC 16260 5191 deflated
LARN.FTN 1358 733 deflated
LARN.HLP 6445 2569 deflated
LARN.LOG 1146 428 deflated
LARN.MAZ 18801 2056 deflated
LARN.OPT 160 125 deflated
LARN.PID 34 34 stored
LARN.SCR 1690 134 deflated
LARN.SWP 0 0 stored
LARN13.EXE 188160 73490 deflated
TERMCAP 465 266 deflated

Download File LARN13.ZIP Here

Contents of the LARN.DOC file

PC LARN v12.0

PC LARN version 12.0 for MSDOS(tm) computers

by Don Kneller
2 Panoramic Way #204
Berkeley, CA 94704
October 20, 1986

Table of contents

System requirements.............................................2
Command line options............................................5
WIZARD mode.....................................................7

PC LARN v12.0


LARN is a dungeon type adventure game similar in concept to ROGUE or
HACK but with a much different feel. LARN is copyrighted 1986 by Noah
Morgan (USENET: panda!condor!noah) at GenRad Inc. Bolton MA. This version
is a port of his game into the MSDOS environment by Don Kneller.

System requirements

PC LARN requires:

- MSDOS or PCDOS 2.x or above.

- at least 256K of RAM.

- disk storage capacity of at least 360K, although twice that much is
preferred if you want to "checkpoint" your game to prevent
accidental lose due to a system failure.

- the ANSI.SYS device driver must be installed (although the NANSI.SYS
driver is *strongly* preferred and has been included in this
distribution). You should install either ANSI.SYS or NANSI.SYS, but
not both. To install NANSI.SYS, put the line "device=NANSI.SYS" in
your CONFIG.SYS file. See the TERMCAP section for further details.

Files supplied

The following files should be include in this LARN12.ARC file:

This documentation

The executable file.

Fortune cookie messages.

A help file which can be read with the "?" command in LARN.

Some maze levels are precalculated and stored here.

The documentation for:

A new ANSI.SYS that is *much* faster than ANSI.SYS and supports
the line insert and line delete escape sequence that LARN uses.
This excellent product is written by Daniel Kegel. See the
TERMCAP section and NANSI.DOC for more details.

A file describing the escape sequences to send to the terminal to

PC LARN v12.0

change video modes. The supplied TERMCAP file is for monochrome
systems. See the TERMCAP section for details on changing


PC LARN is configured to your system by options placed in the file
LARN.OPT. When PC LARN starts up, it looks in the current directory for
this file, then in directories along your PATH. This is the same behavior
DOS uses when trying to find executable files. For a hard disk system I
suggest creating a \GAMES directory and putting LARN.EXE, LARN.OPT and
TERMCAP in there, then put \GAMES on your PATH. For a 2-floppy system, put
COMMAND.COM on new disk and put these 3 files on this disk.

Now create a LARN directory and put the included files LARN.FTN,
LARN.MAZ, and LARN.HLP in there. LARN will create other files in this
directory, including the score file (LARN.SCR), a file to identify the
person playing (LARN.PID) and a file listing all the people who have played
to date (LARN.LOG). Also, save games (LARN.SAV) and checkpoint games
(LARN.CKP) will go in here.

For systems with hard disks, create the subdirectory "LARN" in the
\GAMES directory. Your "larndir" is now "\GAMES\LARN". For 2-floppy
systems you can have "larndir" as "A:", but you will have to save games on
another drive (see "savefile" option below).

Here are the options that can be put in LARN.OPT. Options that are
followed with a colon, ":", take at least one argument. Options without a
colon are boolean, meaning you select that option merely by mentioning it.

These options are only in PC LARN:

larndir: directory
Sets "directory" to be the place LARN looks for files. For hard
disks set this to be \GAMES\LARN. For 2-floppy systems, use A:

If "larndir" is not specified, the current directory is assumed.

ramlevels: number
This number is the maximum number of levels PC LARN will keep in
memory. The number can be between 1 and 14. Normally, PC LARN
will use as much memory as available, but you may want to use
less so there will be enough memory to start up a second copy of
COMMAND.COM with the LARN command `!'. If there isn't enough
memory for COMMAND.COM, LARN will clear the screen and prompt
with "A>" until return is struck, then go back to the game.

If "ramlevels" is not specified, a value of 14 is used. If
"number" is less than 14, LARN will use a swapfile to store the
oldest levels. Note that a level takes about 8K of memory.

swapfile: filename
This is the name of the swap file that will be used if ramlevels
is less than 14. If all the levels fit in memory, no swap file
will be used. You may want to put the swapfile on a RAMdisk.

PC LARN v12.0

If "swapfile" is not specified, LARN.SWP in directory larndir
will be used.

graphics: wallc floorc
In UNIX LARN, the wall character is a # and the floor character
is a blank (which makes it almost impossible to tell where you've
been). In PC LARN, the default wall character is also a # but
the default floor character is a period.

This option allows you to change these characters to something
you like. I use 176 (a graphic block) and 249 (a central dot).
Since almost all normal ASCII characters are used for something
already, you should only choose numbers that are in the graphics
character set (ie those with decimal values greater than 128).

This enables the keypad for use with LARN. A *BIOS* call is used
to read the keypad. The correspondance between keypad and game
command is:

Keypad Command
7 8 9 u+l(y) up(k) u+r(u)
\ | / \ | /
4 -5- 6 left(h) nothing right(l)
/ | \ / | \
1 2 3 d+l(b) down(j) d+r(n)
Ins inventory(i)

The letter in () is the game command letter. "u+l" means up and
left. The keypad "7" is translated to the command for moving one
space up and left. With shift the commands are the same as the
uppercase letters.

cursor: start-line end-line
Normally, LARN uses the standard DOS cursor (the flashing
underscore) to show where your player is located. This can be
difficult to see. This option results in a *BIOS* call to change
the cursor size. For a monochrome display, the normal value of
start-line and end-line is 11 and 12. Values of 4 and 9 give a
larger cursor which is not too obtrusive.

If "cursor" is not specified, no BIOS call is made.

This option causes the input and output of your computer to be
switched to "raw" mode. The advantage of this is faster output
and better handling of special characters ^S and ^P.

=========== WARNING ==========
Some computers (eg. DEC Rainbows) hang if rawio is attempted.

Put this in LARN.OPT if your computer is a DEC Rainbow and you
want to use graphics characters for drawing the maze. You can
use any characters from the ASCII character set and from the
"line-drawing" character set. To use line-drawing characters,
take the decimal value of the character and add 128 to it. This
makes the values of line-drawing characters lie between decimal
128 and 255 and tells PC LARN you want a line-drawing character.

PC LARN v12.0

The following are options found in UNIX LARN as well:

With this option, the game is saved every 400 moves. If your
system crashes it is possible to recover from the last checkpoint
file (LARN.CPK in the LARN directory) with the command "larn ++".

monster: name
Sets the name of a monster. If the name has a space in it,
enclose it in double quotes (eg "tooth fairy").

name: yourname
Sets the name of the player. If you want a space in your name,
enclose it in double quotes (eg "Mad Max").

Skip displaying the opening messages.

Disable sound from the speaker.

savefile: filename
The filename to use for saving the game. The default is LARN.SAV
in the LARN directory. For a 2-floppy system you might try
B:LARN.SAV if the LARN directory is on the A disk drive.

Command line options

There are several command line options that can modify the behavior of
LARN. These are:

-o optionfile Use this as the option file rather than LARN.OPT. As
with LARN.OPT, the current directory then directories
along your path are searched for this file which
supplies configuration information.

-s Show scores.

-l Show log file.

-i Show all scores including inventories.

-c Create a new score file. You have to know the Wizard's
password to do this. Erasing LARN.SCR has the same

-n No welcoming message. Prevents printing of the short
introduction to LARN. Putting the "no-introduction"
configuration option in LARN.OPT has the same effect.

-# Where # is a number from 0 to 9. This sets the
difficulty of LARN to this level. Normally, LARN
starts out with difficulty 0 and increases in
difficulty by 1 when you win at the current level.
Thus the game automatically gets more difficult.

-h A help screen that shows the command line arguments.

PC LARN v12.0

++ Restore a game from a checkpoint file. If you have
checkpointing enabled (with the "enable-checkpointing"
configuration option in LARN.OPT) then LARN writes a
checkpoint file every 400 moves. Should your system
crash you can recover the game from the checkpoint file
with this command line option

For example: "larn -n -o bobslarn.opt" starts up LARN with no
introductory message and uses bobslarn.opt file for configuration options.
"larn ++" tries to restore LARN from a checkpoint file.


LARN uses the UNIX "termcap" to select escape sequences to be sent to
the terminal driver (either ANSI.SYS or NANSI.SYS) to change video modes.
When LARN starts up, it checks in the environment for the variable called
"TERM". The DOS command:
set TERM ibmpc-ega
will give the environment variable "TERM" the value "ibmpc-ega". By
default, LARN assumes the value of TERM is "ibmpc-mono".

Then LARN looks in the file called "TERMCAP" for a terminal definition
with the same name as the value of TERM. LARN first looks for TERMCAP in
the current directory, then in directory "\ETC" (the normal UNIX place),
then in directories along your PATH.

The TERMCAP file uses 2 letter codes to describe each escape sequence
and \E to mean ESC (the escape character is decimal 27). Each entry is
enclosed in colons. For example, to start underscore mode on a monochrome
display, we want to send the sequence "ESC[4m". This looks like
":us=\E4m:" as a termcap entry.

The following sequences are used by LARN:

ti terminal initialization. You could have something like:
which would mean to select blue background and white foreground.

te terminal end. To reset your terminal to white on black:

so stand out. Select red forground, keeping the blue background:

se standout end. Back to white on blue:

al insert line. This is *not* available in ANSI.SYS, so remove this
entry if you're using ANSI.

dl delete line. This is *not* available in ANSI.SYS, so remove this
entry if you're using ANSI.

If you want to make your own TERMCAP entry, copy the "ibmpc-mono"
entry, replace the name (eg use "ibmpc-color" or "ibmpc-ega" or whatever),
then replace the sequences with whatever you please. The possible escape
sequences are listed in Chapter 13 of the DOS 2.0 manual. I don't know
where they are for DOS 3.1 since they aren't in the DOS manual. The

PC LARN v12.0

NANSI.DOC file has a table of character attributes that you can use with
NANSI.SYS. They are the same as used by ANSI.SYS.

Remember to change the environment variable "TERM" to reflect which
TERMCAP entry you want! You should probably put a "set TERM=..." line in
your AUTOEXEC.BAT file.


There is a WIZARD mode for testing features of the game. To get into
WIZARD mode, type in an underscore "_" and answer the prompt for the
password with "pvnert(x)". Wizards are non-scoring characters that get
enlightenment, everlasting expanded awareness and one of every object in
the game.

I hope you enjoy this version of LARN. Please refer any inquires on
this MSDOS implementation to:

D. G. Kneller
2 Panoramic Way #204
Berkeley, CA 94704
UUCP: ...ucbvax!ucsfcgl!kneller
ARPA: [email protected]
BITNET: [email protected]

 December 13, 2017  Add comments

Leave a Reply