; mtfile# "FILENAME" MT2F - transfers HP-IPL/OS magtape file to disk file ; written 1/10/08 thereabouts, put in source form 1/31/08 OCTAL DEFINE MT2F MTSEEK ;seek to specified magtape file IDREC 20 MTREAD MTWAIT ;read 16 words from file into IDREC IDREC GET 15400 SUB IFNZ ;if not a header for a file "UNKNOWN FILE" $PRINT $DROP ELSE ;next record is the file UDMA ;redirect DMA to alt mem 2 ;start load at location 2 in alt mem IDREC INC INC GET ;push number of words to load from IDREC MTREAD MTWAIT ;read magtape file into alt mem SDMA ;restore DMA to regular memory IDREC INC INC GET ;push number of words from IDREC 2 MUL ;multiply by 2 to get number of bytes to save AM2F ;copy that many bytes from alt mem to specified file ENDIF END ; CONSOLE