Skip to main content

Full text of "mit :: rle pdp1 :: memos :: pdp29 tsIntro apr65"

See other formats


PDP-1 COMPUTER 
EIJECTRICAL ENGINEERING DEPARTJ^ENT 
M, Ift T* 
CAMBRIDGE 39/ MASSACHUSETTS 



PDP-99 
INTRODUCTION TO PDP-1 TS 
SYSTEM PROGRAMS 



April 15, 1965 



INTRODUCTION TO THE PDP-1 TIME SHARING SYSTBI 
GMIERAL I NFORT 'dATION 

This memo x^ras written to give the new user a brief introduction 
to the PDP-1 time sharing system programs. The material 
presented is sufficient information needed to operate in the 
TS system; however, only the essential features of the system 
programs are described.* Other useful and time saving features 
are described in the respective program memo* 

The computer has^ in addition to a 4096-word core memory^ 
an extra amount of memory in the foim of a magnetic drum., The 
storage space on the di'um is broken up into a number of "fields"^ 
each of which has the capacity to store 4096 l8-bit words « 
This drum memoi^ (besides being used for the time-sharing 
operation) can be used to store programs and data when there 
is not enough room in core. It is also used as a pennanent 
storage space for "utility" prograns vjhlch can be used by you* 

To execute a program that you have written for the PDP-1^ 
you must do the follo^dng things; 

i) Tell the computer, in some way^ the sequence of 
machine- language instructions that make up your pro gram „ 

2) Have the computer translate or assemble these 
instructions into a sequence of binary words « 

3) Place this binary program into core memory and have 
it executed, and 

4) check your answers to see if your prt)gram is working 
correct lyo 

The permanently stored utility programs will be of help 
to you in accomplishing the ebove tasks« One of the programs, 
EXPENSIVE TYPEliJRITSB, assists you in reading in your machine-- 
language program. The MACBO program Tclll assemble your machines- 
language program, producing a binary program^ DDT is an all- 
purpose program that will see to it that your program is 
executed. It also allovjs you to inspect and test your binary 
program for proper operation* 

Each of the three utility programs mentioned above is 
stored (in binary fom) on a different field of the magnetic 
drum,, Of course, in order to use a program you must first place 
it in core memory. This is done by typing the commands shoxm 
in Figure 1* 



— £:■ 



TURN CONSOLE SWITCH OFF 
TUim CONSOLE SVn:TCH ON 
TYPE ddt 




ILLEGAL XNSTRUGTIC 
HLT) OP CALL 
TTON PRESSED or 

hr!^k point 



Figure I, 
For example, turning the console st^itch off, then turning it 
on, then typing ddt ^ ^ will bring the program DHT from 
drum to core. Anything typed by you at this point will be 
interpreted as a command to DDT» Typing tig then OG t^ill 
cause EXPENSIVE TYPM^ITER to be brought into core, Anything 
typed at this point will be interpreted as a command to 
EXPENSIVE TYPEWRITER, 

The features of each of the programs will now be described 



''i^The letters typed by you will be underlined in this paper. 
Those typed hj the computer will not be underlined. The 
S3?mbol bJ is a carriage return^ 



-3- 



EX PMS raS TYPB 'ffil'TERL 

This program is used for the reading in or typii^s In of 
your machine language program. It is also valuable in modifying 
your machine language program - with it you can do such things 
ns Changing lines, inserting lines, deleting lines, etc. Tnis 
■orogram has a buffer storage area where a copy of your inachlne 
language program la kept, men you em;er rArju.oiv 
V,y typing 21U then OG to DOT, this buffer area is cleared. 
Altering eTt. by typing 21U then 2G will not clear this buffer. 

E.T.. has tm operating "modes", control mode and text mode. 
-n the control mode, characters typed in are cotmu^s to 
^.■PENSIVE TYPEVmrm; m the test mode, typed Input Is copied 
Iv^ectly into the buffer. The only exception to this is the 
cv,tvaoter "backspace" which in the text mode has the effect 
0- .ancelims the previous character. To go from text mode 
to ontrol mode, type a backspace immediately following a 
cam-age return or after deleting all characters from a xine, 

certain commands in the control mode put E.l'. into tne 
text -.ode. in the control mode, the typewiter prints 
m re., and In the text mode it prints in black. A .command 
la terminated by typing in a c^rliSe.I2SSS '^^ SSM* a* 
any t:Ue before the teminator is typed the command can oe 
cancei;ed by typing the character middle dot (•)« 

n^rr^cnr.^ t.r, EKPEHSIYE TYPEWRITERl 

a'the examples below, the letter N is used to signify 
the lumber of a line. For example, the title line of your 
progiam tijIII be line one, etc. 

C. Input: 

a: append, aiter the text modej add the folloirtng 
typed text onto the end of the previous contents 
of the buffer. 



Hi? insert. Enter "the t-exi moccj insert; 

typed text Immediately before line !I<. That Is, 
the first line of zhe inserted text becomes rhe 
nev7 line N«. The text is squeezed in between, the 
old lines N-1 and N; no material is lost,, 

No; change. Enter the text mcdeo Line N is entirely 
deleted and the following typed text is inserted 
j.n its place^; any number of lines may be inserted,. 

ri reado The tape in the reader is read in and appends t 
zo the end of the buffer.. 

11 V Deletion cf Information in the Buffer: 

Nd ; delete^ Line !J is deleted., 

K: killo The entire buffer is cleared. 

III» Printout: 

¥: write ^ The buffer is printed out (in black) « 

Nl*. line*, Li.ne N is printed out (in red). 

backspace: prints out the next line 

\: prints out the previous line» 

IV ^ Punching Tape 

P: punch o Tliis punches the buffer out en paper tape« 

Vo Transfer 

Ns transfer control to MACRO 

hi transfer control to DDT 



.!=;_ 



Typical Oi)erating Procedure; 

Probably the first tirae you use the computer you v?ill 
enter E.T«, by typing glU then Ogo Your program buffer t-jill 
be clear o If you have prepai'ed a B'lO-DEC program using the 
off --line f lexowriter, you may read it into the EKPENSIVS 
TYPEVmiTER text buffer by typing r^ In reading the tape In^ 
first, insert your tape vdth the 5--holed side towai'd you^ 
The input side is the right and the tape feeds from right to 
lefto Turn the reader sxritch on at the main console by 
lifting it upc Typing r vjill read in the tape into the buffer, 
After the tape is read in. remove it from the reader and turn 
the reader switch off hy pressing it down* If a tape of your 
program has not been made^ typing a^ then your program ;, will 
put your program into the buffer* After correcting any 
typing mistakes using the delete^ change^ etc* commands, you 
will be ready to enter the MAGPiO Program x^here your pi'ogram 
will be assembledo To enter MCRO type a capital No 

VJhen you have a progran in EoT«'s buffer, you can get 
a punched copy by typing the command Po Your tape will 
automatically be punched* After punching, press the tape-feed 
button on the main console to give you a couple of extra 
fanfolds of tape, and tear off your tape* This tape can now 
be used on another attempt to run your programo In this 
way it is not necessary to retype your entire program every 
time you: run ^ You should also get a typewritten copy of 
the machine language program "bj typing ¥* Lifting Sense 
Switch 1 while the buffer is being typed out by a w will 
stop the typing. 

The E«Ta has one ail-purpose error signal ■- ?* If a 
? is typed by E*T* after you have typed something, examine 
what you have done carefully. 

Important Reminders i 

l) The meaning of the backspace key to EXPEfJSIVE 
TYPEVIRITER differs depending upon the mode of operation. If 
E.T* is in the contro l mode, the backspace key means: print 
out the next line (if no previous line has been mentioned, 
this will print out the first line). If E.T* is in the 
text mode, the backspace key has two meanings. 



If a letter of text has been typed by you a backspace erases 
ite. If a backspace follows a carriage re'curn typed by you, 
it means: return to the control mode.: To not attempt to 
type a comman d to EXPENSIVE TYPEVIRITER unless it is in the 
control mode, 

2) After you type in your program and leave EXPENSIVE 
TYPElvlRITER^ you ifill probably uant to return later to make 
further changes to your program, Vlhen entering EaT^ from 
LVT the second time, be sure to enter by typing 21U then £5* 
A OG will erase your program entirely* 

3) Remember every command to EXPENSIVE TYPEl^JRITER must 
be followed by a carriage return before it is executed, 

4) It is a good idea to print out the line you wish 
to modify using the command JU before and after the change 
is made„ This way you can be sure that you are changing 
the right line and that the change xvas made correctly, 

5) After making any changes to your machine-language 
program with EK:?EI\ISIVS TYPEimiTER you must always reassemble 
your program with MACRO if you want to get a new binary 
program^ Therefore, you should leave EXPSI^ISIVS TYPM-JRITER 
using the N command to MACRO rather than the b command to 

rDT« 

The Macro program assembles the ma chine -language 

program which is located in the buffer of EXPENSIVE TYPEVJRITSR 

The assembled binary program is placed automatically on 
drum field 1, 

Commands t^o^SLACRO : 

c:. begin assembly 

s: continue assembly 

z:_ print symbols (if Sense Switch ? is up) 

b: transfer to DET 

Opera t i r^g Procedure: 

mien you enter MCRO with your machine- language program 
stored in the buffer of EXPENSIVE TYPM-JRITER, typing a c will 
begin pass 1 of assembly* If an error is discovered during 
assembly an error signal will be printed out in the format 



described be?i.ow and the assembly process will eeese. 

If an ei'ror is found on pass 1, first type s to continue 
pass 1. Then return to EXPENSIVE TYPEVJRITER by typing b then 
£1U then £G, in order to correct your machine language p5/ograi:n 
After the corrections have been made, return to Mi'^CRO u'lth N 
and try pass 1 again. If pass 1 assembles correct ly^, no error 
message will be printed out^ In this case^ tsrpe c to initiate 
pass 2. Error in assembly during pass 2 result exactly as in 
pass 1 and you should proceed as described above. 

If both passes assemble correctly you may, if you desire, 
receive a print of your table of .s^mibols by: l) Setting 
Sense Switch 2 upj 2) Typing z; 



Eiror^Signals^ 

Upon detecting an error > MACHO will print out the folloxiringi 
aaa bbbb cec dddd eee 
aaa is the three letter code indicating the error^ bbbb is 
the octal address at which the error occurred., gcc is the 
symbolic address at v;hich the error occurred^ dddd is the 
name of the last pseudo-instruction encountered^ In the case 
of an error caused by a symbol^ eee will be the symbol* Following 
is a list of the error indications in MACRO: 

ERROR rCEANING 

us."? An undefined symbol has been encountered 

by MACRO^ _? will indicate how 

the undefined symbol was being used. 

a In a pseudo-instruction argument 

w In a word 

c In a constant 

p In a parameter assignment ^assignment with 
an equal sign) 

m In a mORO instruction definition 

1 In a location assignment 

s In a start pseudo-instruction 

d In a dummy symbol assignment 
mdt Multiple definition of a tag. The 

definition of this address tag does not 
correspond to a previous definition. 



-o- 



jv^dm Iviultiple definition of a MACRO instructic 

Tne name of this WiACRO instruction 
conflicts in its first 6 characters with 
a pseudo-instruction or some other 
B^IACHO instruction name. 

2;pa Illegal parameter assigriment 

Pi(jv Multiple definition of a variaole. 

ip3_ hn illegal pseudo-instruction 

j_^s Illegal dummy symbol in the title of a 

MACRO instruction definition 

see Storage capacity exceeded 

ilf Illegal format 

tmc Too many constants 

tmv "^oo many variables 

tmp Too many parameters ^d^immy symbols) 



a?his program is a very valuable aid in debugging and testing 
your binary program. It allows you to examine the contents 
of locations of core^, to change the contents of these locations, 
to run your program, and to make use of breakpoints. VJhen 
in DDT, all typing will be performed in black, i^fter a command 
is typed by you, DGT will type a carriage return to indicate 
that the command was carried out. Therefore, do not type a 
carriage return after a command as you vjculd do in EKPEHSIVE 
TYPEl^RITER. 



Conaiiands to .DI>T:_ 



Typed immediately after returning from MACRO 
assembly. This places your symbols and their 
values with the DDT program. This allows you 
to use symbolic addresses Vv^hen communicating 
with DDT. 




^Q^ 



M « where N is a number o This takes the program from 
drum field H and places it in core memory so that 
it can be executed „ Your binary program has been 
placed on drum field 1, EXPENSIVE TYPEVmiTER is 
on drum field 21<, MACRO is on drxm field 20. 

locg: Tliis will cause the computer to begin executing 

the program which is in core starting at location 
loc. loc may be either a s;pibolic expression or 
an absolute number* 

Per an example of the above commands: 

IT 
lU 



will clear DDT's old symbol table and enter yours 
from MGROj bring in your program, from drum to 
core, and begin executing your program from location 
beg a 



Inspecting and Modifying;? 

■<MiMai>mfawiii *■ >i III! iiwi>iiijriMiiiiwiwiaiLHB!BgMwiiMMawMMMigawiiwi itiiB III wi iiiiiii wa- 

Examine a Register 

adr/i Types out the contents of register adr« 

"adr** may be a symbolic address or an octal number* 

Examples: beg-f g/ types out the contents of the 
register 2 positions past beg^ ^^/ 
types out the contents of register 55 • 



Change a Register 

adr/ exp jtf : Changes the contents of register 

adr to exp« 

Example; k/ 4 13_» examines 
the contents of the register k and 
finds it contains the number 4^ 
This is changed to 13 . 



Set the Mode 
S 



U 
H 



Convert an Expression 
exp w 



num 



ohar 



Sets DDT to type out all -ivords as 
symbolic instructions. 

Sets DDT to type out all words as 
octal numbers. 



Examples: S 

20/ 

C 

20/ 



and k 



020003 (if k - 3) 
Converts all numeric printouts to decimal 

Resets DDT so that all numeric printouts 
are in the noi^al octal mode again^ 



Examples s C 

20/ 

n 

go/ 

H 
20/ 



020003 

8195 
020003 



Types out the value of the expression eicp 
as an octal number*. 

Types out the octal number num as an 
instruction* 

Types out the character (s) char as 
concise code* 

Examples: 20/ 20003 -— ^ lac k 
(if k = 3) 
beg^ 20 (if beg Is the 

symbol for location 20} 
340-- 610420 



"11- 



Examinlng Sequences of Registers 

adr/ .o. 1 Types the contents and opens the 

register pi»eceding adr» 
Exaiiiple: tab/ 13 1 
tab-i/ ?1 1 
^^ tab-2/ 

Register tab contained 13^ tab-1 
contained 91, and tab-2 contained 0. 

adr/ **• (bs) Types out and opens the contents 

of the i*egister next in sequence 
to adr. 

(bs) means back- 

Space ' Example I ' tab/ 13 l^s) 

tab+1 61 
Register tab+1 contains 6l 

agr^ ^^, jj^ Types out the contents of the 

register addressed by the contents 
of register adr» 

Example: be^/ lac 13 ti ^^^ 
Register 13 contains 44 



^12- 
Breakpoint Commands 

It Is tempting to load a newly coded program into the computer^ 
let it run to completion, and check the final ansi^er for 
correctness. Because of the high probability of one or more 
errors in even short programs and the cumulative effect of 
these errors, this approach is practically worthless (except 
for very short programs )« 

A more satisfactory approach is to run only a small 
portion of the program at a time and check intermediate 
results* This allows one to catch errors before they have 
a chance to make the whole operation unintelligible « The 
breakpoint feature of Dm pemits one to take this approach 
and check out one section of the program at a time* 

A breakpoint is a place in the user»s program where 
computation is interrupted and control is transferred to DDT, 
This is accomplished hj removing and saving the instruction 
at the breakpoint and inserting in its place a Jump instruction 
to DKTo 

IsJhen the program reaches this Jump^ the status of the 
machine (AC, 10, overflow indicator, etc, J is saved and the 
breakpoint location and contents of the AC are typed out. 

At this point one may examine the intermediate results 
by use of any of the inspection and modification commands 
listed above. If they are satisfactoryj, one may proceed 
with the next section of the program* If they are in error^ 
one may try to correct the errors and re-run the section. 
The Dm breakpoint commands are as follows: 

locB Prepares DET to insert a breakpoint at 

location loco The actual insertion occurs 
when a G or X command is given* 

§2 Removes the previous breakpoints. 



■13- 



P Given after a program has been Interrupted 

by a breakpoint. The instruction removed for 

the breakpoint is executed and control is 

3?e turned to the user's program » 

insX Causes instruction ins to be executed < 

Examples! 



2mL ^ 

k/ 4 



B 

P 

This example places a breakpoint at location lup and 
transfers control to beg. The AG is aero and location k 
contains 4 at the break. The breakpoint is removed and the 
program is allowed to proceed, 

dzm conX deposits +0 register con