; SIO/BCS Tools 10/21/07 - requires XDOS.IPL and SFS.IPL ; ; These words guide the using of the SIO assembler and compilers ; and the BCS linker for producing an ABS file. The raw tool files ; need to be imported to disk files with an SIO driver configured ; to HP-IPL/OS' slot config (one way is use sioutil.ipl) and named... ; "SIO-ALGOL" the Algol compiler ; "SIO-ASMB" the assembler ; "SIO-FORTRAN-1" Fortran compiler pass 1 ; "FORTRAN2.ABS" Fortran compiler pass 2 ; "BCSLIB.REL" BCS library file (optional) ; "BCS31K" Configured BCS linker ; ; To import each SIO file... ; attach ptr to configured sio.abs driver and do: ZAM ABSLOAD ; attach ptr to the tool.abs (algol.abs etc) and do: ABSLOAD ; change locs 2/3 in alt mem to run 100 by doing: ; 100 124003 PUT 101 100 PUT 100 2 2 C>ACOPY ; then saving as a disk file: 174000 "SIO-filename" AM2F ; ; BCS31K is a configured BCS system produced by the bcsprep.abs tool ; set to HP-IPL/OS TTY/PTR/PTP slots and set for 31KW, providing the ; most memory for programs but still leaving top-of-mem free for the ; HP-IPL/OS swapper etc. To Import attach to PTR and do: "BCS31K" ABS2F ; ; FORTRAN2.ABS is a copy of the fortran2.abs file, imported by ; attaching to ptr and doing: DECIMAL 4337 OCTAL "FORTRAN2.ABS" MS2F ; BCSLIB.REL is a copy of the BCS library file, imported by ; attaching to ptr and doing: DECIMAL 22860 OCTAL "BCSLIB.REL" MS2F ; Importing BCSLIB.REL is for convenience so it can be punched on ; demand without having to keep up with the file. ; ; ; HLT - halts with 7 ; load code detects and deletes if dup ; "HLT" $DEFADR ;push non-zero if exists ; OCTAL CREATE HLT HLT 7 END ; DEFINE TEMP ;if dup detected prompt to delete IFZ ;if no dup "TEMP" $DEFADR 4 SUB #0 PUT ;delete self ELSE ;dup detected "Forgetting dup HLT" $PRINT CRLF "HLT" $DEFADR 4 SUB #0 PUT ;delete new dup HLT ENDIF END TEMP ;do it, will delete self ; ; ALGOL - runs the Algol compiler ; OCTAL DEFINE ALGOL #0 S>SR "Attach PTR to Algol source file" $PRINT CRLF "Attach PTP to relocateable output file" $PRINT CRLF "Press Run to start or run from 2 now to abort" $PRINT CRLF "When done detach PTP and run from 77000 to exit" $PRINT CRLF HLT CRLF "SIO-ALGOL" XLOAD END ; ; ASMB - runs the assembler ; OCTAL DEFINE ASMB #0 S>SR "Attach PTR to assembly source file" $PRINT CRLF "Attach PTP to relocateable or ABS output file" $PRINT CRLF "Press Run to start or run from 2 now to abort" $PRINT CRLF "When it halts, attach PTR to source file again and Run" $PRINT CRLF "When done detach PTP and run from 77000 to exit" $PRINT CRLF HLT CRLF "SIO-ASMB" XLOAD END ; ; FOR1 - runs the Fortran compiler pass 1 ; OCTAL DEFINE FOR1 #0 S>SR "Attach PTR to Fortran source file" $PRINT CRLF "Attach PTP to intermediate output file" $PRINT CRLF "Press Run to start or run from 2 now to abort" $PRINT CRLF "When done detach PTP, run 77000, and run FOR2" $PRINT CRLF HLT CRLF "SIO-FORTRAN-1" XLOAD END ; ; FOR2 - runs the Fortran compiler pass 2 ; Uses location 150, uses SFS buffer 1 ; OCTAL DEFINE FOR2 100 150 #1 A>CCOPY 150 GET 24053 SUB IFNZ "Run FOR1 first" $PRINT ELSE #1 DRV GET $VOL DIRECTORY ;load current dir into buffer 1 #1 "FORTRAN2.ABS" OPEN ;open fortran2.abs binary FSS GET IFNZ #1 RELEASE ELSE ;if file exists MS_SAVE ;save MS vectors #1 CCOPY 150 GET 24057 SUB IFZ ;if really fortran2 #0 S>SR "Attach PTR to intermediate file from pass 1" $PRINT CRLF "Attach PTP to relocateable output file" $PRINT CRLF "Press Run to start or run from 2 now to abort" $PRINT CRLF "When done detach PTP and run 77000" $PRINT CRLF HLT ;for attaching files PRESET 77000 RUN ;run pass 2 ENDIF ENDIF ENDIF END ; ; LINK - runs the BCS linker to produce an ABS file ; OCTAL DEFINE LINK 140000 S>SR "Attach PTR to first relocateable file to load" $PRINT CRLF "Attach PTP to ABS output file" $PRINT CRLF "Press Run to start or run from 2 now to abort" $PRINT CRLF "At each halt attach PTR to next reloc file to load" $PRINT CRLF "When the last program file has been loaded attach PTR" $PRINT CRLF "to the relocateable library file and set SR bit 2" $PRINT CRLF "(SR=x40004, set bit 15 to suppress bounds printing)" $PRINT CRLF "Note.. library must exist, run 2 then BCSLIB to punch" $PRINT CRLF "After library has been loaded, set SR to x40004 and Run" $PRINT CRLF "When done detach PTP and run from 77000 to exit" $PRINT CRLF HLT "BCS31K" XLOAD END ; ; BCSLIB - punch the BCS library file ; OCTAL DEFINE BCSLIB "Attach PTP to relocateable library output file" $PRINT CRLF "Press Run to punch or run from 2 now to abort" $PRINT CRLF HLT "BCSLIB.REL" F2MS CRLF "Detach PTP and press Run" $PRINT CRLF HLT END ; CONSOLE