.; Indirect command file to allow Fortran-77 programs that don't use the FPP .; to run under RSX-11M-Plus. An FPP is still needed, but at least the .; program will run under M-Plus instead of just M. To run it without an FPP, .; zap out the two words at $INITI offset 44 as well; the location of $INITI .; can be ascertained by GREPping for $INITI in the TKB map file. The program .; may run anyway without zapping $INITI if it does not refer to it; it can .; also be found by noting the location of any SST4 reserved instruction trap .; noted by the OTS (or TKTN). .; .; by Nicholas Zymaris 29-Jan-1999. .; .enable substitution .enable display .; .; Get the filename and access modes, show help if no command line or "help" .; .test "'p1'" .if eq 0 .goto help .sets p "'p1'" .parse "'p'" "." fnam ext .parse "'ext'" "," ext ro .; ext is /'ext'/ and ro is /'ro'/ .if p = "HELP" .goto help .if p = "help" .goto help .if fnam <> "" .if ext = "" .sets ext "TSK" .goto nohelp .help: .open ti: .data NOFPP V1.00 -- make F77 program work on M-Plus or (limited) with no FPP .data by Nicholas Zymaris, January 29, 1999. .data (Use readonly mode to see if task is patchable). .data Syntax: NOFPP filename.ext,access .data .data Access is null or R for readonly, or W for write access to task. .data E.g.: @nofpp qiolog.tsk,r (or) @nofpp qiolog .data @nofpp qiolog.tsk,w (must specify extension & access for write) .data .close ti: .goto done .nohelp: .;asks task Please enter taskname .;asks ro Readonly (test) or Write access .sets task "'fnam'.'ext'" .sets zapcmd "" .if ro = "r" .sets ro "R" .if ro = "" .sets ro "R" .if ro = "w" .sets ro "W" .if ro = "R" .sets zapcmd "'task'/ro" .if ro = "W" .sets zapcmd "'task'" .open ti: .if ro = "R" .data Readonly access selected .if ro = "W" .data Write access selected .;close ti: .; Create a ZAP command file to: .; 1. Get starting PC from task loc 16 (can't read abs loc 350 in task mode). .; 2. Go to that location in task. .; 3. Verify it's a 4767 (JSR PC), exit if not. .; 4. Go to next word (use ".+2", not in Indirect's enable data mode) .; 5. Use that word as an offset & go to effective address (trace the JSR PC). .; 6. This is $OTI in a Fortran-77 program. Verify the MOV @#52,R3. .; 7. Go to $OTI offset 206; add 204 to loc since we advanced one word before. .; 8. Verify it is a JSR PC; if so, zap it & the BCS following with NOP's. .doit: .data ZAPCMD is 'zapcmd' .close ti: .open zapcmd.tmp .enable data 'zapcmd' 2:16/ @ 4767v .+2/ _ 13703v .+2/ 52v .+204/ 4767v 240 .+2/ 240 .+2/ 240 x .disable data .close zapcmd.tmp zap @zapcmd.tmp .enable quiet del zapcmd.tmp;0 .done: .disable display .exit