System Debug Reference Manual (32650-90888)

388 Chapter10
System Debug Standard Functions
func cmstart
cmaddr('fopen')+%102 CM procedure fopen + %102 (NM or CM mode
Examples
Assume that the following single segment CM program has been compiled, linked with the
PMAP and FPMAP options, and is now being executed:
PROGRAM test (input,output);
PROCEDURE one;
begin {one}
writeln('ONE');
end; {one}
PROCEDURE two;
PROCEDURE three;
begin {three}
writeln('THREE');
end; {three}
begin {two}
writeln('TWO');
three;
end; {two}
begin {main body} { Outer block is named "ob'" by the compiler }
one;
two;
end. {main body}
PROGRAM FILE PTEST.DEMO.TELESUP
SEG' 0
NAME STT CODE ENTRY SEG
OB' 1 0 13
TERMINATE' 5 ?
P'RESET 6 ?
P'REWRITE 7 ?
P'CLOSEIO 10 ?
P'INITHEAP'3000 11 ?
TWO 2 71 123
P'WRITELN 12 ?
P'WRITESTR 13 ?
ONE 3 142 155
SEGMENT LENGTH 210
PRIMARY DB 2 INITIAL STACK 10240 CAPABILITY 600
SECONDARY DB 430 INITIAL DL 0 TOTAL CODE 210
TOTAL DB 432 MAXIMUM DATA ? TOTAL RECORDS 11
ELAPSED TIME 00:00:01.365 PROCESSOR TIME 00:00.740
END OF PREPARE
%cmdebug > wl ob'
PROG %0.0
%cmdebug > wl cmstart(ob')