Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/demos/ddtdem.pre
There is 1 other file named ddtdem.pre in the archive. Click here to see a list.
        SIMDDT_DEMONSTRATION_PROGRAM

00010   simulation BEGIN
00020     REF (head) queue; INTEGER i;
00030   
00040     process CLASS entry(id); VALUE id; TEXT id;
00050     BEGIN into(queue); hold(5); out;
00060     END;
00070   
00080     PROCEDURE print(element); REF (link) element;
00090     INSPECT element WHEN entry DO
00100     BEGIN
00110       outtext(id); outimage;
00120       print(suc);
00130     END;
00140   
00150     queue:- NEW head;
00160     ACTIVATE NEW entry("first entry") DELAY 1;
00170     ACTIVATE NEW entry("second entry") DELAY 2;
00180     ACTIVATE NEW entry("third entry") DELAY 3;
00190     FOR i:= 1 STEP 1 UNTIL 10 DO
00200     BEGIN
00210       hold(1); outimage;
00220       outtext("time: "); outfix(time,2,5); outimage;
00230       print(queue.first);
00240     END;
00250   END;

to start simddt on the above program, use the command:
        debug ddtdem

then you may for example tell simddt:
        stop at 130 if id = "third entry"
        proceed

and when simddt stops at the breakpoint you can type:
        sched
        chain
        output prev qua entry.id

try other simddt commands yourself!!!
        SIMDDT_DEMONSTRATION_PROGRAM

00010   simulation BEGIN
00020     REF (head) queue; INTEGER i;
00030   
00040     process CLASS entry(id); VALUE id; TEXT id;
00050     BEGIN into(queue); hold(5); out;
00060     END;
00070   
00080     PROCEDURE print(element); REF (link) element;
00090     INSPECT element WHEN entry DO
00100     BEGIN
00110       outtext(id); outimage;
00120       print(suc);
00130     END;
00140   
00150     queue:- NEW head;
00160     ACTIVATE NEW entry("first entry") DELAY 1;
00170     ACTIVATE NEW entry("second entry") DELAY 2;
00180     ACTIVATE NEW entry("third entry") DELAY 3;
00190     FOR i:= 1 STEP 1 UNTIL 10 DO
00200     BEGIN
00210       hold(1); outimage;
00220       outtext("time: "); outfix(time,2,5); outimage;
00230       print(queue.first);
00240     END;
00250   END;
to start simddt on the above program, use the command:
        debug ddtdem

then you may for example tell simddt:
        stop at 130 if id = "third entry"
        proceed

and when simddt stops at the breakpoint you can type:
        sched
        chain
        output prev qua entry.id

try other simddt commands yourself!!!
a) set up to 20 breakpoints in the program    [STOP] AT [module:] nn ...
b) continue from a breakpoint                 PROCEED
c) display the current breakpoint settings    [STOP] BREAKS
d) remove a breakpoint setting                REMOVE [AT n]
e) change the contents of a variable          INPUT x:= ...
f) display the contents of a variable         OUTPUT x, ...
g) display all variables in the storage pool  VARIABLES [/switches]
h) display the dynamic operating chain        CHAIN
i) display all scheduled processes            SCHEDULED
k) switch output to a disk file e.g.  a.bug   USE a.bug
l) display the source program                 DISPLAY [module:] mm[-nn]
m) move simddt viewpoint :  to object x       INSPECT x
      to simddt interrupt point               INSPECT/START
      to class or procedure generation point  INSPECT/RETURN
      to viewpoint before last return         INSPECT/RESET
      to statically enclosing block           INSPECT/UP
n) close open files                           [STOP] CLOSE
o) read simddt control file e.g.  x.cmd       @x.cmd
p) terminate execution                        EXIT