Sage-ST ä

Doslib

Documentation

Global Declarations (Constants, Types, Variables)
ChangeDirectory CloseFile CommitFile
CreateFile DeleteFile DosExec FindFirstFile
FindNextFile GetCmndLine GetCurrentDirectory GetDate
GetDiskFreeSpace GetExtendedError GetFileDate GetFileMode
GetReturnCode GetTime GetVersion KbdDataAvailable
LSeek MakeDirectory OpenFile PrinterStatus
ReadFile RemoveDirectory RenameFile SetDate
SetFileDate SetFileMode SetHandleCount SetTime
WriteFile




  StandardInput  : constant := 0;
  StandardOutput : constant := 1;
  StandardError  : constant := 2;
  StandardAux    : constant := 3;
  StandardPrint  : constant := 4;
  AttrNormal     : constant := 0;
  AttrReadOnly   : constant := 1;
  AttrHidden     : constant := 2;
  AttrSystem     : constant := 4;
  AttrVolume     : constant := 8;
  AttrDirec      : constant := 16;
  AttrArchive    : constant := 32;
  OpenReadOnly   : constant := 0;
  OpenWriteOnly  : constant := 1;
  OpenReadWrite  : constant := 2;
  OpenExclusive  : constant := 16;
  OpenDenyWrite  : constant := 32;
  OpenDenyRead   : constant := 48;
  OpenDenyNone   : constant := 64;
  OpenNoInherit  : constant := 128;
  FromStart      : constant := 0;
  FromCurrent    : constant := 1;
  FromEnd        : constant := 2;

  subtype AttrType is ModSys.S_Natural;

  subtype OpenType is ModSys.S_Natural;

  subtype HandleType is ModSys.S_Natural;

  subtype DirPathType is string (1 .. 248);

  type SearchRecord is record
    handle       : HandleType;
    reserved     : string (1 .. 21) := (others => ASCIIX.nul);
    fileAttrChar : character;
    FileTime     : ModSys.S_Integer32 := 0;
    FileDate     : ModSys.S_Integer32 := 0;
    FileSize     : ModSys.S_Natural32 := 0;
    FileName     : string (1 .. 248) := (others => ASCIIX.nul);
    termChar     : character;
  end record;

  for SearchRecord use record
    handle at 0 range 0 .. ModSys.S_Integer32_size - 1;
    reserved at 4 range 0 .. 167;
    fileAttrChar at 25 range 0 .. 7;
    FileTime at 26 range 0 .. ModSys.S_Integer32_size - 1;
    FileDate at 30 range 0 .. ModSys.S_Integer32_size - 1;
    FileSize at 34 range 0 .. ModSys.S_Natural32_size - 1;
    FileName at 38 range 0 .. 1_983;
    termChar at 294 range 0 .. 7;
  end record;

  type LoadRecord is record
    loadAddress : ModSys.S_Integer16 := 0;
    relocFactor : ModSys.S_Integer16 := 0;
  end record;

  for LoadRecord use record
    loadAddress at 0 range 0 .. ModSys.S_Integer16_size - 1;
    relocFactor at 4 range 0 .. ModSys.S_Integer16_size - 1;
  end record;




  function KbdDataAvailable return boolean;

  --*
  --  KbdDataAvailable - Check if char. available at standard input (0BH).
  --




  procedure GetDate
             (Year    : in out ModSys.S_Natural;
              Month   : in out ModSys.S_Natural;
              Day     : in out ModSys.S_Natural;
              weekDay : in out ModSys.S_Natural);

  --*
  --  GetDate - Return the current date (2AH).
  --




  procedure SetDate
             (Year   : in     ModSys.S_Natural;
              Month  : in     ModSys.S_Natural;
              Day    : in     ModSys.S_Natural;
              Status : in out boolean);

  --*
  --  SetDate - Set the current date (2BH).
  --




  procedure GetTime
             (Hour       : in out ModSys.S_Natural;
              Minute     : in out ModSys.S_Natural;
              Second     : in out ModSys.S_Natural;
              hundredths : in out ModSys.S_Natural);

  --*
  --  GetTime - Return the current time (2CH).
  --




  procedure SetTime
             (Hour       : in     ModSys.S_Natural;
              Minute     : in     ModSys.S_Natural;
              Second     : in     ModSys.S_Natural;
              hundredths : in     ModSys.S_Natural;
              Status     : in out boolean);

  --*
  --  SetTime - Set the current time (2DH).
  --




  procedure GetCmndLine
             (Dta : in out string);

  --*
  --  GetCmndLine - Retrieve command line into specified address.
  --




  procedure GetVersion
             (major : in out ModSys.S_Natural;
              minor : in out ModSys.S_Natural);

  --*
  --  GetVersion - Return the DOS version number (30H).
  --




  procedure GetDiskFreeSpace
             (DriveOrUNC    : in     string;
              clustersAvail : in out ModSys.S_Natural;
              clustPerDrv   : in out ModSys.S_Natural;
              bytesPerSec   : in out ModSys.S_Natural;
              secPerClust   : in out ModSys.S_Natural);

  --*
  --  GetDiskFreeSpace - Return the disk free space (36H).
  --




  procedure MakeDirectory
             (directoryName : in     string;
              returnCode    : in out ModSys.S_Natural);

  --*
  --  MakeDirectory - Create the specified subdirectory (39H).
  --
  --  Create a subdirectory.  'directoryName' contains the address
  --  of the string containing the subdirectory drive and name
  --  which is terminated by an ASCIIX.nul character.  A DOS error
  --  code is returned (see DOS tech. ref. manual).
  --




  procedure RemoveDirectory
             (directoryName : in     string;
              returnCode    : in out ModSys.S_Natural);

  --*
  --  RemoveDirectory - Remove the specified subdirectory (3AH).
  --
  --  Remove a subdirectory.  'directoryName' contains the address
  --  of the string containing the subdirectory drive and name
  --  which is terminated by an ASCIIX.nul character.  A DOS error
  --  code is returned (see DOS tech. ref. manual).
  --




  procedure ChangeDirectory
             (directoryName : in     string;
              returnCode    : in out ModSys.S_Natural);

  --*
  --  ChangeDirectory - Change to the specified subdirectory (3BH).
  --
  --  Change to the subdirectory.  'directoryName' contains the address
  --  of the string containing the subdirectory drive and name
  --  which is terminated by an ASCIIX.nul character.  A DOS error
  --  code is returned (see DOS tech. ref. manual).
  --




  procedure CreateFile
             (FileName   : in     string;
              attribute  : in     AttrType;
              handle     : in out HandleType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  CreateFile - Creates a new file or truncates an old one (3CH).
  --




  procedure OpenFile
             (FileName   : in     string;
              openMode   : in     OpenType;
              handle     : in out HandleType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  OpenFile - Opens the specified file (3DH).
  --




  procedure CloseFile
             (handle     : in     HandleType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  CloseFile - Close the specified file handle (3EH).
  --




  procedure CommitFile
             (handle     : in     HandleType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  CommitFile - Commit (flush) the file to disk. (68H).
  --




  procedure ReadFile
             (handle     : in     HandleType;
              Buffer     : in     System.Address;
              Count      : in out ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  ReadFile - Read bytes from a file into a specified address (3FH).
  --




  procedure WriteFile
             (handle     : in     HandleType;
              Buffer     : in     System.Address;
              Count      : in out ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  WriteFile - Write bytes from an address to a file (40H).
  --




  procedure DeleteFile
             (FileName   : in     string;
              returnCode : in out ModSys.S_Natural);

  --*
  --  DeleteFile - Removes a file from the directory (41H).
  --
  --  Delete the file whose name is found at the 'fileName'
  --  address from the directory.  The file name must be
  --  terminated by an ASCIIX.nul.
  --




  procedure LSeek
             (handle     : in     HandleType;
              offset     : in     ModSys.S_Integer;
              Method     : in     ModSys.S_Natural;
              newPos     : in out ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  LSeek - Move file read write pointer (42H).
  --




  procedure GetFileMode
             (FileName   : in     string;
              attribute  : in out AttrType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  GetFileMode - Return the mode of the specified file (43H).
  --




  procedure SetFileMode
             (FileName   : in     string;
              attribute  : in     AttrType;
              returnCode : in out ModSys.S_Natural);

  --*
  --  SetFileMode - Set the mode of the specified file (43H).
  --




  procedure GetCurrentDirectory
             (Directory  :    out string;
              returnCode : in out ModSys.S_Natural);

  --*
  --  GetCurrentDirectory - Return the drive and path of current directory (47H).
  --




  procedure FindFirstFile
             (filePattern  : in     string;
              searchBuffer : in     System.Address;
              attribute    : in     AttrType;
              returnCode   : in out ModSys.S_Natural);

  --*
  --  FindFirstFile - Find the first file matching specifications (4EH).
  --




  procedure FindNextFile
             (searchBuffer : in     System.Address;
              returnCode   : in out ModSys.S_Natural);

  --*
  --  FindNextFile - Find the next file match specs. in FindFirstFile (4FH).
  --




  procedure RenameFile
             (OldFileName : in     string;
              NewFileName : in     string;
              returnCode  : in out ModSys.S_Natural);

  --*
  --  RenameFile - Rename the specified file (56H).
  --




  procedure GetFileDate
             (handle     : in     HandleType;
              date       : in out ModSys.S_Integer;
              Time       : in out ModSys.S_Integer;
              returnCode : in out ModSys.S_Natural);

  --*
  --  GetFileDate - Get the file's date and time (57H).
  --




  procedure SetFileDate
             (handle     : in     HandleType;
              date       : in     ModSys.S_Integer;
              Time       : in     ModSys.S_Integer;
              returnCode : in out ModSys.S_Natural);

  --*
  --  SetFileDate - Set the file's date and time (57H).
  --




  procedure GetExtendedError
             (Error    : in out ModSys.S_Natural;
              ErrClass : in out ModSys.S_Natural;
              Action   : in out ModSys.S_Natural;
              locus    : in out ModSys.S_Natural);

  --*
  --  GetExtendedError - Return additional error info. (59H).
  --




  function PrinterStatus
            (port : in     ModSys.S_Integer32) return Unsigned.BYTE;

  --*
  --  PrinterStatus - Return the printer status.
  --




  procedure SetHandleCount
             (Count      : in     ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  SetHandleCount - Set the maximum number of file handles open (67H).
  --




  procedure GetReturnCode
             (returnType : in out ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  GetReturnCode - Get the return (4DH).
  --




  procedure DosExec
             (FileName   : in     string;
              parms      : in     string;
              func       : in     ModSys.S_Natural;
              returnCode : in out ModSys.S_Natural);

  --*
  --  DosExec - Load and execute a program (4BH).
  --




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance