I am an Egyptologist, and for the last six years I have been busy doing a survey of ancient Egyptian Predynastic and Early Dynastic cemeteries to establish some of the demographic, economic, and sociological conditions under which the population of the time had to live.
The computer has been used for many years as a tool for carrying out archaeological projects and, more specifically, in Egyptological research. However, scholars who want to use these modern machines often have to compete for time at the big university computers with other specialists. Furthermore, due to the complexities involved, they have to rely on professional programmers who, it is hoped, will understand the particular nature and purpose of each project and thus use the machine to the scholar’s best possible advantage.
To what extent this has been achieved is up to each individual to decide, but recently, the advent of a whole generation of powerful, affordable microcomputers has freed scholars from their dependence on outside help. Now it is possible not only for Departments or Research Centers but even for one single person to acquire a computer. The researcher can devise his own programs, and proceed with his work at a much faster pace.
Until a couple of years ago, we had to rely on file-cards and indexes to store data. There is no need to elaborate on how tedious, slow, and error-prone this system really is, but at the time there was no feasible alternative.
When the first micrcomputers became available, I decided to buy one—a Sinclair ZX80 and then a ZX81. The enormous potential of these very moderately priced machines for archaeological projects was quickly evident. Not only are they reasonably accurate and extremely reliable, but also their versatility raised the possibility of use for other forms of scientific research such as the handling of complex mathematical formulae for statistical and other purposes. The graphics offer a great variety of displays, and the Sinclair Basic with its one keystroke entries is very user-friendly.
After developing a suitable program, I found that I could work at ten times the speed I had been used to. As a result, a project that was calculated to take at least ten years to complete could be finished and properly published early in 1982. (If you are interested in the results of this study and the kind of analysis made possible by the ZX81, you can find it in my article in The Journal of the Society for the Study of Egyptian Antiquities January 1982, and in my book A Reappraisal of the Published Evidence on Predynastic and Early Dynastic Cemeteries Toronto, 1982.)
The program below can be used on a ZX80 (8K ROM) since it was designed in FAST mode for greater speed and we took care to include the required POKEs after every PAUSE. Since ZX81 owners have a choice of FAST or SLOW, they will have to change if necessary, line 2 of the program.

Both machines allow a maximum of 90 entries (or tombs in this case) with the 16K RAM pack. Those who own a 64K RAM pack (which actually provides 48K RAM for normal Basic use), by the simple procedure of raising RAMTOP to the 64K location area will be able to enter as many as 1,000 tombs. In our case the addon was Memotech’s MEMPAK 64K which has an initial powerup RAMTOP of 16K which can be increased to the maximum possible value by POKEing 16389,255, and NEWLINE, then NEW and NEWLINE. For other memory expansion packs the procedure may vary so the user should consult his manual.
With slight modifications, this program can be adapted to other categories of archaeological data such as pottery, artefacts, or settlement research.
The possibilities of the ZX81 are not exhausted by this program. Among other things, the high resolution capabilities of the ZX Printer enabled us to write a program which generated user-designed characters, in our case, Egyptian hieroglyphics. This feature could be easily used to print Chinese characters, Russian or Greek letters, or a lower-case set of letters. Our program works like a typewriter sending into memory one character every time a key is pressed, by the time 32 have been entered, the printer prints a line and is ready for the next one. In this case one of the much-criticized features of the ZX81, namely, the flat keyboard, proved to be very convenient since it allows the user to place opaque overlays in which the Sinclair keyboard characters have been replaced by others. Thus we could use the keyboard directly without constant consultation of lists or tables.
I hope that our results will be a source of inspiration to fellow archaeologists and other researchers who are still toiling away with pen and paper or competing for time at the big university computers and that they will be persuaded to switch to more efficient and remarkably economical ways of handling their data such as those offered by the ZX81.
Program Notes
The SYNCSUM for this program as listed is 103. Note that this program should only be RUN once and that is when you will start to enter your data. After that, go back to the menu by entering GOTO 120. Otherwise you will lose your variables which are cleared by RUN.
The program is mostly self-explanatory, but a few comments on some of the lines may help other users to adapt it to their work.
1-40: These lines define variables and reserve space for them. If you plan to make 1,000 entries, change line 32 to read R$ (1000,32) and attach a 64K pack or a combination of other RAM packs to a total of 48K.
It is advisable to dimension R$ to the value you need and no more because the ZX81 gets increasingly slow as you raise RAMTOP. For this reason keep RAMTOP as low as possible.
Furthermore, you should be very careful when you dimension your arrays in lines 1 to 40, especially line 32, since once you define them and RUN the program to begin, you are stuck with them and only another RUN will enable you to modify them. This would result in the loss of all variables. While you enter your data, it would be wise to use number 8 in the menu from time to time so as to be aware of how much memory you still have available.
120-180: This is the menu. Lines 122-127 can be altered to describe the subject of the research and the units of measurement. (cm., inches, etc.).
2500-2860: This subroutine displays a record which has one given characteristic (certain size group of tombs or certain shape, etc.) and at the same time, adds up the number of the records thus displayed so as to provide a total at the end of the search.
3500-3786: This routine is similar to the above but reserved for binary or multiple comparisons (i.e., tombs sharing more than one characteristic such as certain size group and the shape of the tomb and the sex of the occupant, etc.). The program STOPs at line 3515 to allow you to modify line 3754 to suit your needs. After this is done, press CONTINUE.
5000-5590: Since this subroutine is connected to number 1 in the menu which generates the file, special care was taken to make sure that the computer will only accept valid entries. The code for the entries is given in Figure 1, but can be modified at will simply by changing the content of these lines. Number 4 in the menu alters the records and also uses this “safe” subroutine.
9300-9390: This subroutine analyzes the record numbers entered to make sure that they are valid.
You can SAVE the program at any stage by entering the command GOTO 9500. Make sure that you have started your tape recorder and also that your earphone wire is disconnected before you enter this command.
One drawback users will quickly identify is the length of time that SAVEing or LOADing 16K or more takes at the ZX81’s leisurely pace of 250 BAUD. However, the use of a QSAVE machine, which by-passes the computer’s ROM SAVE and LOAD routines and carries out the task at a speedy rate of 4000 BAUD, cut down the waiting time from over six minutes to only 25 seconds. If you use a good quality tape recorder and spend some time finding the right volume setting, the QSAVE machine and accompanying software can be very reliable and perhaps even eliminate the need for more expensive stringy-floppy systems or disk drives.


Variables Used
Arrays A$ to O$: These arrays determine the content of the file. Change the PRINT statements related to them and their dimensions in order to adapt this program to your own research parameters.
Array R$: Contains all other arrays and forms a unit (tomb, dwelling, workshop, etc.).
Arrays Z$ to W$: General utility arrays used throughout the program as the need arises.
N, RN, VN, D, etc.: These numeric variables control the number of units (e.g., tombs) on file.
Graphics line notes
Enter the following line texts in inverse form:
- 1: RUN ONLY TO START A FILE OTHERWISE JUST ENTER GOTO 120.
- 2520: TOMB NUMBER:
- 2522: SIZE GROUP:
- 2524: CONDITION:
- 2526: SHAPE:
- 2528: LENGTH:
- 2530: WIDTH:
- 2532: DEPTH:
- 2534: BODY-HEAD POINTING:
- 2536: BODY-SIDE ON:
- 2538: BODY-HEAD FACING:
- 2540: BODY-AGE IN YEARS OR APPROX.:
- 2542: BODY-SEX OR IF CHILD:
- 2544: NUMBER OF OBJECTS FOUND:
- 2546: WOODEN OR CLAY COFFIN:
These texts except for line 1 are repeated in lines 3530 to 3660 and lines 5020, 5040, 5055, 5070, 5085, 5100, 5115, 5130, 5145, 5160, 5175, 5190, 5205, 5220.
([inv [illegible]] in the listing = inverse prompt text that cannot be read on the scan; the article’s graphics line notes above give the intended texts.)
1 REM [inv [illegible]]
2 FAST
3 DIM A$(4,4)
4 DIM B$(4,1)
6 DIM C$(1)
8 DIM D$(3,1)
10 DIM E$(4,1)
12 DIM F$(2,3)
14 DIM G$(2,3)
16 DIM H$(2,3)
18 DIM I$(5,1)
20 DIM J$(3,1)
22 DIM K$(5,1)
24 DIM L$(6,2)
26 DIM M$(4,1)
28 DIM N$(2,2)
30 DIM O$(2,1)
32 DIM R$(90,32)
34 DIM Z$(1)
35 DIM X$(4)
36 DIM W$(32)
38 LET N=0
40 LET C$=" "
120 CLS
121 PRINT
122 PRINT "EGYPTIAN PREDYNASTIC AND EARLY"
123 PRINT "DYNASTIC CEMETERIES-"
124 PRINT
127 PRINT "(MEASUREMENTS IN )"
128 PRINT
129 PRINT
130 PRINT
132 PRINT "1 - ADD A RECORD"
135 PRINT "2 - SORT RECORDS"
140 PRINT "3 - DELETE A RECORD"
145 PRINT "4 - CHANGE A RECORD"
150 PRINT "5 - DISPLAY A RECORD"
155 PRINT "6 - LIST THE FILE"
156 PRINT "7 - OTHER ROUTINES"
157 PRINT "8 - CURRENT MEMORY SITUATION"
158 PRINT AT 19,0;"ENTER NO. REQUIRED OR 0 TO STOP"
160 INPUT Z$
165 IF Z$="0" THEN STOP
170 LET MO=CODE Z$-28
175 IF MO<1 OR MO>8 THEN GOTO 160
180 GOTO 500*MO
500 LET RN=N+1
510 GOSUB 5000
520 IF RN=N+2 THEN LET N=N+1
530 PRINT AT 20,0;"PRESS NEWLINE TO ADD RECORD ";RN
540 PRINT AT 21,6;"OR M FOR MENU"
550 INPUT Z$
560 IF Z$=" " THEN GOTO 510
570 IF Z$="M" THEN GOTO 120
580 GOTO 550
1000 CLS
1002 PRINT AT 20,0;"SORTING..."
1003 PRINT AT 2,0;"THIS PROGRAM SORTS BY TOMB"
1004 PRINT AT 4,0;"NUMBER. SORT BY OTHER VARIABLES"
1005 PRINT AT 6,0;"MODIFYING AT WILL LINE 1020."
1007 PAUSE 500
1008 POKE 16437,255
1009 FOR P=N-1 TO 1 STEP -1
1010 FOR Q=1 TO P
1020 IF R$(Q,1 TO 4)<=R$(Q+1,1 TO 4) THEN GOTO 1060
1030 LET W$=R$(Q)
1035 LET R$(Q)=R$(Q+1)
1040 LET R$(Q+1)=W$
1060 NEXT Q
1070 NEXT P
1080 PRINT AT 20,0;"SORT COMPLETED"
1090 PAUSE 400
1100 POKE 16437,255
1110 GOTO 120
1500 CLS
1505 PRINT AT 20,0;"ENTER NO. OF RECORD FOR DELETION"
1510 INPUT X$
1520 GOSUB 9300
1522 IF NOT OK THEN GOTO 1510
1524 LET D=VN
1530 PRINT AT 21,0;"DELETING..."
1540 FOR I=D TO N-1
1550 LET R$(I)=R$(I+1)
1560 NEXT I
1570 LET N=N-1
1580 CLS
1590 PRINT AT 19,0;"RECORD ";D;" HAS BEEN DELETED"
1600 PRINT AT 20,0;"PRESS NEWLINE FOR MORE DELETIONS"
1610 PRINT AT 21,6;"OR M FOR MENU"
1620 INPUT Z$
1630 IF Z$=" " THEN GOTO 1500
1640 IF Z$="M" THEN GOTO 120
1650 GOTO 1620
2000 CLS
2010 PRINT AT 20,0;"ENTER NUMBER OF RECORD"
2020 INPUT X$
2030 GOSUB 9300
2040 IF NOT OK THEN GOTO 2020
2050 LET RN=VN
2100 GOSUB 5000
2200 PRINT AT 20,0;"PRESS NEWLINE TO CHANGE ANOTHER"
2210 PRINT AT 21,6;"OR M FOR MENU"
2220 INPUT Z$
2230 IF Z$=" " THEN GOTO 2000
2240 IF Z$="M" THEN GOTO 120
2250 GOTO 2220
2500 CLS
2510 PRINT AT 2,0;"SPECIFY ONE OF THE FOLLOWING:"
2520 PRINT AT 4,0;"[inv [illegible]]"
2522 PRINT "[inv [illegible]] "
2524 PRINT "[inv [illegible]] "
2526 PRINT "[inv [illegible]] "
2528 PRINT "[inv [illegible]] "
2530 PRINT "[inv [illegible]] "
2532 PRINT "[inv [illegible]] "
2534 PRINT "[inv [illegible]]"
2536 PRINT "[inv [illegible]] "
2538 PRINT "[inv [illegible]] "
2540 PRINT "[inv [illegible]] "
2542 PRINT "[inv [illegible]] "
2544 PRINT "[inv [illegible]] "
2546 PRINT "[inv [illegible]] "
2548 PRINT AT 20,0;"ENTER VALUE OR NEWLINE FOR EACH"
2550 INPUT A$(4)
2552 PRINT AT 4,14;A$(4)
2554 INPUT B$(1)
2556 PRINT AT 5,14;B$(1)
2558 INPUT D$(1)
2560 PRINT AT 6,12;D$(1)
2562 INPUT E$(1)
2564 PRINT AT 7,12;E$(1)
2566 INPUT F$(1)
2568 PRINT AT 8,8;F$(1)
2570 INPUT G$(1)
2572 PRINT AT 9,8;G$(1)
2574 INPUT H$(1)
2576 PRINT AT 10,8;H$(1)
2578 INPUT I$(1)
2580 PRINT AT 11,22;I$(1)
2582 INPUT J$(1)
2584 PRINT AT 12,22;J$(1)
2586 INPUT K$(1)
2588 PRINT AT 13,22;K$(1)
2590 INPUT L$(1)
2592 PRINT AT 14,30;L$(1)
2594 INPUT M$(1)
2596 PRINT AT 15,25;M$(1)
2598 INPUT N$(1)
2600 PRINT AT 16,26;N$(1)
2602 INPUT O$(1)
2604 PRINT AT 17,27;O$(1)
2650 PRINT AT 20,0;"SEARCHING..."
2652 PAUSE 200
2654 POKE 16437,255
2655 LET T=0
2660 FOR Q=1 TO N
2670 IF R$(Q,1 TO 4)=A$(4) OR R$(Q,5)=B$(1) OR R$(Q,7)=D$(1) OR R$(Q,8)=E$(1) OR R$(Q,10 TO 12)=F$(1) OR R$(Q,14 TO 16)=G$(1) OR R$(Q,18 TO 20)=H$(1) OR R$(Q,22)=I$(1) OR R$(Q,23)=J$(1) OR R$(Q,24)=K$(1) OR R$(Q,26 TO 27)=L$(1) OR R$(Q,28)=M$(1) OR R$(Q,29 TO 30)=N$(1) OR R$(Q,32)=O$(1) THEN GOTO 2715
2680 NEXT Q
2690 CLS
2700 PRINT AT 10,5;"NO RECORD FOUND"
2705 PRINT AT 4,1;"LAST DISPLAY WAS NO. ";T
2710 GOTO 2810
2715 LET T=T+1
2716 CLS
2718 PRINT
2720 PRINT TAB 10;"RECORD NO. ";Q
2722 PRINT AT 4,0;"DISPLAY NO. ";T
2730 PRINT AT 12,0;R$(Q,1 TO 4);R$(Q,5);C$;R$(Q,7);R$(Q,8);C$;R$(Q,10 TO 12);C$;R$(Q,14 TO 16);C$;R$(Q,18 TO 20);C$;R$(Q,22);R$(Q,23);R$(Q,24);C$;R$(Q,26 TO 27);R$(Q,28);R$(Q,29 TO 30);C$;R$(Q,32)
2810 PRINT AT 20,0;"PRESS NEWLINE FOR ANOTHER RECORD"
2820 PRINT AT 21,6;"OR M FOR MENU"
2830 INPUT Z$
2840 IF Z$=" " THEN GOTO 2680
2850 IF Z$="M" THEN GOTO 120
2860 GOTO 2830
3000 CLS
3010 PRINT TAB 10;"LIST RECORDS"
3011 PRINT AT 3,0;"TOTAL: ";N;" RECORDS IN MEMORY"
3020 PRINT AT 20,0;"DO YOU WANT A FULL LIST, Y OR N?"
3030 INPUT Z$
3040 IF Z$="Y" THEN GOTO 3065
3050 IF Z$="N" THEN GOTO 120
3060 GOTO 3030
3065 CLS
3070 FOR Z=1 TO N
3080 SCROLL
3090 PRINT AT 21,0;R$(Z,1 TO 4);R$(Z,5);C$;R$(Z,7);R$(Z,8);C$;R$(Z,10 TO 12);C$;R$(Z,14 TO 16);C$;R$(Z,18 TO 20);C$;R$(Z,22);R$(Z,23);R$(Z,24);C$;R$(Z,26 TO 27);R$(Z,28);R$(Z,29 TO 30);C$;R$(Z,32)
3105 PAUSE 100
3110 POKE 16437,255
3111 NEXT Z
3115 PAUSE 1000
3116 POKE 16437,255
3120 GOTO 120
3500 CLS
3510 PRINT AT 1,0;"FOR BINARY MULTIPLE COMPARISON"
3511 PRINT AT 2,0;"ADJUST LINE 3754 IN PROGRAM"
3515 STOP
3520 PRINT AT 3,0;"SPECIFY SOME OF THE FOLLOWING:"
3530 PRINT AT 4,0;"[inv [illegible]]"
3540 PRINT "[inv [illegible]] "
3550 PRINT "[inv [illegible]] "
3560 PRINT "[inv [illegible]] "
3570 PRINT "[inv [illegible]] "
3580 PRINT "[inv [illegible]] "
3590 PRINT "[inv [illegible]] "
3600 PRINT "[inv [illegible]]"
3610 PRINT "[inv [illegible]] "
3620 PRINT "[inv [illegible]] "
3630 PRINT "[inv [illegible]] "
3640 PRINT "[inv [illegible]] "
3650 PRINT "[inv [illegible]] "
3660 PRINT "[inv [illegible]] "
3670 PRINT AT 20,0;"ENTER VALUE OR NEWLINE FOR EACH"
3680 INPUT A$(4)
3690 PRINT AT 4,14;A$(4)
3692 INPUT B$(1)
3694 PRINT AT 5,14;B$(1)
3696 INPUT D$(1)
3698 PRINT AT 6,12;D$(1)
3700 INPUT E$(1)
3702 PRINT AT 7,12;E$(1)
3704 INPUT F$(1)
3706 PRINT AT 8,8;F$(1)
3708 INPUT G$(1)
3710 PRINT AT 9,8;G$(1)
3712 INPUT H$(1)
3714 PRINT AT 10,8;H$(1)
3716 INPUT I$(1)
3718 PRINT AT 11,22;I$(1)
3720 INPUT J$(1)
3722 PRINT AT 12,22;J$(1)
3724 INPUT K$(1)
3726 PRINT AT 13,22;K$(1)
3728 INPUT L$(1)
3730 PRINT AT 14,30;L$(1)
3732 INPUT M$(1)
3734 PRINT AT 15,25;M$(1)
3736 INPUT N$(1)
3738 PRINT AT 16,26;N$(1)
3740 INPUT O$(1)
3742 PRINT AT 17,27;O$(1)
3744 PRINT AT 20,0;"SEARCHING..."
3746 PAUSE 200
3748 POKE 16437,255
3750 LET T=0
3752 FOR Q=1 TO N
3754 IF R$(Q,1 TO 4)=A$(4) OR R$(Q,5)=B$(1) OR R$(Q,7)=D$(1) OR R$(Q,8)=E$(1) OR R$(Q,10 TO 12)=F$(1) OR R$(Q,14 TO 16)=G$(1) OR R$(Q,18 TO 20)=H$(1) OR R$(Q,22)=I$(1) OR R$(Q,23)=J$(1) OR R$(Q,24)=K$(1) OR R$(Q,26 TO 27)=L$(1) OR R$(Q,28)=M$(1) OR R$(Q,29 TO 30)=N$(1) OR R$(Q,32)=O$(1) THEN GOTO 3764
3756 NEXT Q
3758 CLS
3760 PRINT AT 10,5;"NO RECORD FOUND"
3761 PRINT AT 4,1;"LAST DISPLAY WAS NO. ";T
3762 GOTO 3776
3764 LET T=T+1
3766 CLS
3768 PRINT
3770 PRINT TAB 10;"RECORD NO. ";Q
3772 PRINT AT 4,0;"DISPLAY NO. ";T
3774 PRINT AT 12,0;R$(Q,1 TO 4);R$(Q,5);C$;R$(Q,7);R$(Q,8);C$;R$(Q,10 TO 12);C$;R$(Q,14 TO 16);C$;R$(Q,18 TO 20);C$;R$(Q,22);R$(Q,23);R$(Q,24);C$;R$(Q,26 TO 27);R$(Q,28);R$(Q,29 TO 30);C$;R$(Q,32)
3776 PRINT AT 20,0;"PRESS NEWLINE FOR ANOTHER RECORD"
3778 PRINT AT 21,6;"OR M FOR MENU"
3780 INPUT Z$
3782 IF Z$=" " THEN GOTO 3756
3784 IF Z$="M" THEN GOTO 120
3786 GOTO 3780
4000 CLS
4010 PRINT AT 5,0;"PROGRAM TAKES ";PEEK 16396+256*PEEK 16397-16509;" BYTES."
4020 PRINT AT 8,0;"VARIABLES TAKE ";PEEK 16404+256*PEEK 16405-PEEK 16400-256*PEEK 16401;" BYTES."
4030 PRINT AT 11,0;"DISPLAY TAKES ";PEEK 16400+256*PEEK 16401-PEEK 16396-256*PEEK 16397;" BYTES."
4040 PRINT AT 14,0;"YOU HAVE ";PEEK 16386+256*PEEK 16387-PEEK 16412-256*PEEK 16413;" BYTES STILL AVAILABLE."
4100 PAUSE 1000
4200 POKE 16437,255
4300 GOTO 120
5000 CLS
5010 PRINT AT 2,0;"ENTRY OF RECORD NUMBER ";RN
5020 PRINT AT 4,0;"[inv [illegible]] ";
5030 INPUT A$(1)
5031 IF A$(1)<="0000" OR A$(1)>"9999" THEN GOTO 5030
5035 PRINT A$(1)
5040 PRINT "[inv [illegible]] ";
5045 INPUT B$(1)
5046 IF B$(1)="A" OR B$(1)="B" OR B$(1)="C" OR B$(1)="-" THEN GOTO 5050
5047 GOTO 5045
5050 PRINT B$(1)
5055 PRINT "[inv [illegible]] ";
5060 INPUT D$(1)
5061 IF D$(1)="I" OR D$(1)="V" OR D$(1)="-" THEN GOTO 5065
5062 GOTO 5060
5065 PRINT D$(1)
5070 PRINT "[inv [illegible]] ";
5075 INPUT E$(1)
5076 IF E$(1)="R" OR E$(1)="C" OR E$(1)="O" OR E$(1)="-" THEN GOTO 5080
5077 GOTO 5075
5080 PRINT E$(1)
5085 PRINT "[inv [illegible]] ";
5090 INPUT F$(1)
5091 IF F$(1)="---" THEN GOTO 5095
5093 IF F$(1)<="000" OR F$(1)>"999" THEN GOTO 5090
5095 PRINT F$(1)
5100 PRINT "[inv [illegible]] ";
5105 INPUT G$(1)
5106 IF G$(1)="---" THEN GOTO 5110
5107 IF G$(1)<="000" OR G$(1)>"999" THEN GOTO 5105
5110 PRINT G$(1)
5115 PRINT "[inv [illegible]] ";
5120 INPUT H$(1)
5121 IF H$(1)="---" THEN GOTO 5125
5122 IF H$(1)<="000" OR H$(1)>"999" THEN GOTO 5120
5125 PRINT H$(1)
5130 PRINT "[inv [illegible]]";
5135 INPUT I$(1)
5136 IF I$(1)="N" OR I$(1)="E" OR I$(1)="S" OR I$(1)="W" OR I$(1)="-" THEN GOTO 5140
5137 GOTO 5135
5140 PRINT I$(1)
5145 PRINT "[inv [illegible]] ";
5150 INPUT J$(1)
5151 IF J$(1)="R" OR J$(1)="L" OR J$(1)="-" THEN GOTO 5155
5152 GOTO 5150
5155 PRINT J$(1)
5160 PRINT "[inv BODY-HEAD FACING:] ";
5165 INPUT K$(1)
5166 IF K$(1)="N" OR K$(1)="E" OR K$(1)="S" OR K$(1)="W" OR K$(1)="-" THEN GOTO 5170
5167 GOTO 5165
5170 PRINT K$(1)
5175 PRINT "[inv BODY-AGE IN YEARS OR [illegible]] ";
5179 INPUT L$(1)
5180 IF L$(1)="OA" OR L$(1)="YA" OR L$(1)="MA" OR L$(1)="?A" OR L$(1)="--" THEN GOTO 5186
5181 IF L$(1)>"A" THEN GOTO 5179
5182 IF L$(1)>"99" OR L$(1)<"00" THEN GOTO 5179
5183 IF L$(1)>="00" OR L$(1)<="99" THEN GOTO 5186
5186 PRINT L$(1)
5190 PRINT "[inv BODY-SEX OR IF [illegible]]";
5195 INPUT M$(1)
5196 IF M$(1)="M" OR M$(1)="F" OR M$(1)="C" OR M$(1)="-" THEN GOTO 5200
5197 GOTO 5195
5200 PRINT M$(1)
5205 PRINT "[inv [illegible]] ";
5210 INPUT N$(1)
5211 IF N$(1)<"00" OR N$(1)>"99" THEN GOTO 5210
5215 PRINT N$(1)
5220 PRINT "[inv [illegible]] ";
5225 INPUT O$(1)
5226 IF O$(1)="Y" OR O$(1)="N" THEN GOTO 5230
5227 GOTO 5225
5230 PRINT O$(1)
5400 PRINT AT 19,0;"IS THIS CORRECT, Y OR N?"
5420 INPUT Z$
5430 IF Z$="N" THEN GOTO 5570
5440 IF Z$="Y" THEN GOTO 5460
5450 GOTO 5420
5460 LET R$(RN,1 TO 4)=A$(1)
5461 LET R$(RN,5)=B$(1)
5462 LET R$(RN,7)=D$(1)
5463 LET R$(RN,8)=E$(1)
5464 LET R$(RN,10 TO 12)=F$(1)
5465 LET R$(RN,14 TO 16)=G$(1)
5466 LET R$(RN,18 TO 20)=H$(1)
5467 LET R$(RN,22)=I$(1)
5468 LET R$(RN,23)=J$(1)
5469 LET R$(RN,24)=K$(1)
5470 LET R$(RN,26 TO 27)=L$(1)
5471 LET R$(RN,28)=M$(1)
5472 LET R$(RN,29 TO 30)=N$(1)
5473 LET R$(RN,32)=O$(1)
5540 PRINT AT 19,0;"RECORD HAS BEEN ADDED TO FILE"
5550 LET RN=RN+1
5560 RETURN
5570 CLS
5580 PRINT AT 19,0;"ENTRY CANCELLED"
5590 RETURN
9300 LET OK=0
9310 IF X$(1)=" " THEN RETURN
9320 FOR I=1 TO 4
9330 IF X$(I)=" " OR X$(I)<="9" AND X$(I)>="0" THEN GOTO 9350
9340 RETURN
9350 NEXT I
9360 LET VN=VAL X$
9370 IF VN>N OR VN=0 THEN RETURN
9380 LET OK=1
9390 RETURN
9400 STOP
9500 SAVE "CEMETERIE[inv S]"
9500 GOTO 120
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.