/* set a window for the PL/I symbolic debugger to scroll in on a VT100 */ setwindow: procedure; %include 'brksymdef.pli'; %include 'truefalse.inc'; dcl charz entry(fixed bin(31),fixed bin(15)) returns (char(13) varying), wrtpas entry (file,char(*)); dcl 1 set_origin static, 2 a fixed bin(7) initial('033'b3), 2 b char(4) initial('[?6h'); dcl 1 set_margins static, 2 a fixed bin(7) initial('033'b3), 2 b char(1) initial('['), 2 top_line char(2), 2 c char(1) initial(';'), 2 bottom_line char(2), 2 d char(1) initial('r'); /**************************************************************************************************************/ if false then put list(''); /* this gets sysprint declared as it should be, not as fixed bin(15) */ top_line = charz(window_top,2); bottom_line = charz(window_bottom,2); call wrtpas(sysprint,string(set_margins)); call wrtpas(sysprint,string(set_origin)); end /*setwindow*/; /* cancel set window and restore screen to normal scrolling mode */ canwindow: procedure; %include 'truefalse.inc'; dcl wrtpas entry (file,char(*)); dcl 1 reset_origin static, 2 a fixed bin(7) initial('033'b3), 2 b char(4) initial('[?6l'); dcl 1 reset_margins static, 2 a fixed bin(7) initial('033'b3), 2 b char(2) initial('[r'); if false then put list(''); /* this gets sysprint declared as it should be, not as fixed bin(15) */ call wrtpas(sysprint,string(reset_margins)); call wrtpas(sysprint,string(reset_origin)); end /*canwindow*/;