PL/M-86 COMPILER    INTERFACE TO CP/M I/O                                        10/5/81    PAGE   1


ISIS-II PL/M-86 V2.0 COMPILATION OF MODULE IO
OBJECT MODULE PLACED IN IO.OBJ
COMPILER INVOKED BY:  :F0: IO.PLM DEBUG OPTIMIZE(2) DATE(10/5/81) PAGEWIDTH(100) XREF



              $title ('INTERFACE TO CP/M I/O')
   1          io:
              do;

                /*
                    Template for all BDOS calls
                */

              /*

                  modified  3/26/81  R. Silberstein
                  modified  6/16/81  R. Silberstein
                  modified  9/14/81  R. Silberstein

              */

   2   1      declare tbuff (80h) byte external;

   3   1      mon1: procedure (func,info) external;
   4   2        declare func byte;
   5   2        declare info address;
   6   2      end mon1;

   7   1      mon2: procedure (func,info) byte external;
   8   2        declare func byte;
   9   2        declare info address;
  10   2      end mon2;

              /**************************************
               *                                    *
               *       B D O S   Externals          *
               *                                    *
               **************************************/

  11   1      system$reset: procedure public;
  12   2        call mon1 (0,0);
  13   2      end system$reset;

  14   1      read$console: procedure byte public;
  15   2        return mon2 (1,0);
  16   2      end read$console;

  17   1      write$console: procedure (char) public;
  18   2        declare char byte;
  19   2        call mon1 (2,char);
  20   2      end write$console;

  21   1      write$list: procedure (char) public;
  22   2        declare char byte;
  23   2        call mon1 (5,char);
  24   2      end write$list;
PL/M-86 COMPILER    INTERFACE TO CP/M I/O                                        10/5/81    PAGE   2



  25   1      constat: procedure byte public;
  26   2        return mon2 (11,0);
  27   2      end constat;

  28   1      VERSION: PROCEDURE ADDRESS PUBLIC;
  29   2        RETURN MON2 (12, 0);
  30   2      END VERSION;

  31   1      select$disk: procedure (disk$number) public;
  32   2        declare disk$number byte;
  33   2        call mon1 (14,disk$number);
  34   2      end select$disk;

  35   1      set$DMA$address: procedure (DMA$address) public;
  36   2        declare DMA$address address;
  37   2        call mon1 (26,DMA$address);
  38   2      end set$DMA$address;
                
  39   1      open$file: procedure (fcb$address) byte public;
  40   2        declare fcb$address address;
  41   2        CALL SET$DMA$ADDRESS (.TBUFF);   /* FOR 1.4 SYSTEMS */
  42   2        return mon2 (15,fcb$address);
  43   2      end open$file;

  44   1      OPEN$RO$FILE: PROCEDURE (FCB$ADDRESS) BYTE PUBLIC;
  45   2        DECLARE FCB$ADDRESS ADDRESS, FCB BASED FCB$ADDRESS (32) BYTE;
  46   2        FCB (6) = FCB (6) OR 80H;
  47   2        RETURN OPEN$FILE (FCB$ADDRESS);
  48   2      END OPEN$RO$FILE;

  49   1      close$file: procedure (fcb$address) byte public;
  50   2        declare fcb$address address;
  51   2        return mon2 (16,fcb$address);
  52   2      end close$file;

  53   1      delete$file: procedure (fcb$address) public;
  54   2        declare fcb$address address;
  55   2        CALL mon1 (19,fcb$address);
  56   2      end delete$file;

  57   1      read$record: procedure (fcb$address) byte public;
  58   2        declare fcb$address address;
  59   2        return mon2 (20,fcb$address);
  60   2      end read$record;

  61   1      write$record: procedure (fcb$address) byte public;
  62   2        declare fcb$address address;
  63   2        return mon2 (21,fcb$address);
  64   2      end write$record;

  65   1      create$file: procedure (fcb$address) byte public;
  66   2        declare fcb$address address;
  67   2        return mon2 (22,fcb$address);
  68   2      end create$file;

  69   1      interrogate$disk: procedure byte public;
PL/M-86 COMPILER    INTERFACE TO CP/M I/O                                        10/5/81    PAGE   3


  70   2        return mon2 (25,0);
  71   2      end interrogate$disk;

  72   1      crlf: procedure public;
  73   2        call write$console (0dh);
  74   2        call write$console (0ah);
  75   2      end crlf;

  76   1      end io;
PL/M-86 COMPILER    INTERFACE TO CP/M I/O                                        10/5/81    PAGE   4


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


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


     21  0004H     1  CHAR . . . . . . .    BYTE PARAMETER AUTOMATIC        22   23 
     17  0004H     1  CHAR . . . . . . .    BYTE PARAMETER AUTOMATIC        18   19 
     49  00B1H    16  CLOSEFILE. . . . .    PROCEDURE BYTE PUBLIC STACK=000AH
     25  0043H    15  CONSTAT. . . . . .    PROCEDURE BYTE PUBLIC STACK=0008H
     65  00F1H    16  CREATEFILE . . . .    PROCEDURE BYTE PUBLIC STACK=000AH
     72  0110H    17  CRLF . . . . . . .    PROCEDURE PUBLIC STACK=000EH
     53  00C1H    16  DELETEFILE . . . .    PROCEDURE PUBLIC STACK=000AH
     31  0004H     1  DISKNUMBER . . . .    BYTE PARAMETER AUTOMATIC        32   33 
     35  0004H     2  DMAADDRESS . . . .    WORD PARAMETER AUTOMATIC        36   37 
     45  0000H    32  FCB. . . . . . . .    BYTE BASED(FCBADDRESS) ARRAY(32)          46 
     61  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        62   63 
     44  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        45   46   47 
     39  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        40   42 
     49  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        50   51 
     53  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        54   55 
     65  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        66   67 
     57  0004H     2  FCBADDRESS . . . .    WORD PARAMETER AUTOMATIC        58   59 
      3  0000H     1  FUNC . . . . . . .    BYTE PARAMETER         4 
      7  0000H     1  FUNC . . . . . . .    BYTE PARAMETER         8 
      7  0000H     2  INFO . . . . . . .    WORD PARAMETER         9 
      3  0000H     2  INFO . . . . . . .    WORD PARAMETER         5 
     69  0101H    15  INTERROGATEDISK. .    PROCEDURE BYTE PUBLIC STACK=0008H
      1  0000H        IO . . . . . . . .    PROCEDURE STACK=0000H
      3  0000H        MON1 . . . . . . .    PROCEDURE EXTERNAL(1) STACK=0000H         12   19
                                              23   33   37   55 
      7  0000H        MON2 . . . . . . .    PROCEDURE BYTE EXTERNAL(2) STACK=0000H         15
                                              26   29   42   51   59   63   67   70 
     39  0086H    23  OPENFILE . . . . .    PROCEDURE BYTE PUBLIC STACK=0010H         47 
     44  009DH    20  OPENROFILE . . . .    PROCEDURE BYTE PUBLIC STACK=0016H
     14  000EH    15  READCONSOLE. . . .    PROCEDURE BYTE PUBLIC STACK=0008H
     57  00D1H    16  READRECORD . . . .    PROCEDURE BYTE PUBLIC STACK=000AH
     31  0063H    19  SELECTDISK . . . .    PROCEDURE PUBLIC STACK=000AH
     35  0076H    16  SETDMAADDRESS. . .    PROCEDURE PUBLIC STACK=000AH         41 
     11  0000H    14  SYSTEMRESET. . . .    PROCEDURE PUBLIC STACK=0008H
      2  0000H   128  TBUFF. . . . . . .    BYTE ARRAY(128) EXTERNAL(0)          41 
     28  0052H    17  VERSION. . . . . .    PROCEDURE WORD PUBLIC STACK=0008H
     17  001DH    19  WRITECONSOLE . . .    PROCEDURE PUBLIC STACK=000AH         73   74 
     21  0030H    19  WRITELIST. . . . .    PROCEDURE PUBLIC STACK=000AH
     61  00E1H    16  WRITERECORD. . . .    PROCEDURE BYTE PUBLIC STACK=000AH



MODULE INFORMATION:

     CODE AREA SIZE     = 0121H    289D
     CONSTANT AREA SIZE = 0000H      0D
     VARIABLE AREA SIZE = 0000H      0D
     MAXIMUM STACK SIZE = 0016H     22D
     117 LINES READ
PL/M-86 COMPILER    INTERFACE TO CP/M I/O                                        10/5/81    PAGE   5


     0 PROGRAM ERROR(S)

END OF PL/M-86 COMPILATION
