Type ASSEMBLE
Source Lines : 737
Fixes Applied : 1
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [R10475DS]
Module
DMSDSK (DISK)
Function
TO DUMP A DISK FILE TO CARDS, OR TO LOAD FILES FROM CARDS TO DISK.
Attributes
TRANSIENT (WITH SYSTEM OPTION); SERIALLY REUSABLE.
Operation
THE OPERATION OF DISK DEPENDS ON WHETHER THE CALLING PROGRAM SPECIFIES DUMP OR LOAD. DUMP: DISK COPIES THE FILE DESIGNATION FROM THE PARAMETER LIST INTO BYTES 58 - 76 OF AN 89-BYTE BUFFER. (THE FIRST FOUR BYTES OF THE BUFFER CONTAIN AN IDENTIFIER CONSISTING OF AN INTERNAL REPRESENTATION OF A 12-2-9 PUNCH AND THE CHARACTERS 'CMS'.) THEN DISK TEMPORARILY CHANGES THE CHARACTERISTICS OF THE FILE IN THE 40-BYTE FST ENTRY TO MAKE IT APPEAR AS A FILE OF 800-BYTE FIXED-LENGTH RECORDS. (THE CORRECT FST ENTRY IS RESTORED WHEN THE FILE HAS BEEN DUMPED, OF COURSE.) DISK MOVES THE INITIAL VALUE FOR SEQUENCING (001) INTO BYTES 77-80 OF THE BUFFER. DISK NEXT CALLS THE DMSBRD FUNCTION PROGRAM TO READ THE FIRST 50 BYTES OF THE TEMPORARY COPY INTO BYTES 6-55 OF THE BUFFER AND THEN THE DMSCIO FUNCTION PROGRAM TO PUNCH THE CONTENTS OF THE BUFFER. HAVING PUNCHED THE FIRST CARD, DISK INCREMENTS THE SEQUENCE NUMBER (BYTES 77-80 OF THE OUTPUT BUFFER) AND OVERLAYS BYTES 6-55 OF THE BUFFER WITH THE NEXT 50 BYTES OF THE FILE BY CALLING DMSBRD. IT THEN PUNCHES THE CONTENTS OF THE BUFFER. DISK REPEATS THIS PROCESS FOR EACH SUBSEQUENT 50 BYTES OF DATA IN THE TEMPORARY DISK FILE. WHEN THE END-OF-FILE IS ENCOUNTERED, DISK GENERATES AN END CARD (ONE WITH N IN COLUMN 5) AND PUNCHES IT,