Bright idea O0 .. works like a charm
this TP procedure defines F1 for the call of the program, and also defines the single line sub routine.
procedure SET_F1_BLANK_HP3458;
begin
clrscr;
InitCEC;
SetTimeOut(10000);
cmd:= 'DEFKEY DEFAULT'; {clear F1 .. F9}
sendstr(HP3458);
cmd:= 'DEFKEY 1,"CALL DISP_BLANK"'; {call BASIC Program on F1}
sendstr(HP3458);
cmd:= 'SCRATCH'; {delete all BASIC elements from nvRAM}
sendstr(HP3458);
cmd:= 'SUB DISP_BLANK'; {start of subroutine}
sendstr(HP3458);
cmd:= 'DISP OFF,'' '''; {single line of code...in that BASIC context, that's no direct command to 3458A }
sendstr(HP3458);
cmd:= 'SUBEND'; {end of subroutine}
sendstr(HP3458);
Goto_Local(HP3458);
EndCEC;
end;
Frank