File MA11.TMP

Directory of image this file is from
This file as a plain text file

'BEGIN' 'COMENT' LINEAR PLOT PROGRAM;
	'INTEGER' X;
	'REAL' A1,B;
	LIN: WRITE (1, "I'LL PLOT YOUR LINEAR EQUATION FOR YOU!");SKIP;
	WRITE (1,"WHAT IS THE COEEFICIENT OF X?");SKIP;
	READ (1,A1);SKIP;
	WRITE (1,"WHAT IS THE CONSTANT TERM?");SKIP;
	READ (1,B);
	SKIP;SKIP;SKIP;
        WRITE (1,"         -30       -20       -10       0");
        WRITE (1,"        10        20        30");SKIP;
        WRITE (1,"          ^         ^         ^        ^");
        WRITE (1,"         ^         ^         ^");SKIP;
	'FOR'X:=-10 'STEP'1 'UNTIL'10 'DO'
	'BEGIN' 'COMENT' PLOT BLOCK;
	'INTEGER' V,PLOT;
	'REAL' CONST;
	'BOOLEAN' B1,B2;
	WRITE (1,X);
	CONST:=X*A1+B+34;
	PLOT:=ENTIER (CONST);
	B1:=PLOT<2; B2:=PLOT>65;
	'IF' B1 'THEN' 'GOTO' POINT 'ELSE'
	'IF' B2 'THEN' PLOT:=66;
	'FOR'V:=1 'STEP'1 'UNTIL'PLOT 'DO'WRITE (1," ");
	POINT:WRITE (1,"*");SKIP;
	'END'
	SKIP;SKIP;SKIP; 'GOTO'LIN
'END'
$





Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search