home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / systems / pdp11.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  7.6 KB  |  255 lines

  1. ------------------------------------------------------------------------------
  2. The Pdp-11 by Digital Systems is a quite old machine, apoximatley 10 years,
  3. but some of them are still running, mostly in schools.  One of the more popular
  4. operating systems, Rsts/e features BASIC plus programing language, though the
  5. following information on it was taken mainly from and RT-11 and CS-360 
  6. operating systems manuals, it is applicable to Rsts/e.  I have, based on my
  7. knowledge of it, compliled a summary of all the commands, with a brief comment
  8. about each one:
  9.  
  10.  
  11. CALL "function name" [(argument list)]
  12. -used to call assembly language user functions from a BASIC program.
  13.  
  14. Chain "file descriptor"[Line nubmer]
  15. -Terminates execution of user program, loads and executes the specified program
  16.  starting at the line number, if included."
  17.  
  18. Close [file #n/Virtual mem. file #n)]
  19. -Closes the logical file specified.  If no file is specified, closes all files 
  20.  which are open.
  21.  
  22. DATA data list
  23. -Used in conjunction with READ to input data into an executing program.
  24.  
  25. DEF Fnletter (argument)=expression
  26. -Defines a user function ot be used in the program (letter is any alphabetic
  27.  letter).
  28.  
  29. DIM variable(n), variable(n,m),variable$(n),variable$(n,m)
  30. -Reserves space for lists and tables according to subscripts specified after
  31.  variable name.
  32.  
  33. END
  34. -Placed at the physical end of the program to terminate program execution.
  35.  
  36. FOR variable = expression1 To expression2 Step expression3
  37. -Sets up a loop to be executed the specified number of times.
  38.  
  39. GOSUB line number
  40. -Used to transfer control to a specified line of a subroutine.
  41.  
  42. GO TO line number
  43. -Used to unconditionally transfer control to other the next sequential line
  44.  in the program.
  45.  
  46. If expression rel.op. expression THEN GO TO} line number
  47. -Used to conditionally transfer control to the specified line in the program.
  48.  
  49. IF END #n THEN GO TO) line number
  50. -Used to test for end file on sequential input file #n.
  51.  
  52. INPUT list
  53. -Used to input data from the terminal keyboard or papertape device.
  54.  
  55. [LET] variable=expression
  56. -Used to assign a value to the specified variable.
  57.  
  58. [LET] VFn(i)=expression
  59. -Used to set the value of a virtual memory file element.
  60.  
  61. NEXT variable
  62. -Placed at the end of a FOR loop to return control to the FOR statement.
  63.  
  64. OPEN file [FOR INPUT/OUTPUT}] [(b)] AS FILE #N [DOUBLE BUF]
  65. -Opens a sequential file for input or output as specified.  File may be
  66.  of the form "dev:filnam.ext" or a scalar string variable.  The nubmer of
  67.  blocks may be specified by b.
  68.  
  69. OPEN file [FOR INPUT/OUTPUT}] [(b)] AS FILE #n [DOUBLE BUF]
  70. -Opens a sequential file for input or output as specified.  File may be
  71.  of form "dev:filnam.ext" or a scalar string variable.  The number of blocks
  72.  may be specified by b.
  73.  
  74. OVERLAY "file descriptor"
  75. -Used to overlay or merge the program currently in memory with a specified
  76.  file, and continue execution.
  77.  
  78. PRINT list
  79. -Used to output data to the terminal.  The list can contain expressions or text
  80.  strings.
  81.  
  82. PRINT "text"
  83. -Used to print a message or a string of characters.
  84.  
  85. PRINT #expression: expression list
  86. -Outputs to a particular output device, as specified in an OPEN statement.
  87.  
  88. PRINT TAB(x);
  89. -Used to space to the specified column.
  90.  
  91. RANDOMIZE
  92. -Causes the random number generator to calculate different random numbers
  93.  every time the program is run.
  94.  
  95. READ variable list
  96. -Used to assing the values listed in a DATA statement to the specified
  97.  variables.
  98.  
  99. REM comment
  100. -Used to insert explanatory comments into a Basic Program.
  101.  
  102. RESTORE
  103. -Used to reset data block pointer so the same data can be used again.
  104.  
  105. RESTORE #n
  106. -Rewinds the input sequential file #n to the beginning.
  107.  
  108. RETURN
  109. -Used to return program control to the statement following the last GOSUB
  110.  statement.
  111.  
  112. STOP
  113. -Used at the logical end of the program to terminate execution.
  114.  
  115. KEY COMMANDS
  116. --- --------
  117.  
  118. Control U: Deletes the entire current line.  Echoes DELETED message.  On
  119. some terminals the ESC key must be used.
  120.  
  121. Control C: Interrupts execution of a command or program and returns control to
  122. the RT-11 monitor.  BASIC may be restarted without loss of the current program
  123. by using the monitor REENTER command.
  124.  
  125. Control O: Stops output to the terminal and returns BASIC to the READY message
  126. when program or command execution is completed.
  127.  
  128. EDITING AND SYSTEM COMMANDS
  129. ------- --- ------ --------
  130.  
  131. CLEAR
  132. -Sets the array and string buffers to nulls and zeroes.
  133.  
  134. LIST
  135. -Prints the user program currently in memory on the terminal.
  136.  
  137. LIST line number
  138. LIST -line number
  139. LIST Line number-[END]
  140. LIST line number-line number
  141. -Types out the specified program lines on the terminal
  142.  
  143.  to list without a header, use the LISTNH command
  144.  
  145. NEW "filnam"
  146. -Does a SCRatch and sets the current program name to the one specified.
  147.  
  148. OLD "file"
  149. -Does a SCRatch and inputs the program from the specified file.
  150.  
  151. RENAME "filnam"
  152. -Changes the current program name to the one specified
  153.  
  154. REPLACE "dev:filnam.ext"
  155. -Replaces the specified file with the current program
  156.  
  157. RUN
  158. -Executes the program in memory.
  159.  
  160. RUNNH
  161. -RUNs without printing a header
  162.  
  163. SAVE "dev:filnam.ext"
  164. -Outputs the program in memory as the specified file
  165.  
  166. SCRatch
  167. -Erases the entire storage area.
  168.  
  169. MATHEMATICAL FUNCTIONS
  170. ------------ ---------
  171.  
  172. ABS(x)
  173. -Returns the absolute value of x.
  174.  
  175. ATN(x)
  176. -Returns the archtangent or x as an angle in radians in the range + or - pi/2.
  177.  
  178. BIN(x$)
  179. -Computes the integer value of a string of blanks(ignored), 1's and 0's.
  180.  
  181. COS(x)
  182. -Returns the cosine of x radians.
  183. EXP(x)
  184. Returns the Value of e^x where e=2.71828.
  185.  
  186. INT(x)
  187. -Returns the greatest integer less than or equal to x.
  188.  
  189. LOG(x)
  190. -Returns the natural logarithm of x.
  191.  
  192. OCT(x$)
  193. -Computes an integer value from a string of blanks(ignored) and the digits
  194. 0 to 7.
  195.  
  196. RND(x)
  197. -Returns a random number between 0 and 1.
  198.  
  199. SGN(x)
  200. -Returns a value indicating the sign of x.
  201.  
  202. SIN(x)
  203. -Returns to sine of x radians
  204.  
  205. SQR(x)
  206. -Returns the Square root of x.
  207.  
  208. TAB(x)
  209. -Causes the terminal type head to tab to column number x.
  210.  
  211. STRING FUNCTIONS
  212. ------ ---------
  213.  
  214. ASC(x$)
  215. -Returns as a decimal number the seven-bit internal code for the one-character
  216.  string (x$).
  217.  
  218. CHR$(x)
  219. -Generates a one-character string having the ASCII value x.
  220.  
  221. DAT$
  222. -Returns the current date in the format 13-Apil-71
  223.  
  224. LEN(x$)
  225. -Returns the number of characters in the string (x$)
  226.  
  227. POS(x$,y$,z)
  228. -Searches for and returns the position of the first occurrence of y$ in x$
  229.  starting with the zth postition.
  230.  
  231. SEG$(x$,y,z)
  232. -Returns the string of characters in positions y through z in X$.
  233.  
  234. STR$(x)
  235. -Returns the string which represents the numeric value of x.
  236.  
  237. TRM$(x$)
  238. -Returns x$ withut trailing blanks.
  239.  
  240. VAL(x$)
  241. -Returns the number represented by the string (x$)
  242.  
  243. -----------------------------------------------------------------------------
  244. Another Great Directory from Hacker Supreme. (Ninja Squirrel /+\, Logan - 5,)
  245.       (Zaphod Breeblebox, Silicon Rat, Lord Vision, Crazy Horse, Lancelot-1.)
  246. -----------------------------------------------------------------------------
  247.  
  248. ==============================================================================
  249. [ ------------------- Infinity-Cartel Alliance Network --------------------- ]
  250. [ The Cartel 1&2 Adventure/AE/BBS 5 meg ------ 206-825-6236, or 206-939-6162 ]
  251. [ Infinity's Edge Adventure/AE/Cat/BBS 10 meg ----------------- 805-683-2725 ]
  252. [ The Center Of Eternity BBS ---------------------------------- 817-496-1777 ]
  253. [ ---------- The Cartel #3 and The Cartel 20 Meg AE comming soon! ---------- ]
  254. ==============================================================================
  255.