120 X = X2:Y = Y2: INVERSE : GOSUB 190: NORMAL : WAIT 49152,128: GET K$:K = ASC(K$): IF K >31 THEN 590
130 IF K = 13 THEN 260
140 IF K < >8 AND K < >10 AND K < >11 AND K < >21 THEN 120
150 GOSUB 190:X = X -(K = 8 AND X >1) +(K = 21 AND X <4):Y = Y -(K = 11 AND Y >1) +(K = 10 AND ((X = 1 AND Y <2) OR (X = 2 AND Y <1 +KL) OR (X = 3 AND Y <S +KL) OR (X = 4 AND Y <C +KL)))
160 IF X = 3 AND NOT (S +KL) THEN X = X -(K = 8) +(K = 21)
170 IF X = 4 AND NOT (C +KL) THEN X = 3: IF NOT S THEN X = 2
180 X2 = X:Y2 = Y: GOTO 120
190 IF X = 1 AND Y = 2 THEN X$ = M$: VTAB 15: GOTO 250
200 IF X = 1 THEN Y = 1:X$ = F$: VTAB 10: GOTO 250
210 IF X = 2 AND (Y = 1 OR LK = 1) THEN Y = 1:X$ = N$: VTAB 12: HTAB 7: GOTO 250
220 IF X = 2 THEN Y = 2:X$ = "Change Info": VTAB 13: HTAB 7: GOTO 250
230 IF X = 3 THEN Y = Y *(Y < = S +KL) +(Y >S +KL):X$ = S$(Y): VTAB 12 -S/2 +Y: HTAB 33: GOTO 250
240 IF X = 4 THEN Y = Y *(Y < = C +KL) +(Y >C +KL):X$ = C$(Y): VTAB 12 -C/2 +Y: HTAB 57
250 PRINT " "X$" ": RETURN
260 IF X = 2 AND Y = 2 THEN 490
270 A = DA(PP +1 +(Y = 2)) *(X = 1) +PP *(X = 2) +DA(PP +2 +Y) *(X = 3) +DA(PP +3 +S +Y) *(X = 4): IF A >0 THEN PP = A: GOTO 100
280 IF LK THEN 120
290 VTAB 18: PRINT : CALL -958:A$ = MID$ ("FatherMotherSpouseChild", -5 +(X +(X = 1 AND Y = 2)) *6,6): PRINT "Enter full name of "A$", or <RETURN> to cancel:"
300 PRINT A$;: GOSUB 2710: IF A$ = "" THEN 100
310 IF X >1 OR Y >1 THEN 350
320 GOSUB 2480:P1 = AP:P2 = PP: GOSUB 2530
330 IF DA(PP +2) THEN P1 = AP:P2 = DA(PP +2): GOSUB 2640
340 GOTO 1140
350 IF X >1 THEN 390
360 GOSUB 2480:P1 = AP:P2 = PP: GOSUB 2590
370 IF DA(PP +1) THEN P1 = AP:P2 = DA(PP +1): GOSUB 2640
380 GOTO 1140
390 IF X >3 THEN 420
400 GOSUB 2480:P1 = AP:P2 = PP: GOSUB 2640
410 GOTO 1140
420 GOSUB 2480:P1 = PP:P2 = AP: PRINT "Is "N$" the <F>ather or <M>other? ";
430 GET A$: IF A$ < >"M" AND A$ < >"m" AND A$ < >"F" AND A$ < >"f" THEN 430
440 A = (A$ = "M" OR A$ = "m"): PRINT MID$ ("FaMo",1 +A *2,2)"ther": PRINT : ON A +1 GOTO 450,470
450 GOSUB 2530: IF S THEN FOR J = 1 TO S: VTAB 21: PRINT : PRINT "Is "S$(J)" the mother? ";: GOSUB 2300: IF A$ = "Y" THEN A$ = S$(J): GOSUB 2480:P1 = AP: GOSUB 2590:J = S +1
460 GOTO 480
470 GOSUB 2590: IF S THEN FOR J = 1 TO S: VTAB 21: PRINT : PRINT "Is "S$(J)" the father? ";: GOSUB 2300: IF A$ = "Y" THEN A$ = S$(J): GOSUB 2480:P1 = AP: GOSUB 2530:J = S +1
480 ON (S >0) +1 GOTO 1140: NEXT J: GOTO 1140
490 VTAB 18: PRINT : CALL -958:X = 2:A$ = ">" +NF$(DA(PP)): PRINT "Enter information about "N$", or <RETURN> to cancel:": VTAB 19: PRINT : CALL -958: PRINT A$
1150 VTAB 24: HTAB 27: PRINT "Press any key to continue.";: WAIT 49152,128: GET A$: GOSUB 2160: GOTO 110
1160 TEXT : PRINT : VTAB 1: INVERSE : PRINT " NIBBLE ANCESTRY by Joseph J. Strout" TAB( 39)"Copyright (C) 1991 Mindcraft Publ. Corp." TAB( 80)" ";: NORMAL : PRINT "Use arrow keys to highlight relatives of the center person."
1170 PRINT "Press <RETURN> to move highlighted person to center.";: IF KL THEN PRINT CHR$(8)",": PRINT " or to add information to the database.";
1620 A2 = 0: PRINT L$: FOR K = 1 TO A1: PRINT : PRINT NA$(DA(XP(K))):A$ = NF$(DA(XP(K))): GOSUB 2340: IF NOT DA(XP(K) +3) THEN A$ = "No spouse.":J = 102: GOTO 1640