Table of Contents

DMSDIO Abstract

Statistics

Type ASSEMBLE
Source Lines : 905
Fixes Applied : 2
Most Recent Version : Tuesday, December 12, 1978
Last Fix ID : [HRC004DS]

Synopsis

Module

       DMSDIO   (DISKIO)

Function

       TO READ  ONE OR MORE  800-BYTE RECORDS  (BLOCKS) FROM
       DISK, OR TO READ ONE 200-BYTE RECORD (SUB-BLOCK) FROM
       DISK.

Attributes

       NUCLEUS RESIDENT, REENTRANT

Operation

       DMSDIOR DETERMINES WHETHER OR NOT THE CALLING PROGRAM
       WISHES TO  READ A 800-BYTE  RECORD.  IF IT  DOES NOT,
       DMSDIOR CHECKS TO SEE IF
       THE BYTE COUNT EXCEEDS 800  BYTES, IMPLYING MORE THAN
       ONE 800-BYTE RECORD TO BE  READ.  IF SO, FREE STORAGE
       IS OBTAINED,  AND CHAINED CCW'S  ARE USED  INSOFAR AS
       PRACTICAL TO  READ AS MANY  RECORDS AS  POSSIBLE WITH
       ONE IO  TO THE DISK.  IF  NOT MORE THAN 800,  NO FREE
       STORAGE IS  NECESSARY AS A  STANDARD CCW  PACKAGE (IN
       DIOSECT)  IS USED.   IN  ANY  EVENT, WHETHER  OR  NOT
       REPEATED IO'S  ARE NECESSARY, THE  DATA IS  READ INTO
       THE DESIGNATED  BUFFER, FREE  STORAGE IS  RETURNED IF
       NECESSARY, AND RETURN IS MADE  TO THE CALLER.  IF THE
       BYTE COUNT EXCEEDS 800, IT NEED NOT NECESSARILY BE AN
       EXACT MULTIPLE OF 800.

       IF  THE CALLING  PROGRAM WISHES  TO  READ A  200-BYTE
       RECORD (SUB-BLOCK),
       DMSDIOR CALLS THE DMSFREE TO OBTAIN AN 800-BYTE
       BUFFER.  IT THEN READS  THE 800-BYTE BLOCK CONTAINING
       THE DESIRED SUB-BLOCK INTO THE BUFFER.
       NEXT, DMSDIOR EXTRACTS THE DESIRED SUB-BLOCK FROM THE
       800-BYTE BUFFER  AND MOVES  IT TO THE 200-BYTE BUFFER
       THE 200-BYTE
       BUFFER  SPECIFIED IN  THE  PARAMETER  LIST.  IT  THEN
       CALLS THE DMSFRET TO RELEASE THE 800-BYTE BUFFER, THE
       ENTIRE BLOCK WAS READ INTO AND RETURNS TO THE CALLING
       PROGRAM.   SUB-BLOCKS ARE  RESERVED  FOR FIRST  CHAIN
       LINK AREAS AND SHOULD NOT BE USED FOR OTHER PURPOSES.

       NOTE:

       IF THE 200-BYTE BLOCK IS THE FIRST 200 BYTES OF AN
       800  BYTE BUFFER,  DMSDIOR READS  200 BYTES  DIRECTLY
       INTO THE DESIGNATED
       STORAGE AREA  INSTEAD OF  OBTAINING FREE  STORAGE AND
       MOVING THE 200 BYTES LATER.

Calls to Other Routines

       DMSLAD, DMSFREE, DMSFRET