Jan 082018
A graphical comparison of numerous sort techniques (requires ega or vga).
File SORT-OUT.ZIP from The Programmer’s Corner in
Category Science and Education
A graphical comparison of numerous sort techniques (requires ega or vga).
File Name File Size Zip Size Zip Type
EGAGRAPH.COM 8382 4885 deflated
PAPER.ASC 10865 3980 deflated
README.1ST 3078 1498 deflated
SORT-OUT.COM 50854 24077 deflated
SORT-OUT.SCR 155648 19905 deflated
SORT.BAT 20 20 stored

Download File SORT-OUT.ZIP Here

Contents of the README.1ST file

Additional notes on SORT-OUT from Jerry Shifrin, sysop: East
Coast Forth Board, McLean, VA, 703-442-8695.
This package is by Henning Hansen of the University of Denmark.
It was presented as a paper at the 1989 Rochester Forth
Conference. Henning has graciously released this for public
distribution including all source code.

This ZIP contains the following files:
EGAGRAPH.COM - EGA graphics driver
PAPER.ASC - Paper presented at the conference
README.1ST - This file
SORT.BAT - 2-line .BAT file
SORT-OUT.COM - Executable program
SORT-OUT.SCR - Source code in Forth screen file

EGA Required
Here is a truly sensational package which is intended to help you
understand the workings of a variety of different sorting
algorithms. As distributed, this package requires an EGA (or VGA)
video adapter.

Load graphics driver
Before running the program, SORT-OUT.COM, you must install the
memory-resident EGA graphics driver. This takes up about 8.5k
(you may wish to dig up the shareware TSR MARK/RELEASE routines
to allow you to get rid of the resident driver when you're done.)
Type EGAGRAPH to install the driver. Note: this program is
copyrighted by Laboratory Microsystems, but we have permission to
distribute it with the SORT-OUT package.

Screen file (*.SCR)
This program was written in Forth and compiled under Laboratory
Microsystems PC/Forth 3.2. The ZIP includes the Forth source code
as a "screen" file. These files are not usually viewable or
editable by typical PC software since they do not contain any
embedded CR/LF's. If you're interested, pick up a Forth compiler
from your favorite source (the ECFB has a variety of them
available) -- almost all Forths include a full-screen editor for
screen files.

The included file, PAPER.ASC, describes the function and sort
algorithms, but, alas, does not really give you instructions for
using the program. I have difficulty documenting my own software,
let alone someone else's, but will give you a few hints to get
you started:

1. Run EGAGRAPH. Run SORT-OUT. Note the introductory
instructions. Press Enter.

2. Select type - suggest you go for colored bars initially.

3. Select algorithm - choose your favorite. It's fun to compare
a quicksort to a bubble sort.

4. Define data - for openers, I'd suggest you stick with
multiplicity of 1 and %inversions = 50 (random). Don't take
the default; if so, you'll start out with already sorted

5. Run demo - press space or Enter to step through the sort;
any other key to run continuously to completion. Hit any key
when done to view performance indicators (number of
comparisons and interchanges).

If you have any other questions on Forth, you are welcome to drop
by the ECFB and leave a message there. Enjoy!

-- Jerry Shifrin

 January 8, 2018  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>