PLN 13

Monitoring and Trace Facilities in PLASYD

P. H. Dove

15.10.68

Initially facilities will be made available to trace the action of a program compiled by the PLASYD system. These facilities take the form of procedures which can be called at any point in a run. The procedures must be declared EXTERNAL at the head of any segment or procedure in which calls to them occur. It is assumed that a line printer is available. The procedures will be held in semicompiled form in a library file. The "calls" to these procedures could appear as conditional compilation (PLN 2 pg.2). The "call" to the trace procedures consists of a procedure statement followed by a data statement which may be an initial value or an initial value list (PLN 2 pg.21).

The accumulators except for the link accumulator will be preserved. The Trace procedures must be in permanent or in the same overlay as the calls or in a different overlay area to the call.

PROCEDURE OUTIDENT (X0); 

The data statement consists of a string of up to four characters.

e.g.   OUTIDENT; DATA "AB"; 

A call to the procedure OUTIDENT will cause the characters in the string to be output to the line-printer on a new line.

PROCEDURE OUTACC (X0); 

The data statement consists of a string of up to four characters

e.g.   OUTACC; DATA "CD"; 

A call to the procedure OUTACC will cause the contents of the INTEGER accumulators X0 to X7 and the REAL accumulator A1 to be output in octal, character and integer formats preceded by a line identifying the procedure call.

e.g. ACCUMULATORS AT CD 
     X0   00004142   00AB    2146 
etc. 
PROCEDURE OUTINTEGER (X0); 

The data statement consists of a string of up to four characters followed by the address of the integer value

e.g.  OUTINTEGER; DATA ("EF",@X); 

A call to the procedure OUTINTEGER will cause the contents of the integer X to be output in octal, character and integer formats preceded by a character string identifying the procedure call.

e.g.  INTEGER VALUE AT EF 00004143 00AC 2147 
PROCEDURE OUTREAL (X0); 

The data statement consists of a string of up to four characters followed by the address of the real value.

e.g.  OUTREAL; DATA ("GH", @Y); 

A call to the procedure OUTREAL will cause the contents of the real value Y to be output in octal, character and integer formats preceded by a character string identifying the procedure call.

e.g. REAL VALUE AT GH 01004142  10AB  264290 
                      00000400  0040     256
PROCEDURE OUTCORE (X0) ; 

The data statement consists of a string of up to four characters followed by the address of the location in core store and the number of 1900 words required.

e.g. OUTCORE; DATA ("IJ", @Z, 100); 
     OUTCORE; DATA ("KL", 0, 2000); 

It can be seen from the examples that an address can be specified either as a relative value or an actual value. The output is similar to that produced in the mini-compilers, two words in instruction, octal and character format preceded by actual store location. An example is attached, blank lines indicate zero words as in standard 1900 core dump.

START ADDRESS =     0, NUMBER OF WORDS =    3000, CURRENT CORE ALLOCATION =   8192
                                                                    21: 074 0  3547    #03606733  3PW+
    1: 000 0    39    #00000047  07←X                               22: 074 0  3550    #03606736  3PW.
    2: 001 0  4088(3) #00077770  000G                               23: 074 0  3546    #03606732  3PW*
    3: 060 1     2    #13000002  ;002                               24: 074 0  3697    #03607161  3PYQ
    4: 074 0    18    #03600022  3P0"                               25: 074 0  3695    #03607157  3PYO
                                                                    26: 074 0  3950    #03607556  3P]N
    8: 000 0  1003    #00001753  00?K                               27: 074 0   125    #03600175  3P1]
                                                                    28: 074 0    19    #03600023  3P0#
   10: 126 0    16    #05300020  5(0                                29: 074 0  3588    #03607004  3PX4
   11: 101 0    16    #04040020  440                                
   12: 101 1    16    #14040020  <40                                33: 000 0    39    #00000047  000G
   13: 103 2    16    #24140020  £<0                                34: 033 0  1005(1) #01551755  1M?M
   14: 052 2    10    #22500012  "H0I                               
   15: 165 1     4    #17240004  ?£04                             1000: 100 2  3547    #24007777  £0←←
   16: 100 1    32    #14000040  <00@                             1001: 110 2  3547    #24402003  £@ 3
   17: 126 1     3    #15300003  =(03                             1002: 161 1  3547    #17045050  ?4HH
   18: 161 0  2852    #07045444  74LD                             1003: 000 6  3547    #60020000  P200
   19: 161 0  2852    #07045444  74LD                             1004: 160 2  3547    #27000000  '000
   20: 074 0  1000    #03601750  3P?N