home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / obrn-a_1.5_lib.lha / oberon-a / source2.lha / source / amiga / Parallel.mod < prev    next >
Encoding:
Text File  |  1995-01-26  |  3.0 KB  |  96 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Parallel.mod $
  4.   Description: Interface to parallel.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.7 $
  8.       $Author: fjc $
  9.         $Date: 1995/01/26 02:39:55 $
  10.  
  11.   $VER: parallel.h 36.1 (10.5.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. <* STANDARD- *> <* INITIALISE- *> <* MAIN- *>
  24.  
  25. MODULE [2] Parallel;
  26.  
  27. <*$ CaseChk-  IndexChk- LongVars+ NilChk-  *>
  28. <*$ RangeChk- StackChk- TypeChk-  OvflChk- *>
  29.  
  30. IMPORT e := Exec, s := Sets;
  31.  
  32.  
  33. (*
  34. **
  35. **      parallel.device I/O request structure information
  36. **
  37. *)
  38.  
  39. TYPE
  40.  
  41.   IOPArrayPtr * = POINTER TO IOPArray;
  42.   IOPArray * = ARRAY 8 OF CHAR;
  43.  
  44. (******************************************************************)
  45. (* CAUTION !!  IF YOU ACCESS the parallel.device, you MUST (!!!!) use
  46.    an IOExtPar-sized structure or you may overlay innocent memory !! *)
  47. (******************************************************************)
  48.  
  49. TYPE
  50.  
  51.   IOExtParPtr * = POINTER TO IOExtPar;
  52.   IOExtPar * = RECORD (e.IORequestBase)
  53.     ioPar *      : e.IOStdReq;
  54.     pExtFlags *  : s.SET32;  (* (not used) flag extension area *)
  55.     status *     : s.SET8;   (* status of parallel port and registers *)
  56.     parFlags *   : s.SET8;   (* see PARFLAGS bit definitions below *)
  57.     pTermArray * : IOPArray; (* termination character array *)
  58.   END; (* IOExtPar *)
  59.  
  60. CONST
  61.  
  62.   shared *     = 5;         (* ParFlags non-exclusive access bit *)
  63.   slowMode *   = 4;         (*    "     slow printer bit *)
  64.   fastMode *   = 3;         (*    "     fast I/O mode selected bit *)
  65.   radBoogie *  = 3;         (*    "     for backward compatibility *)
  66.   ackMode *    = 2;         (*    "     ACK interrupt handshake bit *)
  67.   eofMode *    = 1;         (*    "     EOF mode enabled bit *)
  68.  
  69.   queued *     = 6;         (* ioFLAGS rqst-queued bit *)
  70.   abort *      = 5;         (*    "     rqst-aborted bit *)
  71.   active *     = 4;         (*    "     rqst-qued-or-current bit *)
  72.   rwDir *      = 3;         (* ioSTATUS read=0,write=1 bit *)
  73.   parSel *     = 2;         (*    "     printer selected on the A1000 *)
  74.                             (* printer selected & serial "Ring Indicator"
  75.                                on the A500 & A2000.  Be careful when
  76.                                making cables *)
  77.   paperOut *   = 1;         (*    "     paper out bit *)
  78.   parBusy *    = 0;         (*    "     printer in busy toggle bit *)
  79. (* Note: previous versions of this include files had bits 0 and 2 swapped *)
  80.  
  81.   parallelName * = "parallel.device";
  82.  
  83.   query *             = e.nonstd;
  84.   setParams *         = e.nonstd+1;
  85.  
  86.   devBusy *          = 1;
  87.   bufTooBig *        = 2;
  88.   invParam *         = 3;
  89.   lineErr *          = 4;
  90.   notOpen *          = 5;
  91.   portReset *        = 6;
  92.   initErr *          = 7;
  93.  
  94.  
  95. END Parallel.
  96.