TUCoPS :: Antique Systems :: pdp11.txt

DEC PDP-11's

------------------------------------------------------------------------------
The Pdp-11 by Digital Systems is a quite old machine, apoximatley 10 years,
but some of them are still running, mostly in schools.  One of the more popular
operating systems, Rsts/e features BASIC plus programing language, though the
following information on it was taken mainly from and RT-11 and CS-360 
operating systems manuals, it is applicable to Rsts/e.  I have, based on my
knowledge of it, compliled a summary of all the commands, with a brief comment
about each one:


CALL "function name" [(argument list)]
-used to call assembly language user functions from a BASIC program.

Chain "file descriptor"[Line nubmer]
-Terminates execution of user program, loads and executes the specified program
 starting at the line number, if included."

Close [file #n/Virtual mem. file #n)]
-Closes the logical file specified.  If no file is specified, closes all files 
 which are open.

DATA data list
-Used in conjunction with READ to input data into an executing program.

DEF Fnletter (argument)=expression
-Defines a user function ot be used in the program (letter is any alphabetic
 letter).

DIM variable(n), variable(n,m),variable$(n),variable$(n,m)
-Reserves space for lists and tables according to subscripts specified after
 variable name.

END
-Placed at the physical end of the program to terminate program execution.

FOR variable = expression1 To expression2 Step expression3
-Sets up a loop to be executed the specified number of times.

GOSUB line number
-Used to transfer control to a specified line of a subroutine.

GO TO line number
-Used to unconditionally transfer control to other the next sequential line
 in the program.

If expression rel.op. expression THEN GO TO} line number
-Used to conditionally transfer control to the specified line in the program.

IF END #n THEN GO TO) line number
-Used to test for end file on sequential input file #n.

INPUT list
-Used to input data from the terminal keyboard or papertape device.

[LET] variable=expression
-Used to assign a value to the specified variable.

[LET] VFn(i)=expression
-Used to set the value of a virtual memory file element.

NEXT variable
-Placed at the end of a FOR loop to return control to the FOR statement.

OPEN file [FOR INPUT/OUTPUT}] [(b)] AS FILE #N [DOUBLE BUF]
-Opens a sequential file for input or output as specified.  File may be
 of the form "dev:filnam.ext" or a scalar string variable.  The nubmer of
 blocks may be specified by b.

OPEN file [FOR INPUT/OUTPUT}] [(b)] AS FILE #n [DOUBLE BUF]
-Opens a sequential file for input or output as specified.  File may be
 of form "dev:filnam.ext" or a scalar string variable.  The number of blocks
 may be specified by b.

OVERLAY "file descriptor"
-Used to overlay or merge the program currently in memory with a specified
 file, and continue execution.

PRINT list
-Used to output data to the terminal.  The list can contain expressions or text
 strings.

PRINT "text"
-Used to print a message or a string of characters.

PRINT #expression: expression list
-Outputs to a particular output device, as specified in an OPEN statement.

PRINT TAB(x);
-Used to space to the specified column.

RANDOMIZE
-Causes the random number generator to calculate different random numbers
 every time the program is run.

READ variable list
-Used to assing the values listed in a DATA statement to the specified
 variables.

REM comment
-Used to insert explanatory comments into a Basic Program.

RESTORE
-Used to reset data block pointer so the same data can be used again.

RESTORE #n
-Rewinds the input sequential file #n to the beginning.

RETURN
-Used to return program control to the statement following the last GOSUB
 statement.

STOP
-Used at the logical end of the program to terminate execution.

KEY COMMANDS
--- --------

Control U: Deletes the entire current line.  Echoes DELETED message.  On
some terminals the ESC key must be used.

Control C: Interrupts execution of a command or program and returns control to
the RT-11 monitor.  BASIC may be restarted without loss of the current program
by using the monitor REENTER command.

Control O: Stops output to the terminal and returns BASIC to the READY message
when program or command execution is completed.

EDITING AND SYSTEM COMMANDS
------- --- ------ --------

CLEAR
-Sets the array and string buffers to nulls and zeroes.

LIST
-Prints the user program currently in memory on the terminal.

LIST line number
LIST -line number
LIST Line number-[END]
LIST line number-line number
-Types out the specified program lines on the terminal

 to list without a header, use the LISTNH command

NEW "filnam"
-Does a SCRatch and sets the current program name to the one specified.

OLD "file"
-Does a SCRatch and inputs the program from the specified file.

RENAME "filnam"
-Changes the current program name to the one specified

REPLACE "dev:filnam.ext"
-Replaces the specified file with the current program

RUN
-Executes the program in memory.

RUNNH
-RUNs without printing a header

SAVE "dev:filnam.ext"
-Outputs the program in memory as the specified file

SCRatch
-Erases the entire storage area.

MATHEMATICAL FUNCTIONS
------------ ---------

ABS(x)
-Returns the absolute value of x.

ATN(x)
-Returns the archtangent or x as an angle in radians in the range + or - pi/2.

BIN(x$)
-Computes the integer value of a string of blanks(ignored), 1's and 0's.

COS(x)
-Returns the cosine of x radians.
EXP(x)
Returns the Value of e^x where e=2.71828.

INT(x)
-Returns the greatest integer less than or equal to x.

LOG(x)
-Returns the natural logarithm of x.

OCT(x$)
-Computes an integer value from a string of blanks(ignored) and the digits
0 to 7.

RND(x)
-Returns a random number between 0 and 1.

SGN(x)
-Returns a value indicating the sign of x.

SIN(x)
-Returns to sine of x radians

SQR(x)
-Returns the Square root of x.

TAB(x)
-Causes the terminal type head to tab to column number x.

STRING FUNCTIONS
------ ---------

ASC(x$)
-Returns as a decimal number the seven-bit internal code for the one-character
 string (x$).

CHR$(x)
-Generates a one-character string having the ASCII value x.

DAT$
-Returns the current date in the format 13-Apil-71

LEN(x$)
-Returns the number of characters in the string (x$)

POS(x$,y$,z)
-Searches for and returns the position of the first occurrence of y$ in x$
 starting with the zth postition.

SEG$(x$,y,z)
-Returns the string of characters in positions y through z in X$.

STR$(x)
-Returns the string which represents the numeric value of x.

TRM$(x$)
-Returns x$ withut trailing blanks.

VAL(x$)
-Returns the number represented by the string (x$)

-----------------------------------------------------------------------------
Another Great Directory from Hacker Supreme. (Ninja Squirrel /+\, Logan - 5,)
      (Zaphod Breeblebox, Silicon Rat, Lord Vision, Crazy Horse, Lancelot-1.)
-----------------------------------------------------------------------------

==============================================================================
[ ------------------- Infinity-Cartel Alliance Network --------------------- ]
[ The Cartel 1&2 Adventure/AE/BBS 5 meg ------ 206-825-6236, or 206-939-6162 ]
[ Infinity's Edge Adventure/AE/Cat/BBS 10 meg ----------------- 805-683-2725 ]
[ The Center Of Eternity BBS ---------------------------------- 817-496-1777 ]
[ ---------- The Cartel #3 and The Cartel 20 Meg AE comming soon! ---------- ]
==============================================================================

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH