Trailing-Edge
-
PDP-10 Archives
-
decuslib20-03
-
decus/20-0088/pilot.usr
There is 1 other file named pilot.usr in the archive. Click here to see a list.
PROGRAMMED INQUIRY, LEARNING OR TEACHING
THIS HELP FILE REFLECTS PILOT VERSION 5 EDIT 176.
PILOT SYNTAX:
*LABEL
OPERATOR :
OPERATOR : LITERAL
OPERATOR : *LABEL
OPERATOR : $LOCATION
OPERATOR : $LOC , LITERAL
OPERATOR : $LOC , $LOC
TYPE:
UNCONDITIONAL TYPE (T:)
EXAMPLE:
T:THIS TEXT IS TYPED OUT
T:$LOC1 (CONTENTS OF LOC1 IS TYPED OUT)
T:THE CONTENTS OF THE LOC IS $LOC.
(TYPEOUT OF STORAGE LOCATION IN LITERAL STRING)
CONDITIONAL TYPE (TY: TN:)
TYPE IF YES (TY: Y:) WILL TYPE THE LITERAL OR THE CONTENTS OF
A LOCATION IF THE "YES" FLAG IS ON (SEE MATCH AND ACCEPT).
TYPE IF NO (TN: N:) WILL TYPE THE LITERAL OR THE CONTENTS OF
A LOCATION IF THE "NO" FLAG IS ON (SEE MATCH AND ACCEPT).
A COLON (:) ON THE NEXT LINE AFTER A TYPE COMMAND WILL CONTINUE
TYPING THE LITERAL ON A NEW LINE.
T:THIS LINE IS TYPED OUT
:AND SO IS THIS ONE.
THE FIRST CHARACTER AFTER THE COLON IS SIGNIFICANT.
IF THE FIRST CHARACTER OF A LITERAL IS A SLASH (/),
THE LINE WILL HAVE NO ENDING CARRIAGE RETURN OR LINE FEED.
IF A STORAGE LOCATION IS UNDEFINED, THE TAG WILL BE TREATED
AS A LITERAL.
CURSER COMMANDS:
THE FOLLOWING CURSER COMMANDS ARE FOR THE ADDS 580 TYPE TERMINAL.
CURSER COMMANDS ARE IN THE FORMAT "@NX" OR "@X" ;
WHERE N IS THE NUMBER OF TIMES THE CURSER COMMAND IS DONE AND
X IS ONE OF THE FOLLOWING:
C CLEAR SCREEN AND GO TO THE TOP LEFT CORNER OF THE SCREEN
T GO TO TOP LEFT CORNER OF THE SCREEN
B GO TO THE BOTTOM LEFT CORNER OF THE SCREEN
U GO UP ONE LINE
D GO DOWN ONE LINE
R GO RIGHT ONE SPACE
L GO LEFT ONE SPACE
TY: CAN BE ABBREVIATED Y: AND TN: AS N:
ACCEPT:
ACCEPTING ANSWER WITHOUT SAVING (A:)
UP TO 100 CHARACTERS OR UNTIL THE CARRIAGE RETURN WILL BE
SAVED IN TEMPORARY STORAGE FOR USE BY THE MATCH COMMAND.
ACCEPTING INTO A LOCATION (A:$LOC,$LOC1,$LOC2)
ACCEPT ONE "ATOM" FOR EACH LOCATION
AN ATOM IS DEFINED AS A STRING ENDED BY A SPACE, COMMA,
OR BREAK CHARACTER (CR,LF,ALT)
AN ACCEPT STATEMENT APPLIES TO ONE LINE ONLY.
IF THERE ARE MORE ATOMS TYPED IN THAN THERE ARE LOCATIONS,
THE TRAILING ATOMS ARE IGNORED.
IF THERE ARE MORE STORAGE LOCATIONS SPECIFIED THAN ATOMS TYPED IN,
THEY ARE FILLED WITH NULLS (I.E. NON-PRINTING CHARACERS).
ACCEPT LINE (AL:$LOC)
ACCEPT FULL LINE INTO ONE STORAGE LOCATION.
THE FULL LINE IS STILL STORED IN TEMP STORAGE IN ALL CASES.
IF THE ANSWER IS "YES" OR "Y", THE "YES" FLAG WILL BE TURNED ON.
IF THE ANSWER IS "NO" OR "N", THE "NO" FLAG WILL BE TURNED ON.
EXAMPLE:
A:$FIRST,$MID,$LAST
TYPED IN:
HELLO THERE
CONTENTS:
$FIRST = HELLO
$MID = THERE
$LAST = (NULL)
AL:$FIRST
TYPED IN:
HELLO THERE
CONTENTS:
FIRST = HELLO THERE
ACCEPTING A NUMBER INTO A LOC (A:#LOC)
SAME AS NORMAL ACCEPT BUT INPUT IS CHECKED FOR NON-NUMERIC CHARACTERS.
MATCH:
STRING MATCH (M:)
MATCH THE LAST ANSWER AGAINST THE SPECIFIED CONTIGIOUS CHARACTER STRING,
WHETHER IT BE A PART OF A WORD OR A PART OF A PHRASE.
(MOVING WINDOW MATCH)
EXAMPLES:
T:NAME THE 1ST PRESIDENT
A:
M:WASHINGTON
T:GIVE ME A DAY OF THE WEEK OR ITS ABREVIATION
A:
M:MON,TUE,WED,THU,FRI,SAT,SUN
MATCH EXACT (ME:)
MATCH THE LAST ANSWER AGAINST THE STRING EXACTELY
EXAMPLE:
T:NAME THE 1ST PRESIDENT
A:$NAME
ME:GEORGE WASHINGTON
N:$NAME WASN'T THE NAME OF THE 1ST PRESIDENT
MATCH AGAINST LOCATION
EXAMPLE:
ME:$ANS (MATCH $ANS AGAINST LAST TYPED IN LINE)
MATCH ONE LOCATION AGAINST ANOTHER EXACTELY
EXAMPLE:
M:$LOC1,$LOC2
TN:$LOC1 DOES NOT EQUAL $LOC2
MATCH LOCATION AGAINST LITERAL:
MATCH IF EQUAL (M:$LOC,LITERAL)
EXAMPLES:
M:$COUNT,5 (MATCH IF COUNT = 5)
M:$FIRST,HELLO (MATCH IF $FIRST=HELLO)
MATCH AGAINST LOCATION IS ALWAYS MATCH EXACT
NOTE: IN MATCH AGAINST LITERAL,
THE STORAGE LOCATION IS *ALWAYS* FIRST.
MATCH IF GREATER THAN (MG:$LOC,NUMBER - MG:$LOC1,$LOC2)
EXAMPLES:
MG:$COUNT,10 (MATCH IF COUNT > 10)
MG:$COUNT,$TOTAL (MATCH IF COUNT > TOTAL)
MG:$NUMBER (MATCH IF LAST TYPED IN LINE > $NUMBER)
MG:10 (MATCH IF LAST TYPED IN LINE > 10)
MATCH IF LESS THAN (ML:)
SAME AS MATCH IF GREATER
IF THERE IS A MATCH, THE "YES" FLAG IS TURNED ON OTHERWISE
THE "NO" FLAG IS TURNED ON.
MATCH STRINGS (EXCEPT ARITHMATIC MATCH AND LOCATION MATCH);
MAY BE CONTINUED ON ANOTHER LINE BY STARTING
THE NEXT LINE WITH A COLON (:).
EXAMPLE:
M:STRING 1,STRING2,STRING 3,STRING 4
:STRING 5,STRING 6
:STRING 7
YOU MAY TEST FOR NO ANSWER (A NULL STRING) WITH JUST
M:
OR A LOCATION WITH
M:$LOC,
JUMP:
JUMP UNCONDITIONALLY (J:*LABEL)
AFTER THE EXECUTION OF THE JUMP COMMAND,
THE PROGRAM WILL CONTINUE WITH THE INSTRUCTION AT [LABEL].
CONDITIONAL JUMP (JY:*LABEL JN:*LABEL)
JUMP TO THE SPECIFIED LABEL ON THE CONDITION SPECIFIED.
COMPUTED JUMP: (J:$LOC,*LABEL1,*LABEL2,*LABEL3,ETC.)
ON THE CONTENTS OF THE STORAGE LOCATION,
JUMP TO THE CORRESPONDING LABEL.
IF THE LOCATION CONTAINS ZERO
OR IS GREATER THAN THE NUMBER OF LABELS,
CONTINUE WITH THE NEXT INSTRUCTION.
SUBROUTINE CALLS:
SUBROUTINE CALLS (U:*LABEL UY:*LABEL UN:*LABEL)
SAME AS JUMPS, BUT WILL RETURN TO THE NEXT INSTRUCTION
AT THE END OF THE SUBROUTINE.
SUBROUTINES MAY BE NESTED 10 LEVELS DEEP.
SUBROUTINES MAY CALL THEMSELVES.
COMPUTED SUBROUTINE CALLS (U:$LOC,*LABEL1,*LABEL2,ETC.)
SAME AS COMPUTED JUMPS.
EXTERNAL SUBROUTINE CALLS: (L:GLOBAL,$LOC,$LOC)
FOR USE IN CALLING EXTERNAL SUBROUTINE
TO CALL EXTERNAL SUBROUTINE "FOO" AND HAVE IT USE TAG1,TAG2;
L:FOO,$TAG1,$TAG2
(RETURN HERE)
MACRO LINKING SEQUENCE:
PUSHJ 17,GLOBAL##
INTERNAL LOC,LOC,...
EXTERNAL SUBROUTINE DEFINITION (S:GLOBAL,$LOC,$LOC)
TO DEFINE EXTERNAL SUBROUTINE "FOO" THAT WILL USE TAG1,TAG2;
S:FOO,$TAG1,$TAG2
... (BODY OF EXTERNAL SUBROUTINE)
E: (RETURN TO MAIN PROGRAM)
MACRO LINKING SEQUENCE:
GLOBAL::
EXTERNAL LOC,LOC,...
EXIT:
UNCONDITIONAL EXIT (E:)
AT THE LOGICAL END OF THE PROGRAM, THE EXIT COMMAND WILL
CLOSE ANY FILES OPEN AND PUT YOU BACK TO MONITOR MODE.
AT THE END OF THE SUBROUTINE, THE EXIT COMMAND WILL
RETURN ONE LEVEL.
CONDITIONAL EXIT (EY: EN:)
PERFORM THE EXIT FUNCTION IF THE SPECIFIED FLAG IS ON.
QUIT (EQ:)
EXIT TO MONITOR FROM A SUBROUTINE
EXIT CALL (EC:)
TERMINATE THE CURRENT PROGRAM AND RUN THE PROGRAM NAMED
EITHER LITERALLY OR IN A STORAGE LOCATION.
EXAMPLES:
EC:PROG2 (RUN PROG2.SAV)
EC:$RUNIT (RUN WHAT IS STORED IN RUNIT)
EXIT LOGOUT (EL:)
RUN THE SYSTEM CUSP THAT LOGS THE USER OFF OF HIS TERMINAL.
INPUT/OUTPUT
OPENS (OI: OO:)
OPEN FOR INPUT (OI:)
THIS COMMAND:
1. CLOSES ANY FILE THAT WAS OPEN FOR INPUT ON THE I/O CHANNEL
2. FINDS THE SPECIFIED FILE
3. POSITIONS THE FILE TO READ THE FIRST RECORD
THE FILENAME MAY BE SPECIFIED LITERALLY,
OR BE IN A STORAGE LOCATION.
EXAMPLE
OI:1,PILOT.HLP (OPEN FILE PILOT.HLP ON I/O CHANNEL 1)
OI:3,$FILNAM (OPEN FILE SPECIFIED IN FILNAM ON CHANNEL 3)
NOTE: ALL FILENAMES MUST BE IN THE FORMAT:
FILNAM.EXT
OPEN FOR OUTPUT (OO:FILENAME)
1. CLOSES ANY FILE THAT WAS OPEN FOR OUTPUT ON THE I/O CHANNEL
2. CREATES (SUPERCEDES) THE SPECIFIED FILE
3. POSITIONS THE FILE TO WRITE THE FIRST RECORD
EXAMPLE:
OO:2,FILOUT.EXT (OPEN FOR OUTPUT FILE FILOUT.EXT ON CHANNEL 2)
OO:4,$NAME
NOTE: THE OPEN COMMAND *MUST* BE BEFORE ANY 'PUT' OR 'GET'.
MULTI-FILE I/O
IN ORDER TO HAVE MULTIPLE FILES OPEN FOR I/O,
YOU MUST HAVE A CORRESPONDANCE BETWEEN THE I/O OPERATION
(GET & PUT) AND THE FILE INITIALIZATION (OPENS).
THIS RELATION IS THE I/O CHANNEL ASIGNED WHEN THE FILE IS
OPENED.
THUS ALL 'GETS' THAT WANT TO REFERENCE THE FILE OPENED ON
CHANNEL 1 MUST USE CHANNEL 1 ALSO.
IN ORDER TO COMPILE OLDER PILOT PROGRAMS, DEFAULT CHANNELS ARE ASSIGNED
CHANNEL 1 IS ASSIGNED FOR ALL OI: AND G: WITH NO CHANNEL GIVEN
CHANNEL 2 IS ASSIGNED FOR ALL OO: AND P: WITH NO CHANNEL GIVEN
A RECORD IS A STRING OF UP TO 74 CHARACTERS DELIMITED
BY A CARRAGE RETURN.
PUT:
PUT INFORMATION INTO A DISK FILE (P: PY: PN:)
SEQUENTIALLY PUT THE CONTENTS OF THE SPECIFIED STORAGE
LOCATION(S) INTO THE DISK FILE THAT WAS OPEN FOR OUTPUT
ON THE SPECIFIED I/O CHANNEL.
EXAMPLE OF A PROGRAM THAT CREATES ANOTHER PILOT PROGRAM.
OO:1,TEST.PIL (CREATE TEST.PIL)
C:LINE=T:THIS IS A TEST
(STORE A LITERAL THAT IS
A PILOT COMMAND)
(SEE COMPUTE BELOW)
C:LINE2=E: (STORE THE EXIT LINE)
P:1,$LINE,$LINE2 (WRITE BOTH LINES)
E: (CLOSE THE OUTPUT FILE AND EXIT)
GET:
GET DISK-FILE RECORDS (G: GY: GN:)
GET THE RECORD(S) OF THE FILE SPECIFIED
BY THE OPEN INPUT (OI:) COMMAND SEQUENTIALLY.
AFTER EACH "GET" THE VALUE OF THE YES/NO FLAG IS DESTROYED
IT IS "YES" UNTIL AN END-OF-FILE HAS BEEN REACHED,
IT IS THEN "NO".
EXAMPLE OF A PROGRAM THAT TYPES OUT FILE "FOO.TXT".
OI:1,FOO.TXT (OPEN FOR INPUT)
*LOOP
G:1,$X (GET A LINE)
EN: (EXIT IF EOF)
T:$X (TYPE LINE)
J:*LOOP (BRANCH BACK)
GET CONNECT TIME (GC:$LOC)
GET CONNECT (ELAPSED) TIME SINCE PROGRAM START
THE ELAPSED TIME IN SECONDS FROM THE PROGRAM INITIALIZATION
IS PUT IN THE SPECIFIED LOCATION.
GET DATE (GD:$LOC)
GET THE DATE IN MM-DD-YY
GET DAYTIME (GT:$LOC)
GET THE TIME OF DAY IN HH:MM:SS (24 HOUR FORMAT)
GET RANDOM NUMBER (GR:$LOC)
A RANDOM NUMBER FROM 1 TO 10 IS PUT IN THE LOCATION.
GET LENGTH (GL:$SIZE,$STRING)
THE NUMBER OF CHARACTERS IN $STRING IS PLACED IN $SIZE.
INTERCEPT: (I: IY: IN:)
THIS COMMAND INTERCEPTS CONTROL-C'S AND RENDERS THEM HELPLESS.
IT HAS NO ARGUMENTS AND ONLY STOPS TRAPING UPON THE EXECUTION OF
SOME FLAVOR OF MAIN-LINE EXIT.
COMPUTE: (C: CY: CN:)
UNCONDITIONAL COMPUTE (C:)
SYNTAX IS IN ABOUT THE SAME FORM AS FORTRAN/BASIC
EXCEPT:
1. THERE IS NO HIREARCHY (I.E. PARENTHESES USED ONLY FOR ARRAYS).
2. STRICT LEFT TO RIGHT SCAN.
3. NO $ ARE USED IN THE COMPUTE SCAN. <<-----*****
IF THE VARIABLE IS DEFINED, IT IS A STORAGE LOCATION.
IF NOT IT IS A NUMERIC LITERAL;
(EXCEPT IN THE CASE OF A QUOTED LITERAL).
4. FOUR FUNCTIONS ONLY (+,-,/,*)
5. SINGLE DIMENSION ARRAYS ONLY
6. INTEGERS ONLY
EXAMPLE:
C:X=Y+Z+3*TOTAL
T:$Y+$Z+3*$TOTAL=$X
COMPUTE AS DATA MOVE:
YOU MAY MOVE A LITERAL INTO A LOCATION WITH
C:LOC="LITERAL STRING"
C:LOC="TWO LINE
:LITERAL"
C:Z=""
(Z=NULL STRING)
STRING MANIPULATION:
THERE ARE TWO STRING MANIPULATION COMMANDS;
CONCATINATE STRING (CS:)
TO CONCATINATE STRINGS STR1, STR2, & STR3 AND PUT THEM IN DEST;
CS:$DEST,$STR1,$STR2,$STR3
BREAK STRING: (BS:)
IT TAKES TWO ARGUMENTS, FOR EXAMPLE;
BS:$DEST,$STR1
THE CHARACTERS IN STR1 ARE TRANSFERRED TO DEST UNTIL A SPACE
OR A TAB IS READ. AT THE END OF THE OPERATION, THE FIRST "WORD"
OF THE STRING IS IN DEST AND THE REST OF THE STRING REMAINS
IN STR1. THE SPACE OR TAB IS LOST.
DIMENSION: (D:)
USED TO ALLOCATE TABLE SPACE
IT MUST BE USED BEFORE ANY STORAGE LOCATION IS REFERENCED.
EXAMPLE:
D:$TABLE(50),$FOO(10) ;CREATE AN ARRAY CALLED $TABLE 50 LOCATIONS LONG
;AND $FOO 10 LOCATIONS LONG.
NUMERIC DEFINITION (NUM:)
IF A VARIABLE IS KNOWN TO BE USED FOR NUMERIC VALUES ONLY,
THERE IS NO NEED TO ALLOCATE 74 CHARACTERS FOR ONE NUMBER
WHEN LESS THAN 10 CHARACTERS WILL BE NEEDED.
EXAMPLE:
NUM:$TAG1,$TAG2,... ;$TAG1,$TAG2,.. ARE ALLOCATED 9 CHARACTERS OF STORAGE
REMARKS: (R:)
EVERYTHING AFTER THE "R:" IS IGNORED BY THE COMPILER
LOCATIONS & LABELS:
ALL LOCATIONS AND LABELS MUST BE ALPHANUMERIC AND
MUST BE LESS THAN OR EQUAL TO 6 CHARACTERS
(EXCLUDING THE $ OR *).
"*" BEFORE A LABEL DENOTES THAT THE LABEL IS AN EXPLICITELY
DEFINED LOCATION CONTAINING AN INSTRUCTION.
"$" BEFORE A LABEL DENOTES A IMPLICETLY DEFINED STORAGE AREA.
(EXCEPT IN THE COMPUTE STATEMENT)
MISC.:
EACH STORAGE LOCATION WILL HOLD 74 CHARACTERS.
DEFAULT CONTENTS OF ALL DEFINED STORAGE IS AN ASCII ZERO (0).
(NOT TO BE CONFUSED WITH AN ASCII NULL)
ALL ARITHMETIC IS INTEGER ARITHMETIC.
COMMAND STRING FORMAT:
RELFIL.EXT,DEV:LSTFIL.EXT_DEV:SOURCE.EXT/SWITCH/SWITCH
SWITCHES:
N NO ERROR LISTING ON TTY
M MAP OF LOCATIONS OF TAGS AND VARIABLES
STANDARD COMPILER DEFAULTS
PILOT MAY BE RUN WITH COMPIL-CLASS COMMANDS,
IF THE FILE NAME HAS A .PIL EXTENSION.
FOR MORE INFORMATION,
OR HAVE HELPFUL COMMENTS OR PRAISE SEE BRUCE TANNER