This program implements an I Ching divination oracle that generates and interprets hexagrams using a binary random number method. Six lines are produced by repeatedly calling INT(2*RND), storing each result in array a(6); the six bits are then combined with the formula c = c + a(i)*2^(i-1) to derive a decimal index (0–63) that selects one of 64 DATA records, each containing a hexagram name and interpretive text. The program includes an extensive introductory tutorial covering the history, philosophy, and mathematics of the I Ching, including its connection to Leibniz’s binary notation. A “moving lines” feature (triggered by pressing C) probabilistically mutates the hexagram—stable Yang lines change with probability 3/16 and stable Yin lines with probability 1/16 plus a rare additional chance—to produce a second hexagram per traditional yarrow-stalk ratios. Hexagram lines are displayed graphically using two string variables, m$ (solid line) and n$ (broken line), built from block graphics characters.
Program Structure
The program is divided into several logical sections:
- Lines 1–5: Bootstrap —
RUN 2000at line 1 jumps to the tutorial introduction; line 3 is the main entry point jumped to after the tutorial completes. - Lines 20–301: Hexagram generation loop — rolls six binary digits into array
a(6)and accumulates the binary value intoc. - Lines 315–840: Display logic — prints the hexagram graphic and its text, then handles keypress branching (Z=copy, N=new hexagram, C=change hexagram).
- Lines 900–980: Subroutines —
GO SUB 900performs aRESTOREto the correct DATA offset and readsb$(name) andt$(interpretation); lines 945–980 implement the moving-lines mutation. - Lines 1000–1630: 64 DATA records, each at a line numbered
1000 + hexagram_index*10. - Lines 2000–2190: Tutorial introduction with historical and philosophical background, trigram display, and instructions.
- Lines 7000, 9000–9010: Entry-point bridge and save/verify utility;
9010is a “press any key” subroutine used throughout the tutorial.
Hexagram Encoding and DATA Addressing
Each of the 64 hexagrams is assigned an index c derived by treating the six binary dice rolls as bits of a binary number:
c = 0 + a(1)*2^0 + a(2)*2^1 + ... + a(6)*2^5
This gives values 0–63. The corresponding DATA statement is placed at line c*10 + 1000. The subroutine at line 900 uses RESTORE c*10+1000 to jump directly to the correct record, then reads two strings: the hexagram name into b$ and the interpretive paragraph into t$. This is an elegant use of computed RESTORE as a random-access data lookup without any searching loop.
Moving Lines Feature
When the user presses C, the routine at lines 945–980 resets c to 0 and iterates over all six lines to compute a changed hexagram:
- If
a(i) = 0(Yin line): the line stays Yin unlessRND < 1/16, in which case it becomes Yang. The expression(NOT PI OR (RND < 1/16))evaluates to 0 OR boolean, which equals 0 or 1. - If
a(i) = 1(Yang line): the line changes to Yin ifRND <= 3/16, i.e.,A(I) = RND > 3/16, which yields 0 (Yin) with probability 3/16.
These probabilities mirror the traditional yarrow-stalk method: a moving Yang line occurs with probability 3/16 and a moving Yin line with probability 1/16, as stated in the program’s own instructions at line 2175.
Graphics Representation
Two string variables render the hexagram lines on screen:
| Variable | Content | Represents |
|---|---|---|
m$ |
Block graphic full solid bar | Yang (unbroken line) |
n$ |
Solid bar with gap in center | Yin (broken line) |
These are initialized at lines 2040–2041 using block graphic escape sequences. The subroutine at line 1006–1008 prints the appropriate string at a computed screen row (18 - i*2), building the hexagram bottom-up as is traditional.
Key BASIC Idioms
NOT PIis used pervasively as a portable zero: sincePIis nonzero,NOT PIevaluates to 0. This avoids the digit0in contexts whereVAL "0"would be more verbose.VAL "number"is used throughout for literal integers — a standard memory-saving technique that stores numbers as strings rather than as 5-byte floating-point values in the BASIC line.PAUSE NOT PI: IF INKEY$ = "Z" THEN COPYat line 350 uses the PAUSE 0 + INKEY$ idiom correctly to wait for a keypress and conditionally trigger a screen print.- Line 1 (
RUN 2000) redirects execution to the tutorial on initial load, while line 3 is the re-entry point for subsequent hexagram draws — a common two-entry-point pattern.
Display and Color Management
The program makes deliberate use of color attributes. Line 1005 sets INK 7, BORDER 2, PAPER 2 (white on red) for the hexagram display. Lines 351 and 400 switch to BORDER 6, PAPER 6, INK 1 (blue on yellow) for the text screen. The tutorial at line 2005 uses BORDER 0, PAPER 0, INK 6 (yellow on black). INK changes mid-print (e.g., INK 5 for trigram graphics, INK 6 for descriptive text) are embedded directly in PRINT statements.
Bugs and Anomalies
- Moving-lines logic (line 950): The expression
(NOT PI OR (RND < 1/16))usesORas a bitwise operator on 0 and a boolean. SinceNOT PI = 0, this reduces to0 OR bool, which works correctly to produce 0 or 1. However, the intent would be clearer as a simple conditional. - Only one DATA record shown: Only line 1000 (K’UN) is present as a full example in the visible listing; the other 63 hexagrams at lines 1010–1630 are present, but the DATA at line 1000 corresponds to hexagram index 0 (all Yin lines), not the traditional first hexagram CH’IEN (all Yang, index 63).
- Typos in DATA text: Several DATA strings contain typographical errors (e.g., “problms”, “sacrafice”, “perservering”, “recomended”, “innovaitons”, “condiion”) that appear to be original authoring errors rather than transcription artifacts.
- Line 2175 references specific hardware by name in a PRINT statement within the tutorial text, which is present in the DATA rather than in an analyzable BASIC expression.
- Line 9000 contains a
SAVEfollowed byVERIFYandBEEPcalls — this is a utility save-and-verify line not reached in normal program flow.
Content
Source Code
1 RUN 2000
3 GO SUB VAL "1005"
5 POKE VAL "23658", VAL "8"
20 DIM a(VAL "6")
31 LET c= NOT PI
41 RANDOMIZE
71 FOR I= VAL "1" TO VAL "6"
72 INK NOT PI
81 LET a(i)= INT (VAL "2"* RND)
91 PAUSE VAL "30"
100 GO SUB VAL "1006"
150 REM ***C=VAL OF DATA LINE #**
151 LET c=c+a(i)* VAL "2"^(i- VAL "1")
301 NEXT I
315 GO SUB VAL "900"
325 PRINT AT VAL "1", NOT PI; INK VAL "7";b$;
330 PRINT # NOT PI;" Press any key to continue "
350 PAUSE NOT PI:IF INKEY$="Z" THEN COPY
351 BORDER VAL "6":PAPER VAL "6":INK VAL "1":CLS
400 PRINT AT NOT PI, NOT PI; INK NOT PI; INVERSE VAL "1";b$;" ";''
401 PRINT ''t$
402 PRINT # NOT PI;" Press any key to continue "
405 PAUSE NOT PI
406 IF INKEY$="Z" THEN COPY
410 IF INKEY$="N" THEN GO TO VAL "3"
415 IF INKEY$="C" THEN GO TO VAL "945"
420 CLS :GO SUB VAL "1005"
800 FOR i= VAL "1" TO VAL "6"
805 :INK NOT PI
810 GO SUB VAL "1006"
830 NEXT i
835 GO SUB VAL "900"
840 GO TO VAL "325"
900 RESTORE c* VAL "10"+ VAL "1000":READ b$:READ t$:RETURN
945 LET C= NOT PI
946 FOR I= VAL "1" TO VAL "6"
950 IF A(I)= NOT PI THEN LET A(I)=(NOT PI OR (RND< VAL "1"/ VAL "16")):GO TO VAL "970"
960 LET A(I)= RND> VAL "3"/ VAL "16"
970 LET c=c+a(i)* VAL "2"^(i- VAL "1")
975 NEXT I
980 GO TO VAL "420"
1000 DATA "K'UN QUIESCENCE", "This hexagram represents supreme success. Like the mare which is strong, steadfast, and docile,the superior man does nottake the initiave but faithfullyserves those who can best use his talents. There will be some advantage in finding friends in the south and west, and in losing friends in the north and east. In quiet persistence lies good fortune."
1005 INK VAL "7":BORDER VAL "2":PAPER VAL "2":CLS :RETURN
1006 IF a(i)= VAL "1" THEN PRINT AT VAL "18"-I* VAL "2", VAL "8";m$
1007 IF a(i)= NOT PI THEN PRINT AT VAL "18"-I* VAL "2", VAL "8";n$
1008 RETURN
1010 DATA "FU RETURNING","Returning. Freedom and progress lie ahead. The superior man can come and go without being opposed, friends come to see himand after a week return without hindrance. Movement in any direction will be of advantage. The strong line of the hexagram indicates progress and progressive trends. Change is the law of nature and societywhen decay reaches it's climax, recovery must then occur."
1020 DATA "SHIH THE ARMY","This hexagram consists of the trigrams K'UN which represents the earth and responsivenes overK'AN which represents water and danger. The Army implies that with firm certitude and correctness, for an experienced leader there will be good fortune and few problms. The superior man nourishes and educates those around him collecting an army of followers as a result. A wise leader does not abuse power and by being guided by moral principles gainsthe honor and respect of all."
1030 DATA "LIN GETTING AHEAD","Getting ahead indicates that there will be great progress andsuccess. Firm correctness will be an advantage. In the 8th month there may be evil. The lower trigram TIU signifies pleasure and the upper one, K'UNcompliance. Authority approachesto inspect, to comfort and to rule. Actions may be successful but it should be borne in mind that everything is subject to change and that progress will eventually give way to decay. Remember this when you make plans for the future."
1040 DATA "CH'IEN MODESTY","Modesty brings progress and success. The superior man, though strong, cultivates humility and attains continuing good fortune. It is the way of Heaven to diminish the full and enlarge the modest. It is the way of Earth to overthrow the full and replenish the modest. Humility displayed in positions of honour increase that honour; displayed in one of a lowly position, men will not seek to brush him aside. Modesty brings good fortune to a man in all of his undertakings."
1050 DATA "MING I HIDING OF THE LIGHT","In times of difficulty it is to one's advantage to remain firm and steadfast in one's actions. The brightness of LI, fire, enters into the midst of the earth K'UN. The lower trigram denotes one who is intelligent and accomplished, the upper, onewho is docile and submissive. Toturn adversities to advantages one must remain true to his personal values."
1060 DATA "SHENG ASCENDING","Ascending signifies great progress and success. One need not suffer anxiety when seeking and interview with the great. Proceding towards the south willbe fortunate. The south is the region of warmth and joyful activity. Modesty will bring recognition from those in important and influential positions."
1070 DATA "T'AI PEACE","The small departs and the great approaches. There will be great good fortune, progress and success. There will be peace forall. This hexagram shows heaven and earth in close communion with one another. It is a symbolof the kind of success that can be attained when people of different backgrounds are unitedwith a single aim."
1080 DATA "YU CALM CONFIDENCE","Here the strong line gains the response of all the others, and everything willed can be carriedout. Calm confidence results in actions which are in accord withthe ways of heaven and earth. Like the sun and the moon which do not stray from their orbits and the four seasons which do not stray from their appointed order, the prevailing condiion of harmony and contentment imply a time when important decisions are made and importantinnovaitons begun. Great indeed is the time indicated by this hexagram."
1090 DATA "CHEN THUNDER","Thunder signifies movement and success. The feelings of dread which it inspires leads to happiness, because it's fearful upheavel is the prelude to a state of calm order. A superior man is aware of the dangers of the time but self-possession andconcentration upon what is really important will ensure that he prevails. While he may be fearful as are others he cultivates his virtues and examines his faults. A good fortune will follow correct action."
1100 DATA "HSIEH ESCAPE","Here the trigram depicting danger is confronted by that depicting powerful arousal. By movement there is an escape from peril. Advantage will be found in the south and west. If no further expeditons are calledfor, good fortune will come fromreturning home to follow the ballanced way. Early completion of urget tasks will ensure success. Thunder, CHEN, and rainK'AN bring release. The superiorman forgives errors and deals gently with crimes."
1110 DATA "KUEI MEI THE MARRYING MAIDEN","Action will be evil; no advantage can come of it. The hexagram combines joy and movement, suggesting the marriage of a young girl. The weak lines are in a position superior to the strong and only misfortune can follow. To have long term success avoid mistakesfrom the beginning. One should always be conscious of mistakes that can be made in the present when contemplating the far distant future."
1120 DATA "HSIAO KUO SMALL SUCCESSES","There will be progress and success, but it will be advantageous to be firm and perservering. Success will be insmall matters, rather than greataffairs. It is better for the small bird to fly low, where it's song can be heard, than to fly too high. In this fashionthere will be gread good fortuneOne should be exceedingly humblein his conduct,esceedingly sorrowful in mourning, and exceedingly thrifty in his expenditures."
1130 DATA "FENG ABUNDANT PROSPERITY","Abudant prosperity signifies progress and development. The trigrams CHEN and LI are joined combining movement with brilliance. The immage is of thunder and lightning together. When one has achieved his aims he should not fear a change for the worse which will come. Instead he should be as the sun at noon. When disputes arise arbitrate and settle in an appropriate manner."
1140 DATA "HENG LONG DURATION","Advantage will come from being firm and correct. Progress will be marked with no mistakes. Movement in any direction will be fortunate. The sages long persevere in their course and all under the sky is made perfect. In the true nature of heaven, earth and all things canthe causes of long endurance be seen. The superior man stands firm and does not allow himself to be swayed."
1150 DATA "TA CHUANG VIGOROUS STRENGTH","The advantage of vigorous strength comes from being firm and correct. The great become strong however they must also berightous. Strength should be cultivated but by itself is not sufficient for the proper conduct of affairs. Strength should be held in subordination to the idea of the right and only exerted in harmony with it.One should never indulge in any actions which might be in any way improper."
1160 DATA "PI UNITY","Unity and good fortune are shown. One should re-examine oneself by means of the oracle to see if he is virtuous, persistant and firm in his aims.If the answer is favorable therewill be no problems. Good fortune is insured by co-operation. Careful assesment of one's capabilities will aid in gaining the support of others"
1170 DATA "CHUN BIRTH PANGS","Great progress and success. Advantage will come from being firm and correct, but forward movement should not be taken lightly. Responsibily should be shared. The start of a new venture is always accompanied bystruggles and difficulty, as in birth, but success can follow ifone is patient and perservering.Creating order out of disorder should not be undertaken in a frivolous manner and a wise man will seek competent help in sucha large task."
1180 DATA "K'AN THE PERILOUS CHASM","Danger lies ahead, like a perilous chasm filled with rushing water. To surmount this obstacle, it must be encounteredin an attitude of sincere honesty with a mind that is sharp, lucid and penetrating. Ifthis is the case then the dangerwill be overcome. Sincerity and mental alertness will encourage success. Firm action will be of an advantage."
1190 DATA "CHIEH REGULATION","Progress and success are indicated. Regulation provides man a stable framework in which to function. Such a frame work will lead to success especially when facing perilous conditions and a feeling of satisfaction. But if the regulatatory frame- work is too severe and dificult it's good effects will not last long. Regulation should follow the laws of nature. To bring success they should adapt to prevailing conditions and not bestrict or severe."
1200 DATA "CHIEN OBSTRUCTIONS","This hexagram denotes difficultyand the trigram for danger is above. If one can see danger andhalt his advance towards it he is wise indeed. It will be auspicious to meet with the important and influential. Firm persistence will bring good fortune. External stresses will help to reveal weaknesses withinwhich would otherwise go unremedied."
1210 DATA "CHI CHI COMPLETION ACHIEVED","Completion achieved indicates progress and success in small matters. There will be advantagein being firm and correct. Good fortune in the beginning will befollowed by disorder in the end.One should be aware of the instability of human affairs andconsider the possibility of future evil and take measures toprevent it."
1220 DATA "CHING THE WELL","The site of a town may be changed, but the well can not bemoved. The water level remains constant and is not exhausted. But if the rope is too short or the water jug broken there will be evil. Stability is indicated by the well, access to it by therope and jug. When one has skills and resources that are not used only trouble can come of it. When one uses the skills and resources one has to help others, it is the beginning of a great achievement."
1230 DATA "HSU BIDING ONE'S TIME","Sincerity will lead to brillant success. Firmness will bring good fortune. It will be advantageous to cross the great water. It is an auspicious time to commence a major undertaking,but strength and determination are needed to makethe most of the progressive trends now in operation. When facing danger it would be to one's advantage to wait until success is assuredrather than becoming involved byuncertain confrontation."
1240 DATA "TS'UI COLLECTING TOGETHER","Great Sacrafices will be conducive to good fortune. It will be advantageous to meet theimportant. There will be successand progress for he who will persevere. Be prepared for any unforseen problems and any opportunities. Movement in any direction will be advantageous."
1250 DATA "SUI FOLLOWING","The image is one of thunder CHEN in the midst of a lake TUI. Great progress and success will come when proprietyis observed without error. All under heaven will follow at sucha time. The ability to be flexible and adapt to varying conditions will bring success. He who is guided by moral values and who can follow as well as lead, when circumstanceswarrant it, will atain good fortune. Men will not follow one in whom they have no trust."
1260 DATA "K'UN EXHAUSTING RESTRICTION","There may yet be progress and success. For the really great man, there will be good fortune,but he should remember that talkwill not solve his problems. Surmounting difficulties will provide great satisfaction. Whengood fortune departs, all one can do is submit but by holding to integrity and optimism the foundation for future success islaid. This is the mark of the superior man. He will even sacrifice his life to fulfil his purpose."
1270 DATA "TUI JOY","There will be progress and success. It will be advantageousto be firm and persevering. The hexagram indicates joyful satisfaction. When the prospect of such pleasure lies before people it beckons them they forget the heaviness of their labours; when it inspires them to surmount difficulties, they even forget the danger of death.An underlying strength is required if joy is to produce good fortune."
1280 DATA "HSIEN MUTUAL ATTRACTION","There will be good fortune. There is advantage in marring a young girl. As the man and womanare attracted to each other and joyful in their unity, so it is with heaven and earth and the transformation and creation of all things is the result. If the minds of men unselfishly submits to the influences of theuniverse, harmony and peace ensues. One should keep his mindfree from all preoccupaions, andrecieve the approaches of all whocome to him."
1290 DATA "KO REVOLUTION","Revolution is only believed in when it has been accomplished. There will be progress and success; there will be advantagein being firm and correct and removing all occasion for regretCultivated intelligence is the basis of joyful satisfaction . Heaven and earth undergo change,each in its own time. Change will only come when it is a proven necessity and pursued with determinaton. One should keep track of the season and times."
1300 DATA "TA KUO EXCESS","The roof beam is strained to thebreaking point. Movement of any kind will be favorable. There will be success. At this time there is an extreme situation which is caused by excess but the disasterous results can be avoided by swift and cognizant action. The image is of trees, SUN, hidden beneath waters of the lake, TUI. A superior man can stand alone without fear andretires from the world with no regret."
1310 DATA "KUAI RENEWED ADVANCE","One who wishes to advance shouldmove forward apealing to sympathy in a calm and earnest manner. When confronting evil he should be aware of all the perils his actions may place himin and by doing so will be successful. One should bestow riches to those below him and not let his wealth to accumulateunused."
1320 DATA "PO SHEDDING","It would not be advantageous to make a move in any direction. This is a time of decrease and one should be aware that of the conditions symbolised in the hexagram and stop trying to advance. When small men multiplyand increase their influence, it is but a fashion of politicallife. If one waits a change for the better will develop."
1330 DATA "I NOURISHMENT","With firm correctness there willbe good fortune. Pay heed to themanner in which people nourish others, and watch what they seekout for their own noursihment. Heaven and earth nourish all things and the sages nourish talented and virtous men that they might offer sustenance to all the world. One should keep a careful watch on one's words and moderate his eating and drinking."
1340 DATA "MENG INEXPERIENCE","There will be progress and success. The inexperience of youth is rather like the undeveloped appearance of a plant which has just struggled from beneath the surface of the earth. Such a state is not evil but the care and supervision of a competent teacher are needed to overcome inexperience. One should conduct himself in a resolute manner, and nourish his virtue as if it were a spring at the foot of a mountain"
1350 DATA "SUN DECREASE","A decrease of what is in excess brings great good fortune if it is carried out with sincerity. It results in freedom from errorResoluteness will bring advantage in all actions. There is a time when the strong arediminished and the weak strengthened. Diminution and increase, fullness and emptynesstake place in harmony, each in their own time. One should restrain one's anger and animal desires."
1360 DATA "KEN STILLNESS","Keeping his back perectly still,he loses all consciousness of his body. He walks in the court-yard but does not notice the people there. The hexagram signifies comming to a halt. Resting when it is time to rest and acting when it is time to act. When movement and resting take place at appropriate times,one's progress will be brilliantOne should never allow his thoughts to stray beyond his present situation."
1370 DATA "PI ADORNMENT","Adornment implies success;small undertakings are favored. Brilliance regulated by the forces of stability describes the adornments of human society.Elegant adornment should always form a part of human society as it is a part of nature, but mustalways take place to what is of real importance. Do not place faith in vanity or appearances when dealing with import t matters."
1380 DATA "KU DECAY","Progress and success are implied. There will be advantagein crossing the great water. Butone should reflect for several days before and several days after commencing. He who presses forward will encounter important business to be done. Success in arresting decay and restoring soundness is indicatedbut only by great effort are indicated. Careful appraisal of the situation is needed before action can safely be taken and vigilance is required afterward to avoid a repetition of trouble"
1390 DATA "TA CH'U PROGRESS IN RESTRAINT","Accumulation through restraint will be to one's advantage if one remains firm and correct. If one places his talents in theservice of others there will be good fortune. A great undertaking is indicated. Engaging in public service one may undertake the most difficulttasks. A superior man stores in his memory the words and deeds of men of ancient times, adding to his knowledge and virtue."
1400 DATA "CHIN PROGRESS","Because of the prince's service to the country he is presented with many horses and is recievedby the king three times in one day. This is the image progress.This advance is like that of thesun, shining more and more untilit reaches high noon. One who cultivates his virtues, and is tolerant,calm and restrained will have success and shine like the sun over the earth."
1410 DATA "SHIH HO BITING THROUGH","Biting through signifies successful progress. It will be advantageous to use legal restraints. Obstacles can be removed with the power of the law. Sometimes political and social union can can be realizedin a harmonious fashion by gnawing through the restraints to understanding. The ancient kings devised their penalties inan intelligent manner, then put forth their code of law."
1420 DATA "WEI CHI BEFORE COMPLETION","Progress and success is implied because the central position of the upper trigram is occupied bya weak line. The fox has almost crossed the stream when it gets its tail wet. One is is like thefox, in that he has not escaped from danger. There will be misfortune if one does not keep one's goals in mind."
1430 DATA "K'UEI OPPOSITES","Although conditions of major opposition prevail, in small matters there will be success. The images are of the trigram LIwhich is fire over Tui which is the lake. They are like two sisters living together, whose wills do not move in the same direction. There is great divisions between all beings butthey are realted through their actions. Common aims will bring them together."
1440 DATA "LU THE TRAVELER","There will be good fortune for the travelling stranger who is firm and correct in behavior. Travelers ought to cultivate thequalities of humility and integrity. They will escape harmand have success in small ways. A man on the move is unable to attain great things. Be cautiousand do not let lawsuits drag on."
1450 DATA "LI BRILLIANT BEAUTY","Perseverance in in the right waybrings freedom and success. LI signifies dependence. The sun and the moon are dependent on heaven just as manis dependent on the natural order. Only by placing one's trust in the way of the universe can success be achieved. The superior man encourages the brillant beauty of his own true spirit to unfoldand with it illuminates the fourquarters of the world."
1460 DATA "SHENG ASCENDING","There will be great progress andsuccess. One should not suffer anxity when seeking an importantinterview. Proceeding towards the south will be fortunate, as it is the region of warmth and joyful activity symbolizes ones goal. Cultivate virtue, accumulate small benifits until one can achieve merit which is high and great."
1470 DATA "TA YU WEALTH","TA YU indicates great progress and success. Prosperity and abundance and the opulence it leads to can result in dangerouspride. But here success will be accompanied by humility and discipline; no fault will be incurred. One should repress what is evil and give distinction to what is good, acting in sympathy with his heavenly virtue."
1480 DATA "KUAN CONTEMPLATION","The ritual washing of hands has taken place, but the sacrafice has not yet been made. Sincerityand a dignified bearing command respect. One who comtemplates the laws of the universe will attain greatness acting as a vehicle for the power of heaven.Dignity and sincerity of action will cause others to look to himand become transformed. The sages in this way gave their instructions and all under heaven submit to them. The hexagram is made of the trigramsrepresenting docility and flexibility."
1490 DATA "I INCREASE","There will be advantage in everyundertaking, even in crossing the great water. Daily advancement can be made to an unlimited extent through the exercise of the qualities of movement and gentleness. Heaven dispenses its bounty and earth produces its fruits in unrestricted profusion. Crossingthe great water means that even difficult tasks can be undertaken now. Proceed toward the good when it is seen and turn from the bad."
1500 DATA "HUAN DISPERSION","Act with firm persistance. Dispersion results when men's minds are divorced from what is right and good. Great undertakings can be carried out in a disciplined manner with careful attention to what is right. The ancient kings made offerings to the lord of heaven and established temples. Reject thoughts of self interest to avoid trouble."
1510 DATA "CHUNG FU INMOST SINCERITY","Inmost sincerity will bring goodfortune. Even pigs and fishes are moved by it. Inmost sincerity is the highest qualityopen to man, giving him power over spiritual beings, other menand lower creatures. To attain this state the heart must be free of all consciousness of self. Such selflessness leads toimmovable virtue which is flawless and has no vestige of unreality. Even the most difficult enterprises will be successful to one so gifted, providing he acts in a firm and correct way."
1520 DATA "CHIEN GRADUAL ADVANCE","Progress is indicated, like the marriage of a young maiden whichbrings good luck, slowly preparing for her new life by many stages. There will be advantage in propriety. In such a fashion does a man gradually rise in the eyes of his fellows following his ordained path likethe wild goose which flies in its allotted place in the flock heading toward the sun. The trigrams SUN and Ken are joined together. The former represents mildness and the latter stead- fastness showing the start of inexhaustible forward movement."
1530 DATA "CHIA JEN THE FAMILY","The most important rule in family life is that the wife should be firm and correct in all her actions. Proper regulation of the family is effected mainly by the cooperation of the husband and wife in their respective spheresIn this hexagram we see th idea of an authoritative ruler represented here by parental authority. One should regard thetruth of things when he speaks, and be consistant in his thoughts."
1540 DATA "SUN GENTLE PENETRATION","Attainment and progress in smallmatters. Movement in any direction will be advantageous; so also will a meeting with a great man offer opportunities. The effect of gentle penetration is not to renew or revolutionise, but only to correct and improve. Such delicate correction needs to be directed by a great man if it is to be effective."
1550 DATA "HSIAO CH'U*RESTRAINT BY WEAKNESS","There will be no progress and there will be no success. We seedense clouds, but no rain comming from the west. Here CH'IEN, the strong, is gently restrained by SUN, the weak. There may be great progress but delay is unavoidable. Docility and a flexible outlook will help. It is as if one is waiting for the rain to come andsees the dense clouds comming and knows that what he waits foris soon approaching."
1560 DATA "P'I STAGNATION","There is a lack of understandingbetween men. Conditions are unfavourable. The great are goneand the small approach. Heaven and earth are not in communion. Increasing decay must be looked for. The processes of growth areat an end. Vigilance will help avoid calamaties and there will be hope in knowing that every condition gives way to its opposite."
1570 DATA "WU WANG SIMPLE INTEGRITY","There will be great progress andsuccess the nearer one approaches the ideal of simple integrity. The quality of simpleintegrity is characteristic of heaven and the highest type of humanity. There will be advantage in being firm and correct. If this is not the casethen there will be serious error and no subsequent action will further ones goals. Can anything be done advantageously by he who does not act in accordwith the will of heaven?"
1580 DATA "SUNG STRIFE","Although sincere, there will be opposition and obstruction. If cautious there will be success but if the present trend continues there will be evil. Seek the aid the the great man but do not cross te great water.Perseverance in one's actions can only lead to confict at thistime. One should always remain calm and ready to negotiate, submit to a higher authority andtrust that justice will be done.It would be foolish to begin a great enterprise at this time."
1590 DATA "LU TREADING","He treads on the tail of the tiger but it does not bite him. There will be progress and success. Dangerous and unpredictable people cannot harmone who treads carefully and gently as he moves forward. Observing the rules of proprietyit is possible to tread safely amid scenes of disorder and peril."
1600 DATA "TUN WITHDRAWAL","Success;it will be advantageous to persist in small matters. This means that progressive trends are withdrawing and only small things can flourish. By firm correctness can the threatened evil be arrested but then only to a small extent, correct timing is important if the withdrawl is to be orderly. The superior man keeps the smallmen at a distance; not by exhibiting anger but by maintaining a dignified reserve."
1610 DATA "T'UNG JEN FELLOWSHIP","Fellowship such as we find in remote country regions favours progress and success. Adoption of the unselfish ideals of the superior man will lead to success. The greatest difficulties can be be overcome by true fellowship based entirely on public considerationand without taint of selfishness"
1620 DATA "KOU SUDDEN ENCOUNTERS","A bold strong woman appears on the scene. One should not contract marriage with such a female. A mariage entered into now would not last long. An encounter between heaven and earth results in the creation of all natural things. When the strong are in the central and correct positions good will prevail. There are things of great importance to be done. The influence of the small and unworthy man must be resisted orit will grow and displace one good man after another."
1630 DATA "CH'IEN CREATIVITY","Supreme success. Perseverance in the right way brings good fortune. Great is the power of CH'IEN which is the source of all things and embodies the significance of heaven. By acting in accordance with the rhythm of the universe one's aspirations are fulfilled; greatachievements are only possible when the right time has come. Time is not an enemy but an allywho must be worked with patiently. One should strive to align himself with the celestialtides which attracts good fortune and supreme success."
2000 REM ***THIS PROGRAM WRITTEN BY THOMAS SIMON OF THE CLEVELAND, OHIO TIMEX/SINCLAIR USERS GROUP***WITH THANKS TO DAVE HOSHOR FOR HELP***THIS PROGRAM MAY BE COPIED WITHOUT RESTRICTION IF IT IS PROPERLY CREDITED******
2005 BORDER VAL "0":PAPER VAL "0":INK VAL "6":CLS
2010 PRINT ''"The I CHING is an ancient work originating over 3000 years ago.Its purpose is to reflect the changes that are constantly operating throughout the universe. While essentially a work of divination, it also offers advice on how to act, so that the future can be faced in the best possible manner. In theI CHING are the roots of AncientChina's two major schools of thought, the Confucian and the Taoist. The I CHING seeks to illuminate the way things are and suggests what you can do about it. Ultimately, though,thefinal decision is yours. You arethe master of your fate."
2015 GO SUB VAL "9010"
2020 PRINT ''"The oracle of the I CHING embodies a simple yet profound explanation of the universe and life contained within it."
2025 PRINT '"At the root of all existence lies T'AI CHI. It is the ultimate, unknowable source of life from which all things come and to which all things return. The nearest we can approach T'AICHI is through the one aspect oflife that is constant...change. Everything is in a state of movement. Nothing is final. Thisconstantly changing energy pattern, the matrix of life, is known as TAO."
2030 GO SUB VAL "9010"
2035 PRINT ''"Change arises from the interaction of two primal forcesThese are YANG and YIN. They are opposites yet complimentary.YANG is represented by an unbroken line and represents the positive, masculine and active pole of nature. While YINis represented by a broken line,it represents the negative, feminine and passive pole of nature. To show interaction of these opposites they were combined to form the greater andlesser YANG and the greater and lesser YIN. A further line was added to produce eight possible trigrams. They are: "
2040 LET M$="\::\::\::\::\::\::\::\::\::\::\::\::\::\::"
2041 LET n$="\::\::\::\::\::\::\{20}\{1}\::\::\{20}\{0}\::\::\::\::\::\::"
2045 GO SUB VAL "9010"
2046 PRINT TAB VAL "13";"CH'IEN"
2050 INK 5:PRINT '' TAB VAL "9";m$;'' TAB VAL "9";m$;'' TAB VAL "9";m$;'
2051 INK 6:PRINT ''"IMAGES: HEAVEN , COLD";''"TRAITS: STRONG, FIRM, LIGHT";''"FAMILY RELATIONSHIP: FATHER";''"ANATOMY: HEAD";''"ANIMAL: HORSE"
2055 GO SUB VAL "9010"
2060 PRINT TAB VAL "14";"K'UN"
2061 INK 5:PRINT '' TAB VAL "9";n$;'' TAB VAL "9";n$;'' TAB VAL "9";n$;'''
2065 INK 6:PRINT "IMAGES: EARTH, HEAT";''"TRAITS: WEAK, YIELDING, DARK";''"FAMILY RELATIONSHIP: MOTHER";''"ANATOMY: BELLY";''"ANIMAL: OX"
2070 GO SUB VAL "9010"
2080 PRINT TAB VAL "14";"CHEN"
2081 INK 5:PRINT '' TAB VAL "9";n$;'' TAB VAL "9";n$;'' TAB VAL "9";m$;'''
2085 INK 6:PRINT "IMAGES: THUNDER, SPRING";''"TRAITS: ACTIVE, MOVING, AROUSING";''"FAMILY RELATIONSHIP: FIRST SON";''"ANATOMY: FOOT";''"ANIMAL: DRAGON"
2090 GO SUB VAL "9010"
2091 PRINT TAB VAL "14";"K'AN"
2092 INK 5:PRINT '' TAB VAL "9";n$;'' TAB VAL "9";M$;'' TAB VAL "9";N$;'''
2095 INK 6:PRINT "IMAGES: WATER, MOON , WINTER";''"TRAITS: DANGEROUS, DIFFICULT,", TAB VAL "10";"ENVELOPING";''"FAMILY RELATIONSHIP: SECOND SON";''"ANATOMY: EAR";''"ANIMAL: PIG"
2100 GO SUB VAL "9010"
2101 PRINT TAB VAL "15";"KEN"
2102 INK 5:PRINT '' TAB VAL "9";M$;'' TAB VAL "9";N$;'' TAB VAL "9";N$;'''
2105 INK 6:PRINT "IMAGES: MOUNTAIN";''"TRAITS: RESTING, STUBBORN,", TAB VAL "10";"UNMOVING";''"FAMILY RELATIONSHIP:YOUNGEST SON";''"ANATOMY: HAND";''"ANIMAL: DOG"
2110 GO SUB VAL "9010"
2111 PRINT TAB VAL "15";"SUN"
2112 INK 5:PRINT '' TAB VAL "9";M$;'' TAB VAL "9";M$;'' TAB VAL "9";N$;'''
2115 INK 6:PRINT "IMAGES: WIND, WOOD";''"TRAITS: GENTLE, PENETRATING,", TAB VAL "10";"FLEXIBLE";''"FAMILY RELATIONSHIP: FIRST "; TAB VAL "20";"DAUGHTER";''"ANATOMY: THIGH";''"ANIMAL: BIRD"
2120 GO SUB VAL "9010"
2121 PRINT TAB VAL "15";"LI"
2122 INK 5:PRINT '' TAB VAL "9";M$;'' TAB VAL "9";N$;'' TAB VAL "9";M$;'''
2125 INK 6:PRINT "IMAGES: FIRE, SUN, LIGHTNING,"; TAB VAL "10";"SUMMER";''"TRAITS: BEAUTIFUL, DEPENDING,", TAB VAL "10";"CLINGING";''"FAMILY RELATIONSHIP: SECOND"; TAB VAL "20";"DAUGHTER";''"ANATOMY: EYE";''"ANIMAL: PHEASANT"
2130 GO SUB VAL "9010"
2131 PRINT TAB VAL "15";"TUI"
2132 INK 5:PRINT '' TAB VAL "9";N$;'' TAB VAL "9";M$;'' TAB VAL "9";M$;'''
2135 INK 6:PRINT "IMAGES: LAKE, MARSH,RAIN, AUTUMN";''"TRAITS: JOYFUL, SATISFIED,", TAB VAL "12";"COMPLACENT";''"FAMILY RELATIONSHIP: YOUNGEST"; TAB VAL "21";"DAUGHTER";''"ANATOMY: MOUTH";''"ANIMAL: SHEEP"
2140 GO SUB VAL "9010"
2145 PRINT ''"By combining the eight trigrams in pairs, the sixty-four hexagrams are produced, each representing a minor phase in the cycle of change. Liebniz found that the hexagrams of the I CHING were very similar to thebinary notation that he had published in 1679, in his work DE PROGRESSIONE DYADICA. The hexagrams represent the numbers from 0 to 63. Liebniz was the first to recognize that the sequence of the I CHING was isomorphic with a useful arithmetic notation."
2150 GO SUB VAL "9010"
2155 PRINT ''''"The psychologist C.G. Jung's interest in the I CHING brought popular attention to the oracle,in Europe and America. He found that the I CHING showed great insight into the problems at hand. He believed that the oracle's predictions were acausally linked to events in the sense that they were partially accessible in the sub-conscious mind. Jung's term for this was synchronicity."
2160 GO SUB VAL "9010"
2165 PRINT ''"The I CHING should not be consulted in a light state of mind. If you ask it something frivolous or in a skeptical moodit will give you a frivolous or meaningless answer. One should be relaxed, both physically and mentally and think of nothing but the question to be asked. If the predicions of the I CHING fail to materialze, thenthe text may not have been correctly interpreted, or your frame of mind was not correct. Besides the future is not determined, and the I CHING doesno more than indicate probable trends."
2170 GO SUB VAL "9010"
2175 PRINT '"This version of the I CHING is designed to work on the TIMEX/ SINCLAIR 2068 or the SINCLAIR SPECTRUM. Meditate upon your question, perhaps with the lights down low, and press any key to enter the program. Pressing the letter Z will copy the screen to the 2040 printer. Pressing the letter C will produce the permutation of the first hexagram as moving lines. The ratio for a moving line is exactly the same as the yarrow stalk method of divination. It is recomended that the change of a hexagram with moving lines be done only once. In fact theremay not be moving lines as the probabiliy that any line may change is small."
2180 GO SUB VAL "9010"
2185 PRINT '"Pressing the N key will give youa new hexagram. This key should be used for another question or by another person. Remember do not consult the I CHING in a frivolous state of mind, treat it with a serious outlook and you may be startled by the results. "
2190 INK 5:PRINT ''"NOW THINK OF YOUR QUESTION AND WHEN YOUR MIND IS CLEAR PRESS ANY KEY TO CONSULT THE I CHING."
7000 PAUSE VAL "0":GO TO VAL "3"
9000 SAVE /"I Ching" LINE VAL "2000":BEEP VAL "2.2", VAL "1":VERIFY "":BEEP VAL "1", VAL "1"
9005 RUN
9010 PRINT # NOT PI;" Press any key to continue ":PAUSE NOT PI:CLS :RETURN
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.
