Tarot Reader (Amstrad CPC Type-In)

I do like esoteric stuffs. 

This one comes from the issues 27 March - 2 April 1986 and 3-9 April 1986 of the magazine Popular Computing Weekly and was authored by David Muir. Curiously no one spent effort in typing it so far although I find it quite handy. So I had it done during the lockdown with the help of Google Note image's scanning and some elbow grease.

 "This is a simulation of fortune telling using a full 78-card Tarot pack and the popular Celtic Cross Spread. It is menu-driven at every stage.

The program is long because of all the data it holds. (The data is actually twice as long as the control program). The data includes information for 78 different card titles, different meanings for 78 cards, and 78 different pictures - so it's bound to be long - in any case we'll be printing it over two weeks. [...]

When a card is to be printed, a check is made if it is a suit card. If so, the character 255 is defined for the suit and printed where necessary on the face to make the number of 'pips'or once for a court card as a suit marker. If it is a court card then K, Q, N or P is also printed.

Trump and court card picture data starts in memory at 38000. There is a short (21-byte) machine code section at 39872. (The data for this is the last line of the program.) This simply uses LDIR to dump 72 bytes from the picture data area into the UDG area to fill out characters 246 to 254 (memory locations 37920 -37991), prior to printing a string containing these characters (a8).

It is interesting that the screen can be filled with different card pictures while using only 10user-defined graphic characters in a present string.

There is little agreement amongst Tarot card fortune tellers as to the card meanings. I have tried to synthesise ideas from a number of sources, with the prime objective always to keep the program as short as possible. Readers can easily substitute their own ideas and expand the meanings. Interpretative data begins at line 510. There are two pieces of data for each card starting at 'The Fool'. Generally these give 'Good' and 'Bad' meanings . . . but some cards tend to be totally good or totally bad. [...]"

The source code can be found here as well as the disk image.