				dirmenu/CBM
			      by Joseph Rose,
			    a.k.a. Harry Potter
			    -------------------

	Welcome to dirmenu for CBM!  This code was written under cc65.  This
program is a menu program and allows a user to select which program on a disk
to run.  Put this program first on a disk or disk image, and once a user runs
the disk, he/she will find a menu that selects a program to run.  Its usage is
simple: run the program, use the up and down cursor keys to select the program
to run and press Return, or press Run/Stop to cancel.  This program is
freeware.  Do what you want with it.  Just notify me if you like it.  My e-mail
address is rose.joseph12@yahoo.com.

[The Software]

	menu.prg runs on a C64, menu_c16.prg runs on a CBM 264 series computer
and menu_c128.prg runs on a c128.  The program files that end with "-81" are
versions for the 1581 drive.  The c128 version runs in both the 40-column and
80-column screens.

[Compiling]

	If you have cc65, you can modify and recompile this program.  The files
main.c, menu.c, menu.h and zprout.s are the source files.  zprout.s contains
utility assembler functions and zeropage variable definitions.  Also, parts of
the CBMSimpleIO library are included.  The latter are quick versions of puts()
and printf().  They use the kernal directly so as to minimize code.  Also, I
added a file called zprout.s, which contains some assembler code and a few
zeropage variables.  Then, I used this program to add functionality to
CBMSimpleIO.  These files are the bulk of the other source files.  These files
are heavily commented, so they should be easy to follow.
	To compile this program for the 1581, define the __Do1581__ symbol
when compiling menu.c and assembling zprout.s.
	Notes: If you're building for the C128, use colors2_x_128.s.  For the
C64 and C16, use colors2.s.  Also, you should use the provided config. files
when compiling this program.  One more thing: you have to use the proper start-
up file.  The start-up files are crt0_*.s, where * is the target system.  That's
all.

[Updates]

	From the original version, I mostly optimized and cleaned up the code.
Mostly, I took out the malloc() series and created the menu statically, 
cleared out some unnecessary code and fat and did some other minor tweaks.
There are no significant other updates.  These cut the C64 version by about
.74k.  Then, I optimized accesses to menu entries by writing the access only
once and replaced puts() and printf() with my routine from CBMSimpleIO to use
the kernal for output directly.  I added a routine (printscr.s) to the
CBMSimpleIO library to handle printing of strings followed by a carriage
return.  Now my program takes much less RAM!  That's what you get by
optimizing a C compiler!!!  I then implemented some assembler and zeropage
variables.  This helped a little.  Unfortunately, you need to add 4 to the
length of the ZEROPAGE memory area.
	As of v.1.3.0, I did even more optimizations.  I created a routine to
calculate the address of a particular directory entry so that the code only has
to be written once; I changed the structure of the code to identify the
program to run by number; On the C64 version, I copied part of the kernal's
LOAD/RUN command so that I don't have to waste data written to the screen and
Returns to the keyboard buffer; I edited the start-up files to eliminate
unnecessary code; I replaced strcpy() with my own routine which only copies up
to 255 bytes, saving four bytes, and I concatenated some steps (i.e. I
assigned the value of a parameter to a variable upon passing at least once.),
and now, even the C128 version takes less than 2k!  If you have any other
optimization techniques, please e-mail me.
	Updates from v. 1.80: I fixed a bug with the C128 version not always
reading the directory right.  Apparently, it was caused by an invalid file bank
setting.  I re-enabled the bank-setting code, and now it works!  I also changed
the color-definition strategy several times.
	Version 2.00 now includes 1581 support with partitions.

[Vic20 Support]

	This program now has Vic20 support.  Included are binaries for the
unexpanded, 3k-expanded and 8/16k-expandeed Vic20s.  The binaries are marked.

[Tip]

	If you have Template Creator for Windows, you can use it to make out
disk images with the binaries in this package into templates and make new files
out of those templates.  Note, however, that, if you do this, you may need to
change the names and IDs of the new disk images so that your emulator can
uniquely identify this disk image.  If you don't have it, you can download it at
https://sourceforge.net/projects/tmpcreat/files/.

[Feedback]

	You may use this program for your use.  All I ask is that you drop me a
line and tell me what you think of this program.  If you have any suggestions,
please e-mail me.  My e-mail address is rose.joseph12@yahoo.com.