T:TEST PROGRAM AND TUTORIAL OF PILOT-8080 FUNCTIONS
T:FROM "DR. DOBB'S JOURNAL", VOLUME 2, NUMBER 4 (APRIL 1977).
T:"PILOT" IS AN ANACRONYM FOR PROGRAMMED INQUIRY, LEARNING OR TEACHING.
NEW$:
T:
T:YOU CAN TRY PILOT CORE (STANDARD) INSTRUCTIONS:
:  "*LABEL" TO LABEL A PLACE.
:  "T:"     TO PRESENT TEXT.
:  "A:"     TO ACCEPT AN ANSWER.
:  "M:"     TO MATCH ELEMENTS OF AN ANSWER.
:  "J:"     TO JUMP TO A LABELED PLACE.
:  "U:"     TO USE A SUBROUTINE.
:  "E:"     TO END A SUBROUTINE OR THE ENTIRE PROGRAM.
:  "C:"     TO PERFORM LIMITED COMPUTATIONS.
:  "R:"     TO INSERT A REMARK WITH NO OPERATIONAL EFFECT.
:
:BEGIN BY TYPING ANYTHING, THEN PRESS "RETURN".
:  USE "DELETE" OR "BACKSPACE" TO ERASE ONE LETTER,
:  AND "^U" (CONTROL-U) TO DELETE THEN ENTIRE LINE.
A:$WHAT
T:YOU TYPED $WHAT.
T:  "$WHAT" IS WHAT YOU TYPED.
T:  PRESS "RETURN" TO CONTINUE.
A:
T:
:"Y" OR "N" APPENDED TO ANY INSTRUCTION MAKES ITS USE CONDITIONAL
:  UPON THE LAST ATTEMPTED MATCH.
:  "Y:" OR "N:" ALONE ARE SHORTHAND VERSIONS OF "TY:" AND "TN:".
T:
*TESTM
T:I WILL LOOK FOR "ABC", " DEF", "GHI ", OR " JKL ".
T:  NOTE THE SPACES.  THEY ARE IMPORTANT IF THE LETTERS WE ARE 
T:  TRYING TO MATCH ARE NOT AT EITHER END OF A LINE.
A:
M:ABC, DEF,GHI , JKL ,
TY:MATCH
TN:NO MATCH
   U:*ASK
   JY:*TESTM
   J:TESTC

*ASK
T:AGAIN? (Y OR N)
A:
M: Y
E:
*TESTC
T:TYPE A NUMBER FROM 0 TO 99
T:  I USE THE FIRST TWO DIGITS ENTERED.
   A:#A
T:ANOTHER NUMBER PLEASE
   A:#B
T:YOUR NUMBERS ARE #A AND #B.
T:  I WILL SUBTRACT THEM.
   C:C=A-B
T:#A - #B = #C
T:
T:   TYPE "NEXT" TO GO ON
A:
M:NEXT
   JN:*TESTC
T:
*TESTPLUS
   C:A=0
   C:B=0
T:TESTS CAN BE CONDITIONAL ON A NUMERIC VALUE > 0.
:  THE NUMERIC VARIABLE IS APPENDED, AS IN "J(X):*LABEL".
T:
T:TYPE "ABC" OR "DEF"
A:
M:ABC
  CY:A=1
M:DEF
  CY:B=1
T(A):"ABC" FOUND
T(B):"DEF" FOUND
  C:C=A+B
J(C):*END
T:NEITHER SET WAS MATCHED
*END
T:END OF TEST
  U:*ASK
  JY:TESTPLUS
T:
:EIGHT OTHER INSTRUCTIONS ARE AVAILABLE IN THIS SYSTEM:
:  "MC:"     TO LOOK FOR TEXT WITH COMMAS IN IT.
:  "INMAX:"  TO LIMIT THE NUMBER OF CHARACTERS ACCEPTED.
:  "NEW$"    TO ERASE STORED $TEXT (STRING VARIABLES).
:  "DP:"     TO DISPLAY THE CURRENT PROGRAM UPON THE CONSOLE.
:  "LOAD:"   TO LOAD A NEW PROGRAM ($TEXT REMAINS).
:  "SAVE"    TO SEND THE CURRENT PROGRAM TO THE DISK.
:  "PRINT:"  TO SEND THE CURRENT PROGRAM TO THE PRINTER.
:  "BYE:"    TO LEAVE PILOT AND RETURN TO THE OPERATING SYSTEM.
T:
T:YOU CAN LOOK FOR TEXT WITH COMMAS IN IT; THE CARET (^) IS USED
:  AS A SEPARATOR FOR "MC:".
*TESTMC
T:
T:I WILL LOOK FOR "ABC,D" OR "A,BC"...
A:$ENTRY
MC:ABC,D^A,BC
Y:YES, $ENTRY IS OK.
N:NO, YOU TYPED $ENTRY INSTEAD OF THE ABOVE.
  U:*ASK
  JY:*TESTMC
T:
*TESTIN
T:"INMAX:1" WILL BE USED TO LOOK FOR "A".
:  PRESS ONLY A SINGLE KEY; DO NOT PRESS "RETURN".
:        ----                  ---
  INMAX:1
  A:
  M:A
  Y:YOU TYPED AN "A".
  N:THAT WAS NOT AN "A".
  U:*ASK
  JY:*TESTIN
T:
*ERRORS
T:I WILL SHOW SOME ERROR MESSAGES.  AFTER EACH ONE, PRESS "RETURN".
:
:I WILL NOW TRY TO JUMP TO AN UNKNOWN LABEL, "*HERE".
T:  PRESS "RETURN" TO CONTINUE.
A:
  J:*HERE
T:
:NOW I WILL HAVE BAD SYNTAX IN A "C:" STATEMENT.
T:  PRESS "RETURN" TO CONTINUE.
A:
  C:X NOT Y
T:THE EXPRESSION FIELD IS DISPLAYED, ALONG WITH THE ERROR MESSAGE.
T:  PRESS "RETURN" TO CONTINUE.
A:
T:
:THE VALUE OF "#X" WILL EXCEED 99.
T:  PRESS "RETURN" TO CONTINUE.
A:
  C:X=99
  C:X=X+10
T:THE STATEMENT CAUSING OVERFLOW IS DISPLAYED.
T:  THE VALUE HAS BEEN LEFT AT #X.
T:
T:A SIMILAR MESSAGE APPEARS WHEN X IS LESS THAN -99.
T:  PRESS "RETURN" TO CONTINUE.
A:
T:TYPE "R" TO REPEAT THE ERROR MESSAGES.
  INMAX:1
  A:
  INMAX:72
  M:R
  JY:*ERRORS
T:
:AN ILLEGAL STATEMENT IS SIMPLY DISPLAYED:
MW:*
T:"MW:*" IS NOT LEGAL IN THIS SYSTEM.
T:
T:YOU CAN OBTAIN IMMEDIATE OPERATION OF ANY INSTRUCTION BY
:  PRECEEDING IT WITH "^Z" (CONTROL-Z).
:  FOR EXAMPLE, "^ZDP:" WILL DISPLAY THE CURRENT PROGRAM,
:  AND "^ZJ:*LABEL" WILL JUMP IMMEDIATELY TO "*LABEL".
:  TO RETURN PILOT TO ITS STARTING POINT, TYPE "^Z" BY ITSELF.
T:
T:TESTS AND TUTORIAL ARE NOW COMPLETE.
T:
T:SHALL I DISPLAY THIS PROGRAM NOW?
A:
M:Y,SURE,OK,WHY NOT,RIGHT,YES,YEP,SI,OUI,JA
DPY:
BYE:
