PL/M-86 COMPILER    SDIR 8086 - GET DISK PARAMETERS                                                             PAGE   1


ISIS-II PL/M-86 V2.0 COMPILATION OF MODULE DPB86
OBJECT MODULE PLACED IN DPB86
COMPILER INVOKED BY:  :F0: DPB86.PLM DEBUG OBJECT(DPB86) OPTIMIZE(3) XREF



              $compact
              $title ('SDIR 8086 - Get Disk Parameters')
   1          dpb86:
              do;
                     /* the purpose of this module is to allow independence */
                     /* of processor, i.e., 8080 or 8086                    */

              $include (comlit.lit)
          =
   2   1  =   declare
          =           lit                literally          'literally',
          =           dcl                lit                'declare',
          =           true               lit                '0ffh',
          =           false              lit                '0',
          =           boolean            lit                'byte',
          =           forever            lit                'while true',
          =           cr                 lit                '13',
          =           lf                 lit                '10',
          =           tab                lit                '9',
          =           ctrlc              lit                '3',
          =           ff                 lit                '12',
          =           page$len$offset    lit                '1ch',
          =           nopage$mode$offset lit                '2Ch',
          =           sectorlen          lit                '128';

              /* function call 32 in 2.0 or later BDOS, returns the address of the disk
              parameter block for the currently selected disk, which consists of:
                      spt                   (2 bytes) number of sectors per track
                      blkshf                (1 byte)  block size = shl(double(128),blkshf)
                      blkmsk                (1 byte)  sector# and blkmsk = block number
                      extmsk                (1 byte)  logical/physical extents
                      blkmax                (2 bytes) max alloc number
                      dirmax                (2 bytes) size of directory-1
                      dirblk                (2 bytes) reservation bits for directory
                      chksiz                (2 bytes) size of checksum vector
                      offset                (2 bytes) offset for operating system
              */

              $include(dpb.lit)
          =
          =   /* indices into disk parameter block, used as parameters to dpb procedure */
          =
   3   1  =   dcl        spt$w        lit        '0',
          =              blkshf$b     lit        '2',
          =              blkmsk$b     lit        '3',
          =              extmsk$b     lit        '4',
          =              blkmax$w     lit        '5',
          =              dirmax$w     lit        '7',
          =              dirblk$w     lit        '9',
          =              chksiz       lit        '11',
          =              offset$w     lit        '13';
PL/M-86 COMPILER    SDIR 8086 - GET DISK PARAMETERS                                                             PAGE   2


          =

   4   1      declare k$per$block byte public;
   5   1      declare dpb$base pointer;
   6   1      declare dpb$array based dpb$base (15) byte;

   7   1      mon4: procedure (f,a) pointer external;
   8   2          dcl f byte, a address;
   9   2      end mon4;

  10   1      dcl get$dpb lit '31';

  11   1      dpb$byte: procedure(param) byte public;
  12   2          dcl param byte;
  13   2          return(dpb$array(param));
  14   2      end dpb$byte;

  15   1      dpb$word: procedure(param) address public;
  16   2          dcl param byte;
  17   2          return(dpb$array(param) + shl(double(dpb$array(param+1)),8));
  18   2      end dpb$word;

  19   1      base$dpb: procedure public;
  20   2          dpb$base = mon4(get$dpb,0);
  21   2          k$per$block = shr(dpb$byte(blkmsk$b)+1 ,3);
  22   2      end base$dpb;

  23   1      end dpb86;
PL/M-86 COMPILER    SDIR 8086 - GET DISK PARAMETERS                                                             PAGE   3


CROSS-REFERENCE LISTING
-----------------------


   DEFN  ADDR   SIZE  NAME, ATTRIBUTES, AND REFERENCES
  ----- ------ -----  --------------------------------


      7  0000H     2  A. . . . . . . . .    WORD PARAMETER         8 
     19  003AH    38  BASEDPB. . . . . .    PROCEDURE PUBLIC STACK=0008H
      3               BLKMAXW. . . . . .    LITERALLY
      3               BLKMSKB. . . . . .    LITERALLY        21 
      3               BLKSHFB. . . . . .    LITERALLY
      2               BOOLEAN. . . . . .    LITERALLY
      3               CHKSIZ . . . . . .    LITERALLY
      2               CR . . . . . . . .    LITERALLY
      2               CTRLC. . . . . . .    LITERALLY
      2               DCL. . . . . . . .    LITERALLY
      3               DIRBLKW. . . . . .    LITERALLY
      3               DIRMAXW. . . . . .    LITERALLY
                      DOUBLE . . . . . .    BUILTIN          17 
      1  0002H        DPB86. . . . . . .    PROCEDURE STACK=0000H
      6  0000H    15  DPBARRAY . . . . .    BYTE BASED(DPBBASE) ARRAY(15)        13   17 
      5  0000H     4  DPBBASE. . . . . .    POINTER           6   13   17   20 
     11  0002H    21  DPBBYTE. . . . . .    PROCEDURE BYTE PUBLIC STACK=0004H         21 
     15  0017H    35  DPBWORD. . . . . .    PROCEDURE WORD PUBLIC STACK=0004H
      3               EXTMSKB. . . . . .    LITERALLY
      7  0000H     1  F. . . . . . . . .    BYTE PARAMETER         8 
      2               FALSE. . . . . . .    LITERALLY
      2               FF . . . . . . . .    LITERALLY
      2               FOREVER. . . . . .    LITERALLY
     10               GETDPB . . . . . .    LITERALLY        20 
      4  0004H     1  KPERBLOCK. . . . .    BYTE PUBLIC           21 
      2               LF . . . . . . . .    LITERALLY
      2               LIT. . . . . . . .    LITERALLY         2    3   10 
      7  0000H        MON4 . . . . . . .    PROCEDURE POINTER EXTERNAL(0) STACK=0000H           20 
      2               NOPAGEMODEOFFSET .    LITERALLY
      3               OFFSETW. . . . . .    LITERALLY
      2               PAGELENOFFSET. . .    LITERALLY
     15  0004H     1  PARAM. . . . . . .    BYTE PARAMETER AUTOMATIC        16   17 
     11  0004H     1  PARAM. . . . . . .    BYTE PARAMETER AUTOMATIC        12   13 
      2               SECTORLEN. . . . .    LITERALLY
                      SHL. . . . . . . .    BUILTIN          17 
                      SHR. . . . . . . .    BUILTIN          21 
      3               SPTW . . . . . . .    LITERALLY
      2               TAB. . . . . . . .    LITERALLY
      2               TRUE . . . . . . .    LITERALLY



MODULE INFORMATION:

     CODE AREA SIZE     = 0060H     96D
     CONSTANT AREA SIZE = 0000H      0D
     VARIABLE AREA SIZE = 0005H      5D
     MAXIMUM STACK SIZE = 0008H      8D
     79 LINES READ
PL/M-86 COMPILER    SDIR 8086 - GET DISK PARAMETERS                                                             PAGE   4


     0 PROGRAM ERROR(S)

END OF PL/M-86 COMPILATION
