I-Ching.exe is a binary version of the ancient chinese oracle.
by
Brian Fitzgerald
I wrote this program over the course of three years, 1986-1989, learning Borland's Turbo Pascal as I went. As far as I know, it was the first software version of the ancient text. I released it as shareware originally, it's freeware now. A lot of love went into this little gizmo, and a lot of folks responded well to that. Even today, in a world which you would think DOS programs would have been relegated to the bit-bucket of history, I'll still receive an email or a piece of snailmail or the (very) occassional check from somebody who still uses it.
In late 2014 I got just such an email asking if I'd ever thought about turning it into an app. So I did. Taught myself enough Jquery and Cordova over the Christmas holidays to turn it into I-Ching: the App of Changes.
What follows here is a bit of the story of how the original came to be --a whistful reminiscence of a time when software development was simpler, when floppies were actually floppy, and when geeks strolled proud and alone the confines of their online world.
The story
The I-Ching found me through a girl, Maggie Condron, whom I was dating in college. She had an absolutely gorgeous hard-cover copy of the book, three real Chinese coins, and made quite an elaborate ceremony of consulting it. The book had a special pillow set up like an altar. There were candles, incense. I was skeptical about the whole thing, and raised a few Spockish Eyebrows, but the whole production was bewitching, and there was undeniable magic, even if the magic was nothing more than the good old alchemy of words.
I had rummaged around bookstores for a couple months trying to find my own copy, to no avail.
One day, Maggie and I were selling a bunch of used books at Second Story books in Washington, DC. Someone had just brought in a box before me which was still on the counter, unsorted. Lying on top was a mint condition copy of the Wilhelm-Baynes translation. Maggie looked at me with a cynicism-challenging smirk. I looked at my shoebox full of rat-eared paperbacks, picked up the beautiful hardbound I-ching and said "Trade?" It was one of synchronicity's finest hours.
When I started messing around with computers in the mid 80s, the parallels between the I-ching and software kept jumping out at me. Both are binary systems, built of ones and zeros and yesses and nos. 64 hexagrams, 64k memory, 512 texts etc etc -- it seemed the I-ching and computers were made for each other.
I was living in Italy when I found myself with a pirate version of Turbo Pascal (purchased from the Porta Portese market for the cost of the floppy), a 64K Compaq luggable, and time on my hands. I wrote my first tentative little bit of code to randomly generate six numbers, so I could cast the I-ching on the computer and look up the results in my book.
Pretty soon I had a plan to create a full-blown program complete with my own interpretations, a journal for storing answers to questions, a lookup table for finding texts by hexagram, a user-definable colour scheme, a graphical menu system, and all the bells and whistles you could ever want from a piece of mid-80s software.
I'd usually start coding around 7pm and hack away until well past midnight. Sometimes I'd spend the evening writing interpretations, sometimes it would be writing or debugging code.
As I got deeper into the code engine, I discovered things such as the anomaly of the coin flip. At first, I started coding three variables to behave just like a toss of three coins, which is one method of generating a hexagram. But then I realised that statistically, this really wasn't even a close apporximation of the more ancient "Yarrow Stalk" method. The coin method biased slightly away from changing lines (all heads or all tails on the three coins). So I wrote a procedure that took 64 variables, just like the 64 yarrow stalks, and sorted them back and forth in exactly the way an ancient chinese sage would have done.
The code
This little baby was a true 80s hepcat in usability terms. It used a clone of the VERY cutting edge Lotus 1-2-3 menu system which I had to constantly recode because I kept forgetting to count from 0 instead of 1. Learned a lot about arrays from that menu system.
My biggest constraint was it had to deliver on the media of the day, which meant I needed to cram more than 500 pages of text, plus far too many thousands of lines of code, onto a single 160k floppy disk. I brought it in at 155 zipped, a feat which still amazes me given some of the filesizes I was originally working with. The answer was my own compression engine. It became clear after I was about a quarter way through writing texts that I would never get all 512 pages down to size. Each of the hexagrams required the Judgment text, the Image text, and six pages of changing line text. Each page of text was around 125 words.
But I could store some of those words as abbreviations, and by storing such strings as "ing" and "ch" and "the" as single-byte tokens using the extended ASCII set, I could reduce thousands of instances of those strings from several letters to a single byte. I became a compression maniac, trying to find sources for whether the word "that" or "which" was more frequent in the language to know which I should encode into my precious but limited trove of 128 ASCII "Tokens." Then one day I realized that I was missing massive savings by looking at the English language and not looking at my source material. The I-Ching holds a litany of repeating phrases such as "It furthers one to cross the great water," and "Good fortune without blame." I could collapse those entire phrases into a single byte token. I ran the new code over the text and Whoompf! down came the filesize like a punctured balloon. I remember doing a little Eureka dance on the empty Via Marmarata as I walked home at 3am, my head still reeling with code.
The Program
I published the final version in 1989 via one of the shareware forums on Compuserve. In those days, that was pretty good distribution. I also sent copies high and wide to friends and threw a few into the market at Porta Portese. It never earned me more than a few hundred bucks, but I had lots of emails of appreciation and enjoyed seeing it get mentioned in various news groups and forums over the years. There were a couple requests and offers to help update it to a windows version, but I never got around to it. I still have most of the original source code, but one library got corrupted a couple decades ago, and the thing won't recompile anymore (which is why my address still reads as Italy in the closing panel.) Tauntingly, I have the full backup of the original work on a hard disk that came out of that old Compaq Sewing Machine it was written on, but in those days Compaq hard disks bore a proprietary BIOS wake-up routine, and the disk can't be accessed by slotting it into any other PC. So until I dig up a working Compaq Portable II on Ebay and can resurrect the disk, the oracle is locked against revisions.
The Original Documentation
Here's the original documenation, complete with ASCII art screenshots (remember, this was in the days of daisy wheel printers!), instructions for creating a batch file and installing in Desqview (hands up all of you Geeks who remember Desqview!), and a mention of a real cutting-edge feature: a PIF icon for running the program in DOS mode under Windows... 3.0! Oh man, does this make me feel OLD.
/--------------------------------------------------------------------------\
|************** ************** ****** ****** |
|************** ****** ****** ****** ****** |
|****** ****** ************** ****** ****** |
| /------------------------------------------\ |
| | /--------------\ | |
| | | I-CHING EXE | | |
| | \--------------/ | |
| | By Brian Fitzgerald | |
| | | |
|************** | This program is distributed as Shareware.|****** ****** |
|****** ****** | Please send appreciative gestures to: |************** |
|****** ****** | |************** |
| | Brian Fitzgerald | |
| | Via Sassone 1 | |
| | Paciano PG 06060 ITALY* | |
| | | |
| | You are free to copy and distribute | |
| | this original work. | |
| \------------------------------------------/ |
|****** ****** ****** ****** ************** |
|****** ****** ************** ************** |
|************** ****** ****** ************** |
\--------------------------------------------------------------------------/
I-CHING EXE
"Everything flows on and on like this river, without pause, day and night."
--Confucius
I-CHING EXE was written in Turbo Pascal 3.0 - 5.5 over the
course of more than three years. I hope you enjoy using it
as much as I enjoyed writing it. The documentation below
contains some useful information about the program.
I. The I-Ching: A five minute primer on a 4000 year old book.
II. Using the Program
A. Installation
1. Running from Floppy
2. Installing on a hard disk
3. Installing to MicroSoft Windows 3.0
4. Installing to Quarterdeck DESQview
B. The Main Screen (The Judgment)
C. The Menu
D. The Image Screen
E. Lines & Moving Menu Options
F. Journal
G. The Print Option
H. Color Change Option
I. Book: The Library of Hexagrams
J. New: Generating a Different Hexagram
K. Quit: Leaving I-CHING EXE
III. A Note on Methods of Consulting the I-Ching.
IV. Acknowledgments
I. The I-Ching: A five minute primer on a 4000 year old book.
The I-Ching or "Book of Changes" is an ancient Chinese oracle and
book of wisdom. It was used to describe the present, understand
the past, and predict the future in something close to its
present form as early as 600 BC. But elements of it appear in
China as early as the Hsia Dynasty (2205 - 1766 BC). Like The
Bible, the book is the result of a layering of many texts by many
authors (Confucius among them) and there is no widespread
agreement on its authorship or birthdate.
As the book passed down the millennia, it was used as many things
by many people: as a magic book of spells, a collection of
philosophical truths, and a handbook on statecraft. Carl Jung
believed it to be of great value both as a mirror to our own
subconscious and as an illustration of the Chinese belief in
synchronicity and non-causal relationships between psychic and
physical events. I hope all of these aspects survive in some
form or another in I-CHING EXE.
The I-Ching attempts a description of reality, of the dance of
objects and forces that make up the world and its history. It
presumes that once one has identified the forces at work in a
situation, it is possible to predict how that situation will
develop. To identify the forces at work, the ancients turned to
the magic of numbers, attempting by a random process of dividing
yarrow stalks to make apparent the invisible. Just as we in the
west today will casually refer to the favorable toss of a coin as
a "lucky" event, the mystics who created the I-Ching believed
they could read the forces at work in the larger universe by
their effect on a small ritual: A random division and
counting of stalks of the yarrow plant.
At the most basic level, the I-Ching posits a universe governed
by opposition: yin and yang, the light and the dark. Of these
all things are made. Light was considered to be "Strong" and
dark to be "Yielding." Yin was Masculine, yang Feminine. Yin
was creative, yang receptive. And within the play of these
forces was believed to lie the secret of all events, whether they
appeared random or the result of human will or natural
progression. The I-Ching attempts to describe the world of
birth, death, maturity, eating, drinking, sex, art, war, play,
marriage, career change, natural disaster, success, failure, the
climbing of mountains, the fall of governments, the hiring of
staff, the singing of music, etc etc etc, all in terms of the
interplay between the dichotomies of the strong and the yielding,
the dark and the light, the masculine and the feminine.
(It is oddly appropriate that this work should eventually
find its way into the realm of the computer, where all
information and activity is defined by the binary dance
between the forces of "On" and "Off")
To set up a "receiving device" to monitor these forces, the
ancient Chinese developed a system by which 49 yarrow stalks are
used to create one of 64 hexagrams. Hexagrams are groupings of
six "lines". Each line is either "Strong" or "Yielding"
depending on the numeric outcome of a ritualized sorting of the
stalks. A product of 7 was considered to represent strength,
represented as a solid line. A product of 8 was considered to
represent the "yielding", and was drawn as a line broken in the
middle. In its earliest incarnation, it is believed that
these lines signified "Yes" and "No" responses to a
question. (Numerologists, take note: squaring the strong 7
results in the number of stalks, 49. Squaring the yielding 8
results in the number of hexagrams, 64). Thus one hexagram would
look like this:
****** ****** 8
************** 7
****** ****** 8
************** 7
****** ****** 8
************** 7
The sorting of the yarrow stalks could result in two other
values, 6 and 9. These represented lines in transition from
strong to yielding or vice versa. They were also considered
extremely important as indicators of forces at work; they pointed
towards events or objects which were changing.
The sixty four hexagrams all describe conditions, forces,
relationships or objects. Their nature was believed to be
determined by the interaction between the upper and lower
trigrams or groupings of three lines, which in their turn
represented elemental forces and the following attributes:
The Creative, Heaven
The Receptive, Earth
The Clinging, Fire
The Abysmal, Water
The Arousing, Thunder
Keeping Still, Mountain
The Joyous, Lake
The Gentle, Wind
Each hexagram is associated with a text in the I-Ching. These
texts represent the answer to one's question or a description of
a situation and the forces affecting it. Each text is made up of
a Judgment, an Image, and texts for the individual lines. These
line-texts were significant only when a changing line (valued at
6 or 9) occurred in the particular line position. In addition,
when changing lines occurred in a hexagram, a transition was
imagined into another hexagram: the one resulting from inverting
the changing lines into their opposites (i.e. a strong, solid,
changing line would become a yielding, broken line, changing the
make up of the hexagram itself).
Each part of the text of the hexagrams was considered significant
in different realms. According to the simplest theory, the
Judgment answers a question or describes a situation. The Image
describes the forces at work that create a situation and counsels
the action (or inaction!) deemed appropriate. The line texts
describe changes, forces in transition, and generally offer
counsel. The transitions describe situations toward which the
present one tends. In suggesting correct behavior, it is worth
noting that as distinct from western, Christian tradition, there
is little talk in the I-Ching of Good and Evil. Rather,
moral "Value" is measured in terms of the superior and the
inferior. The wages of failure are not punishment, but
"Remorse" and "Humiliation."
A proper introduction to the history and philosophy of the I-
Ching would require megabytes of information. There are many good
books. My preferred source is the work of Richard Wilhelm, a
German scholar who lived in China in the early decades of the
twentieth century. His fascination and affection for the I-Ching
is obvious in all he wrote of it.
A detailed explanation of the yarrow stalk sorting method and its
implementation in I-CHING EXE follows at the end of this
document. It should be noted that while many of us in the West
learned to consult the I-Ching by tossing three coins in order to
randomly generate the numbers, the method is not statistically
equivalent in its results. I-CHING EXE implements only the
ancient yarrow stalk method.
II. Using the Program
A. Installation
I-CHING EXE is shipped in 3 files:
I-Ching.exe: 155 K Program file (compressed with PKLITE)
I-Ching.doc: This documentation
I-Ching.ico: Icon for running I-CHING EXE under windows.
Depending on how you received your copy, these may all
be zipped into a file called IChing.zip. If so, you
will need a copy of Phil Katz's PKUNZIP to decompress
these files.
1. TO RUN I-CHING EXE FROM A FLOPPY:
Place the floppy in drive A: or other floppy
drive.
Type A: at the DOS prompt followed by the
ENTER key to log on to drive A (or log on to
other floppy drive)
Type I-CHING and strike the ENTER key.
Now follow the instructions below under
A. Generating a Hexagram.
2. TO INSTALL I-CHING EXE ON A HARD DISK:
Type C: to log on to the C drive and press the
ENTER key (or log on to any other hard
drive)
Type MD\I-CHING and press the ENTER key. This
creates a directory called I-CHING where
you will store your files.
Type CD \I-CHING and press the ENTER key. This
makes the I-CHING directory current.
Place the floppy containing the I-CHING program
in the A drive or other floppy drive.
Type COPY A:I-CHING.* and press the ENTER key.
This will copy all of I-CHING EXE's files
into the I-CHING directory.
To run the program, type CD\I-CHING and press
the ENTER key. Then type I-CHING and press the
ENTER key again. You can save yourself typing
time each time you start I-CHING by writing a
batch file to change into the I-CHING directory
and run the program. See your DOS manual for
how to do this.
Now follow the instructions below under
A. Generating a Hexagram.
TECHNICAL NOTE FOR HARD-DISK USERS: If you wish to be
able to run I-ching from anywhere in your system, you
should remember that I-CHING EXE stores and looks for
files in the DOS-current directory. Don't put I-
CHING EXE on a pathed directory, but instead create a
batch file which changes into the same UNPATHED
directory every time to run I-CHING EXE. That way,
you won't lose your color changes or journal or
litter your disk with copies of the 3 files which I-
CHING EXE creates: Color.set, Journal.jrn, and
Lookup.jrn.
3. TO INSTALL I-CHING EXE UNDER MicroSoft WINDOWS 3.0:
Follow the steps for installing the program on
your hard disk, above.
Open the Pif editor by clicking on the PIF Editor Icon.
Fill in the Program Filename box with "I-CHING.EXE"
Fill in the Window Title box with "I-CHING EXE"
Skip the Optional Parameters box.
Fill in the Start-up Directory with
"C:\I-CHING" or the name of the
directory in which you have installed
I-CHING EXE.
Type "324" in the KB Required box.
Select the File menu from the top menu, select
SAVE, and name the file I-CHING.PIF.
Open the File group in which you would like to
install I-CHING EXE.
Select the File option. Click on "New".
Select "Program Item"
Type I-CHING EXE in the Descripton box. Type
"C:\I-CHING\I-CHING.PIF" in the Command
box.
Select "Change Icon"
Type "C:\I-Ching\I-Ching.ico" in the Icon name box.
Now follow the instructions below under
A. Generating a Hexagram.
4. INSTALLING I-CHING.EXE UNDER DESQVIEW
Follow the instructions under 2 above,
installing to hard disk.
Pop up the DesqView menu and select O to Open
Window. Type AP to Add a Program. Select O for
"Other". Type in the path \I-CHING. At the
program screen, type in the Program Name as
I-Ching.EXE, and change the Memory Size box to
324. Type IC in the "Keys to use" box, or
whatever combination of keys you want to start
the program with. Under OPTIONS, make sure that
the "Writes Text directly to the Screen" option
is set to yes (this is the default value).
Under "Virtualize Text/Graphics", CHANGE THIS
OPTION TO NO. Failure to change this option
will result in some minor, but annoying
behaviors when running the program under
DESQview. Strike ENTER to log the new
information. You can now run the program under
DESQview. (You can keep it open in its own
window primed for quick decision making!)
Now follow the instructions below under
A. Generating a Hexagram.
A. Generating a Hexagram
After the sign-on screen pops up, a text bar will ask if
you wish to record a question. Typing a "Y" will bring
up a text box in which you can write your question. Any
other key will be taken as a "No." If you do type a
question, it should be limited to 60 characters. That
is, it should fit in the box. Longer questions will be
truncated for storage. The question will appear on the
top line of the text screens after you have generated a
hexagram, and can be stored along with the resulting
hexagram in your journal. You will be given the option
of changing your question before storing it.
*****************************************************
If you wish to go directly to the library of all
possible hexagrams rather than consult the oracle,
strike "L" in response to the prompt, "Do You Wish To
Record a Question?"
*****************************************************
Once you have either declined to record a question or
typed one in, the screen will change to display a boxed,
running number in the lower right-hand part of the
screen. This number is the result of the program's
rapid imitation of the ancient yarrow stalk method of
consulting the I-Ching. Just as if you were sorting the
pile of 49 stalks bundle by bundle, the resulting number
will always be 6,7,8, or 9. These numbers flip by in a
rapid random succession. Striking the ENTER key stops the
computer at the end of a complete sort, which assigns a
number to the particular line. Again, as described in
the ancient method, the first line generated is the
bottom line of the hexagram. In the center of the
screen, the graphic representation of the line as
Solid, Broken, Solid Moving, or Broken Moving
appears.
A "Changing" or "Moving" Line is one which is generated
by a 6 or a 9. In the default color set, it should
appear as a green line (darker than regular lines on a
monochrome screen). These lines are considered in
transition from broken to solid or vice-versa. They
have a special meaning within each hexagram (see
documentation of the "Lines" and "Moving" menu items
below).
Continue striking the ENTER until you have completed the
hexagram by generating six lines. The hexagram will now
remain on screen until you hit any key to view the text
of the hexagram's judgment. The hexagram will move up
into the upper left hand corner of the monitor, and the
Judgment screen will appear.
*******************************************************
If you want to look up a particular pattern of lines,
you may force the generation of strong and yielding
lines by striking the "S" and "Y" keys respectively to
generate the lines. The lines so generated will all be
changing, allowing you to research particular line
texts.
*******************************************************
B. The Main Screen (The Judgment)
/------1-------\/------------------------------------------------------------\
|**************||UPPER TRIGRAM: Animal: Attribute: Symbol: |
|**************||M Chien Horse Strong Ice |
|**************|| The Creative |
|**************||LOWER TRIGRAM: Animal: Attribute: Symbol: |
|**************||M Chien Horse Strong Ice |
|**************|| The Creative |
\--------------/\------------------------------------------------------------/
/ Chien, The Creative -------------------------------------------------------\
| The Creative works sublime success, |
| Furthering perseverance. |
| * |
| The beginning of all things lies still in the beyond--in the form |
| of ideas that have yet to become real. The Creative brings them |
| forth. The wise one mounts the six steps toward heaven as if |
| they were six dragons. The duration of time is the power |
| inherent in the Creative: it is no hindrance, but the means of |
| making actual what is yet potential. |
| |
| |
| |
| |
\----------------------------------------------------------------------------/
Image Lines Moving Journal Print Colors Book New Quit
The Main Screen or the Top Menu of the program is
divided into four main areas: The Hexagram picture in
upper left, the Trigram Information at upper right, the
Judgment Text box at the center of the screen, and the
menu of choices below it.
The hexagram picture at upper left is the same as the
one generated in the previous screen, but smaller. The
hexagram's number appears at the top of the box. It is
one of 64 possible combinations and follows the
numbering of the Wilhelm/Baynes translation of the Book
of Changes.
At the top of the box to the right will appear the
Question, if any, which you asked at the outset. The
information in the box below it concerns the "Trigrams",
which are the two sets of three lines which make up the
hexagram.
Every trigram is either Male or Female, Strong or
Yielding, and it is the dynamic interaction between the
upper and lower trigrams which give each hexagram
its identity and meaning. The information included
in the Judgment screen about each trigram concerns
its name, the Animal, Attribute, and Symbol with
which it is associated. More information about the
trigrams is included on the Image screen.
In the upper left hand corner of the large box in the
center of the screen appears the name of the hexagram.
Within the box is the text of what is called the
hexagram's "Judgment." This is the oracle's answer to
your question, or a description of the situation posed
by your question. The actual text of the hexagram as
translated from the Chinese appears above the asterisk.
It should be noted that I have left the text as
translated by Wilhelm/Baynes in its original form. The
neuter pronouns are masculine, and the texts counsel
action by holding up the paradigm of "The Superior Man."
Below the asterisk appears a modern interpretation of
the text, written by myself and drawing from Wilhelm, as
well as sources as varied as T.S. Eliot and the Grateful
Dead. In the interpretations, I have attempted to avoid
a default male orientation, and tried to keep to the
advice of Casey Miller and Kate Smith, as presented in
"The Handbook of Non-Sexist Writing." To readers
unaccustomed with the sensible suggestions of this work,
the use of plural neuter pronouns ("they" and "their")
instead of "he" and "his" may seem a bit clunky. Tough.
The Judgment counsels action or inaction in many forms.
"Crossing the Great Water", "Having somewhere to go",
"Undertaking something", "Seeing the Great Man," and
"Perseverance" are among the paths which, if pursued or
not pursued as the case may be, will result in "Good
Fortune" or "Misfortune", "Blame" or "No Blame",
"Success" or "No Success." "Remorse" and "Humiliation"
are used as signposts of a wrong path taken. The text
will usually counsel actions which will bring a return
to the correct way. As with any good oracle, answers
seldom appear in black and white. A good answer is one
which causes the questioner to reflect upon their
question and see an answer for themselves. The depth of
the I-Ching's imagery in our collective psyche, despite
centuries of distance and cultural differences, is what
provides it with a sometimes eerie capability of
appearing to speak to our questions directly.
C. The Menu
A menu appears at the bottom of the screen with the
following choices:
====================================================================
Image Lines Moving Journal Print Colors Book New Quit
====================================================================
The highlighted choice will execute when the ENTER
key is struck. You can move the highlight box
through the choices with the arrow or tab keys, or
select menu choices by striking the first letter of the
menu choice, e.g. "P" to bring up the Print Screen.
**********************************************************
IN ADDITION TO THE MENU OPTIONS AT THE BOTTOM OF THE
SCREEN, TWO FUNCTION KEYS ARE SUPPORTED FOR OPERATION AT
ALMOST ANY TIME. THESE ARE:
F1: CALLS UP CONTEXT-SENSITIVE HELP.
F10: IMMEDIATELY EXITS PROGRAM AND CLEARS THE SCREEN.
**********************************************************
D. The Image Screen
In the Book of Changes, the Image texts form an
explanation of each hexagram in terms of the interaction
of the natural forces represented by the lines and
trigrams. The Image is a representation of a condition
of heaven or earth, the dark or the light, the strong or
the yielding. The Image describes a situation before
change or action have taken place.
When you select the "Image" option at the main menu,
note that the information in the Trigram box changes to
reveal the Image, Family, and Season of the upper and
lower trigrams.
As with the Judgment, the ancient text appears above the
asterisk with a modern interpretation below. Note that
the Hexagram's Image is always a product of the two
trigrams which form it: Wind over Wood, The Creative
over The Abysmal, etc. According to the book of
changes, all conditions of heaven and earth could be
described by the interaction of the eight forces
represented by the trigrams. Likewise, each of these
forces is the product of an interaction between the two
elemental forces, the Light and the Dark, represented by
the solid and broken lines which make up each trigram.
For anyone interested in the inner workings of the I-
Ching, the trigrams are extremely important. It is well
worth reading the Ta Chuan or Great Treatise in the
Wilhelm/Baynes translation. It will also interest you
to consult the texts of the hexagrams made up of the
doubled trigrams:
The Creative 1
The Receptive 2
The Abysmal 29
The Clinging 30
The Arousing 51
Keeping Still 52
The Gentle 57
The Joyous 58
The menu below the Image screen contains only one
choice, "Main." Striking the ENTER key or choosing
"M" will return you to the Main screen, the
Judgment.
E. Lines & Moving Menu Options
When a line is generated by a number 6 or a number 9, it
is considered a "Moving" or "Changing" line. If the
hexagram you have generated contains moving lines, they
will appear in Green or as darker lines in the picture
of the hexagram at the upper left of the screen.
TECHNICAL NOTE: If the color of the changing lines is
not distinguishable from that of the "normal" or
"firm" lines on your screen, reset the default
colors to a custom set by choosing the "Colors"
option from the main menu. But remember that not
every hexagram necessarily contains changing
lines. The Colors menu option displays examples
which you can check.
Changing or Moving lines affect the reading of the
hexagram in two ways.
First, it means an additional text should be consulted.
Aside from the Judgment and Image texts, an entire body
of writing exists within the book of changes to cover
the special case of a changing line appearing in any
position in a hexagram. They point to particular
aspects of the situation which are poised at the brink
of action or transformation, or council particular
advice. To read the applicable texts, select the
"Lines" menu option.
If your hexagram is made up of all firm lines, the
Lines and Moving menu options serve no purpose, and will
report that your hexagram contains no moving lines.
When you choose the "Lines" menu option and your
hexagram does include moving lines, a pointer will
appear in the picture of the hexagram at upper left
indicating the first moving line. The main text box
will blank and then reveal the text for the particular
line. The menu options will switch to "Next" "Previous"
and "Return." Strike "Next" to view the text of the
next changing line, if any. The pointer will move up to
the next line, and the new text will appear in the text
box. You can move backwards and forwards through the
changing lines with "Next" and "Previous." "Return"
will bring you back to the main menu.
The second way in which moving lines affect your reading
is this: they indicate another significant hexagram, one
which results from transforming each moving line into
its opposite. That is, a hexagram containing one
moving broken line suggests a second trigram with a
solid line in the same position. I-CHING EXE
automatically calculates the new hexagram. You can view
the text by choosing the "Moving" option at the main
menu.
If your hexagram does contain moving lines, the "Moving"
option will reverse the changing lines, display the new
hexagram in the upper left-hand corner and refresh the
trigram and judgment information to correspond to the
new hexagram. The hexagram's number at upper left is
enclosed in
to remind you that it is a
moving hexagram, not the original.
The moving hexagram describes the situation which is
developing: it may be a description of what will happen
or what may happen. It might describe a result of
taking or ignoring the oracle's advice. It may suggest
a correct road or a wrong road. (In the oracle biz,
ambiguity is golden.)
The texts of individual lines are ignored in a hexagram
transformed by moving lines. Therefore, the menu bar
for a Moving hexagram only allows you to investigate the
text of the "Image" or to return to the main menu of the
"Original" hexagram.
F. Journal
The Journal option allows you to store and review
questions and the hexagrams that resulted from
consulting I-CHING EXE. When you move the highlight
over the "Journal" option or strike a "J" at the main
menu, a box appears asking if you wish to save your
current hexagram to the file.
If you have already saved entries into the journal, you
may decline to save the current hexagram and move
directly to review of older questions.
If, on the other hand, you wish to save your current
question and hexagram to the journal, type "Y" and
ENTER. The program will then ask if you wish to
revise your question. You may wish at this point to add
a short comment or revise your question entirely. In
either case, answer "Y" ENTER again and retype the
line you wish to be stored with this hexagram. You may
backspace over mistakes. When finished, strike ENTER.
The next screen you see will be the first page of the
journal, which lists the date on which you generated a
particular hexagram, the hexagram number, and the
question or comment you stored with it.
TECHNICAL NOTE: The journal reads your computer's system
date in storing information. If your computer's
clock is not battery driven, accurate, working, or
you never bother with it (for shame), but you want
an accurate date in the journal, use an ASCII text
editor to edit the date, as found in the file
Journal.jrn. Do NOT change the length of the line
previous to the question text, however. Dragons
will result.
You may move up and down through the entries with the up
and down arrow keys and the page up and page down keys.
Striking the ENTER key will call up the highlighted
hexagram and question. The Escape key will allow you to
exit the program. NOTE: Pressing the Escape key will
bring up a box which asks if you really want to exit.
If you answer NO at this point, the program will loop
back to the point where you generate a new hexagram. In
this way, you can view a new hexagram, then return to
any point in the program you like. The Journal is made
up of saved entries when you look at it, and you will
not loose any data by exiting in any manner from the
Journal screen, including a reboot.
The review screen for the saved hexagrams is identical
to that for new hexagrams with one exception. In place
of the "Journal" option at the main menu is an item
called "Return." When selected, it moves you back to
the Journal screen at the point you left it.
TECHNICAL NOTES: The Journal entries are stored in a
file called "Journal.jrn". This file is written to
the DOS CURRENT DIRECTORY, which is not necessarily
the directory where the file I-CHING EXE resides. If
you are saving journal entries, but not finding them
in subsequent sessions, chances are you are running
I-CHING EXE in a pathed directory. This means, for
example, that your copy of I-CHING EXE may be in the
root directory of the c: drive, C:\. If your
AUTOEXEC.BAT file contains a "PATH =" statement which
includes C:\, you can run the program by typing I-
Ching from anywhere on your hard disk, e.g. in the
C:\TEXT directory. Normally, that would be great!
You can run I-CHING EXE from anywhere. But there's a
tradeoff. If you run the program from C:\TEXT and
save an entry to your journal, the file JOURNAL.JRN
will be saved in the directory C:\TEXT. I-CHING EXE
won't know where to find that file if you run the
program next time from C:\UTILITIES. Always run I-
CHING EXE from the same directory. See the TECHNICAL
NOTE under "II. Using the Program" for how to do
this.
EDITING THE JOURNAL: Journal.JRN can be edited with
any ASCII editor if you wish. The string of six
numbers to the left of each entry represent the
numbers of the hexagram lines from bottom to top. Be
careful not to add extra carriage returns at the end
of the file if you do edit it. These will appear as
blank lines on the Journal screen and will thoroughly
confuse I-CHING EXE if they are selected for review.
Also, as noted above, do not change the length of the
line previous to the question text. I-CHING EXE
assumes the question text always begins in the 23rd
column.
JOURNAL LIMITATIONS: The journal will hold up to 128
entries. After that, you'll have to either delete
entries from the file Journal.jrn with any ASCII
editor, or rename Journal.jrn to something else
(Journal.old, e.g.). This will force the creation of
a new file by I-CHING EXE, which will open a new
Journal.jrn if it does not find an existing file of
that name in the current directory.
G. The Print Option
The Print option will allow you to print a picture of
the hexagram, the Judgment, Image, and Lines to a line
printer connected to LPT1: or to a text file.
After selecting the Print option from the main menu, you
will be presented with a box in which you can:
o Type a valid file name. (I-CHING EXE automatically
checks to see if the file exists. If so, you are
provided the option of overwriting the file, appending
new information, or choosing a new file name.)
o Type the letter P to send output to a plain vanilla
lineprinter hooked up to LPT1: (Sorry gang, no frills
here. If your printer is connected to COM1 or you want
fancy output, print to a disk file then edit it with
your favorite word processor.)
o Type a carriage return on a blank line to cancel
print.
The printed output indicates changing lines in the
following manner:
Strong, changing line => ********O********
*****************
****** ******
*****************
Yielding, changing line => ****** X ******
*****************
H. Color Change Option
You can adjust the colors of most of the texts, frames,
and lines in the program with the "Colors" option.
The most important color differentiation is between a
"normal" or "firm" line and a moving line. Examples of
each appear in the upper left of the Colors Menu Screen.
To change the color of the moving line, use the down key
to move to the "Hexagram Moving Line" Item. Now use the
Left-Right keys to move to a color different from the
"Hexagram Line Color" item above it. When you have the
arrow in position, strike the ENTER key. The example in
the upper left and the descriptive text in the center
screen will both shift to the new color.
You can change the color of any of the items listed in
the center screen using the method above. The
headings "Judgment Texts", "Image Texts", "Line
Texts", and "Transformed Hexagram Texts" are displayed
in the color in which the texts themselves will
appear.
If you have a particularly poor monochrome monitor that
will not show a marked difference in colors, use the "B"
option to make the changing lines Blink. Position the
two arrows as above, then press "B" instead of the
ENTER key. Switch off a blinking color with "O" for Off.
Strike "Q" to Quit the colors menu. You will be asked
if you wish to make your changes permanent. If you
answer Yes, I-CHING EXE will write a small file called
"Color.set" to the current directory. Each time you
restart I-CHING EXE, the program checks the current
directory for this file. If it finds it, the new colors
are loaded with the program.
If you wish to restore the original colors with
which I-CHING EXE was shipped, choose the COLORS
option from the main menu and type "Q" to quit.
Answer with the letter "D" to the question "Make
these changes permanent?" and the default color set
will be restored.
I. Book: The Library of Hexagrams
One of the best features of I-CHING EXE is the "Book"
option, which contains the complete texts of all 64
hexagrams and their changing lines.
After selecting the "Book" option, you can move through
the possible hexagrams with the up, down, page up and
page down keys. Striking the ENTER key brings up the
judgment of the hexagram.
The menu items remain the same for hexagrams generated
with the Book option, with the exception that "Return"
replaces the Book option itself, and will return you to
the Book at the place you left.
*****************************************************
Thanks to Frank H. Carr for the handy point-and-shoot
menu he wrote in Turbo Pascal. He saved me enough
coding time to buy him lunch.
*****************************************************
J. New: Generating a Different Hexagram
If you wish to ask another question, or generate a new
hexagram, the "New" option will loop you back to the
beginning of the program. Your current question and
hexagram will not be saved, so be sure to save them with
the "Journal" option before using New if you want to
keep your current hexagram and question.
K. Quit: Leaving I-CHING EXE
Quit will exit you from the program. It does not prompt
you to save your hexagram or question, so make sure you
save them with the "Journal" option before quitting.
The "FAST" way out of the program is to use the F10 key
from any point. This is the "BOSS" key and will
immediately drop you out of the program and clear the
screen.
III. A note on Methods of consulting the I-Ching.
Here follows the manner in which the I-Ching was consulted by
using the yarrow stalk method. An abstraction of the same method
is used inside the programming code of I-CHING EXE.
Take 49 stalks.
Randomly separate them into two piles, East and West.
Take one stalk from the West heap and hold it between
thumb and forefinger of your left hand.
Take stalks in groups of four from the East pile, until
four or fewer stalks remain. Keep this remainder,
place it between the ring and middle finger of the
left hand.
Take stalks in groups of four from the West pile until
four or fewer stalks remain. Keep this remainder,
and place it between the middle and forefingers of
the left hand.
Your left hand now holds a sum of stalks equal to 9 or
5, being made up of one of the following
possibilities:
1+1+3=5
1+2+2=5
1+3+1=5
1+4+4=9
If the number of stalks is nine, a value of 2 is
assigned to this counting. If it was five, the
number three is assigned. The 9 or 5 stalks are
put aside.
The rest of the stalks (40 or 44 by now) are again
divided into two piles and counted off as above.
The possible outcomes this time are:
1+1+2=4
1+2+1=4
1+3+4=8
1+4+3=8
This time, an 8 stalk remainder is assigned the number
2. A 4 stalk remainder receives a 3. The four or
eight stalks are set aside, and the remaining 36,
40, 32, or 38 stalks are again divided in two and
counted off. The possibilities are again:
1+1+2=4
1+2+1=4
1+3+4=8
1+4+3=8
And again a remainder of 8 is valued at 2, a remainder
of 4 at 3.
From these three operations result the following
possibilities:
2+2+3=7
2+3+3=8
2+3+2=7
2+2+2=6
3+2+2=7
3+3+2=8
3+2+3=8
3+3+3=9
It is these results which determine whether a line is
solid or broken. A 7 meant a strong, solid line.
An 8 meant a yielding, broken line. A 9 was
considered a strong moving toward yielding line. A
6 was a yielding moving toward strong line.
By repeating the above process six times, a hexagram was
built up from the bottom.
Like most westerners exposed to the I-Ching, I was
taught the coin method of generating a line, which is
far easier than the method above. By this method, three
coins are tossed. Heads are worth 2, tails 3. The
possibilities were thus:
Head+Head+Head=6
Head+Head+Tail=7
Head+Tail+Tail=8
Tail+Tail+Tail=9
This means, however, a slight difference in
probabilities from the yarrow stalk method. The chance
of any one coin being head or tail is ALWAYS 50/50.
However, the chance of a "Tail" on the first "Toss" in
the yarrow stalk method is almost 3 to 1. Recall, the
possible results for the first division of 49 stalks was
this:
1+1+3=5 (Value 3)
1+2+2=5 (Value 3)
1+3+1=5 (Value 3)
1+4+4=9 (Value 2)
Of four possible outcomes, three of them result in a 5,
only one in a 9. This means, in effect, that when we
look to the lines, those generated by a 2 in the first
place are less likely to occur than those that start
with a 3:
Less likely:
2+2+3=7 (Strong)
2+3+3=8 (Yielding)
2+3+2=7 (Strong)
2+2+2=6 (Yielding Changing)
More likely:
3+2+2=7 (Strong)
3+3+2=8 (Yielding)
3+2+3=8 (Yielding)
3+3+3=9 (Strong Changing)
It therefore makes sense that Yielding lines are slightly
more likely to show up than Strong lines, and that a
yielding changing line is the least likely all possible
combinations to turn up. This is because unlike the
regular yielding and strong lines, the changing lines
are each generated by only one possible combination of
stalks. The yielding, changing combination, because it
begins with 2, is therefore heavily disfavored over the
strong changing line.
Which is all just to say that the coin method does not
hold the same built-in bias that the yarrow stalk method
has. Surely note must have been made by the ancients
that a 6 was a relatively rare occurrence indeed. Certainly,
anyone in frequent consultation with the book by the
yarrow stalk method would have noted the anomaly. I
noticed the reticence of 6 after many many runs of the
developing program and thought my coding was somehow
flawed. But no! Perseverance furthers. No Blame.
================================================================
IV. Acknowledgments
I-CHING EXE comes bundled with the following THANKS:
****** ******
Cornelia Durrant & Elaine Lawrence for the original "Hey,
wouldn't it be great..." idea.
**************
Duncan Currie: for sound advice in matters ranging from multiple
arrays to single malts. Also for alpha testing
and organic pest control.
****** ******
Martha Muldoon: For help with the typing, and cookies.
**************
Peter Morris: For illuminating the Tao of Programming: "The Way
which can be coded is not the constant Way."
****** ******
Maggie Condron: For putting me in the path of the book.
**************
Orlando Serani: For being the computer genius "what" he is and
for his infinite patience with the boundless
ignorance of Nirvana Geeks.
****** ******
**************
****** ******
**************
****** ******
**************
[ENDS]
I Ching resources:
The I-Ching on the Net
I-Ching Bookmarks