Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50110/bastea.dem
There are 2 other files named bastea.dem in the archive. Click here to see a list.
100'  NAME--BASICT
110'
120'  DESCRIPTION--FIRST PROGRAM IN A SEQUENCE THAT TEACHES
130'  THE BASIC LANGUAGE.
140'
150'  SOURCE--UNKNOWN
160'
170'  INSTRUCTIONS--TYPE "RUN" AND FOLLOW INSTRUCTIONS.
180'
190'
200'  *  *  *  *  *    MAIN PROGRAM   *  *  *  *  *  *  *  *  *  *  *
210'
220 PRINT"     ***PREFACE***"
230 PRINT
240 PRINT
250 PRINT"     SECTIONS OF THE FOLLOWING PROGRAM ARE NOW AVAILABLE IN "
260 PRINT"A BOOKLET ENTITLED *BEGINNING BASIC*.  DO YOU HAVE A COPY?"
270 PRINT"ANSWER THE QUESTION YES OR NO AND PRESS THE (RETURN KEY)";
280 INPUT A$
290 IF A$ = "YES" THEN 430
300 PRINT""
310 PRINT"     YOU SHOULD TYPE  NO  WHENEVER THE MACHINE ASKS YOU IF YOU"
320 PRINT"HAVE A BOOKLET.  THE MACHINE WILL THEN PRINT OUT EXACTLY"
330 PRINT"WHAT IS IN THE BOOKLET.  IN OTHER WORDS, EVERYTHING YOU NEED TO"
340 PRINT"KNOW IS AVAILABLE ON THE TELETYPE.  IT JUST TAKES A FEW MINUTES"
350 PRINT"LONGER TO PRINT OUT."
360 PRINT
370 PRINT
380 PRINT"     *     *     *     *     *     *     *"
390 PRINT
400 PRINT
410 PRINT
420 GO TO 530
430 PRINT
440 PRINT"     YOU SHOULD TYPE  YES WHENEVER THE MACHINE ASKS YOU IF"
450 PRINT"YOU HAVE A BOOKLET.  THEN YOU SHOULD READ THE EXPLANATION"
460 PRINT"IN THE BOOKLET FOLLOWED BY THE ASSIGNMENT THAT IS"
470 PRINT"PRINTED OUT ON THE TELETYPE."
480 PRINT
490 PRINT"     NOW READ YOUR FIRST EXPLANATION AND DO YOUR FIRST ASSIGNMENT."
500 PRINT"BE SURE TO READ *THINGS TO KEEP IN MIND WHILE WRITING A PROGRAM*"
510 PRINT"GOOD LUCK..."
520 STOP
530 PRINT "            BASIC, AND THE PDP 10 TIME SHARING SYSTEM"
540 PRINT
550 PRINT "     BASIC IS A VERY SIMPLE LANGUAGE FOR 'SPEAKING' TO THE"
560 PRINT"COMPUTER.  THE FORMULAS FOR CARRYING OUT ALMOST ANY NUMERICAL"
570 PRINT"CALCULATION CAN BE EXPRESSED  IN BASIC.  THE SET OF INSTRUCTIONS"
580 PRINT "TO THE COMPUTER IS CALLED A 'PROGRAM'.  THE PROGRAM CONSISTS OF"
590 PRINT "A NUMBER OF 'STATEMENTS'.  THESE STATEMENTS ARE EXECUTED OR"
600 PRINT "CARRIED OUT BY THE COMPUTER ONE BY ONE, IN ORDER, AND IN MUCH"
610 PRINT "THE SAME WAY ONE FOLLOWS A RECIPE FOR BAKING A CAKE."
620 PRINT
630 PRINT "     THERE ARE A NUMBER OF DIFFERENT KINDS OF BASIC STATEMENTS,"
640 PRINT "ALL OF WHICH WILL BE EXPLAINED IN THE COURSE OF THESE LESSONS."
650 PRINT "WE WILL START BY EXPLAINING A SIMPLE PROGRAM BUILT AROUND"
660 PRINT "THE FOLLOWING KINDS OF STATEMENTS:  LET, PRINT, AND END."
670 PRINT
680 PRINT "     LET US 'WRITE' A PROGRAM FOR COMPUTING THE AVERAGE"
690 PRINT "OF THE NUMBERS   1, 2, 5, 8   AND PRINTING THE ANSWER.  ONE"
700 PRINT "POSSIBLE PROGRAM MIGHT GO AS FOLLOWS:"
710 PRINT "          10  LET A = (1 + 2 + 5 + 8)/4"
720 PRINT "          20  PRINT A"
730 PRINT "          30  END"
740 PRINT
750 PRINT "     NOTICE HOW THE DESIRED CALCULATION IS PERFORMED IN"
760 PRINT "STATEMENT NUMBER 10, AND THE ANSWER IS ASSIGNED TO THE "
770 PRINT "VARIABLE CALLED A.  IN STATEMENT 20 THE VALUE OF  A  IS"
780 PRINT "PRINTED OUT.  STATEMENT 30 IS AN  END  STATEMENT THAT TELLS THE"
790 PRINT "COMPUTER THAT THERE IS NO MORE PROGRAM."
800 PRINT
810 PRINT "     YOUR FIRST ASSIGNMENT IS TO COPY THE ABOVE PROGRAM, AND"
820 PRINT "TO RUN IT AND GET THE ANSWER.  YOU SHOULD PROCEED AS FOLLOWS:"
830 PRINT "     1.   TYPE THE WORD     NEW     THEN PRESS THE (RETURN) KEY."
840 PRINT "     2.   WHEN THE COMPUTER ASKS FOR THE NEW PROBLEM NAME--"
850 PRINT"           TYPE THE TITLE  AVRAGE   AND THEN PRESS THE"
860 PRINT "          (RETURN) KEY."
870 PRINT "     3.   AFTER THE COMPUTER TYPES READY., SIMPLY COPY THE"
880 PRINT "          PROGRAM AS IT IS GIVEN ABOVE, PRESSING THE (RETURN)"
890 PRINT "          KEY AFTER EACH LINE, INCLUDING THE LAST."
900 PRINT"     4.   TYPE THE WORD   LIST   AND (RETURN) TO SEE WHAT THE"
910 PRINT"          MACHINE UNDERSTANDS YOUR PROGRAM TO BE."
920 PRINT "     5.   TYPE THE WORD   RUN   FOLLOWED BY PRESSING"
930 PRINT "          THE (RETURN) KEY."
940 PRINT "     6.   IF YOU HAVE COPIED THE PROGRAM CORRECTLY, THE TELETYPE"
950 PRINT "          MACHINE SHOULD PRINT OUT THE NUMBER     4     ."
960 PRINT "          IF YOU HAVE MADE A MISTAKE, LOCATE THE INCORRECT"
970 PRINT "          STATEMENT AND RETYPE IT JUST AS YOU SHOULD HAVE BEFORE."
980 PRINT "          DO NOT, REPEAT, NOT TYPE OVER THE WHOLE PROGRAM --"
990 PRINT "          ONLY THOSE STATEMENTS THAT ARE IN ERROR.  AFTER YOU"
1000 PRINT "          HAVE MADE THE CORRECTIONS, TYPE     RUN     AND"
1010 PRINT "          (RETURN) AS STATED IN STEP 4. ABOVE."
1020 PRINT "     7.   AFTER YOU ARE SATISFIED THAT YOU HAVE SUCCESSFULLY"
1030 PRINT "          DONE THIS PROBLEM, TYPE     TEST     AND (RETURN)."
1040 PRINT""
1050 PRINT
1060 PRINT"     BEFORE DOING YOUR FIRST ASSIGNMENT;"
1070 PRINT
1080 PRINT"       A) TYPE  OLD  AND HIT THE (RETURN) KEY."
1090 PRINT
1100 PRINT"       B) TYPE THE OLD PROBLEM NAME   THINGS***   AND (RETURN)."
1110 PRINT
1120 PRINT"       C) WHEN THE MACHINE IS READY, TYPE   RUN   AND (RETURN)."
1130 PRINT
1140 PRINT"       D) WHEN THE PRINTOUT IS FINISHED, DO STEP 1) OF YOUR"
1150 PRINT"          ASSIGNMENT LISTED IN  BASICT."
1160 PRINT
1170 PRINT
1180 END