In the 4C debugger program, the main menu is sys.prog.dbg.
The StartFldLp PCL is used to turn "so" mode off for each of the
6 menu labels, and for the prompt field.
The code that does this follows:
ok = ''
dbgsel = 0;
prompt = "Enter Selection:";
sys.set_dfattr(SEL1,"no so");
sys.set_dfattr(SEL2,"no so");
sys.set_dfattr(SEL3,"no so");
sys.set_dfattr(SEL4,"no so");
sys.set_dfattr(SEL5,"no so");
sys.set_dfattr(SEL6,"no so");
sys.set_dfattr(PROMPT,"no so");
After a selection is made, either by function key, or by typing the
number without a return, the setsel() PCL is called.
This PCL highlights the selection by setting "so" on, changes the
prompt, and highlights the prompt as well.
The code that does this follows:
if (dbgsel == 1)
sys.set_dfattr(SEL1,"so");
else if (dbgsel == 2)
sys.set_dfattr(SEL2,"so");
else if (dbgsel == 3)
sys.set_dfattr(SEL3,"so");
else if (dbgsel == 4)
sys.set_dfattr(SEL4,"so");
else if (dbgsel == 5)
sys.set_dfattr(SEL5,"so");
else if (dbgsel == 6)
sys.set_dfattr(SEL6,"so");
prompt = " Selection OK? ";
sys.set_dfattr(PROMPT,"so");
ok = 'y'
Each possibility was tested separately to allow the
insertion of display fields later without affecting the code.