home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: AssemPro For Development Amiga Driver / Lowe_AssemProForDevelopmentAmigaDriver.adf / Includes / devices / parallel.i < prev    next >
Encoding:
Text File  |  1978-06-06  |  5.5 KB  |  162 lines

  1.  
  2. ;****************************************************************
  3. ;                                                               ;
  4. ; Copyright 1985, Commodore Amiga Inc.  All rights reserved.    ;
  5. ; No part of this program may be reproduced, transmitted,       ;
  6. ; transcribed, stored in retrieval system, or translated into   ;
  7. ; any language or computer language, in any form or by any      ;
  8. ; means, electronic, mechanical, magnetic, optical, chemical,   ;
  9. ; manual or otherwise, without the prior written permission of  ;
  10. ; Commodore-Amiga Incorporated, 983 University Ave. Building #D,*
  11. ; Los Gatos, California, 95030                                  ;
  12. ;                                                               ;
  13. ;****************************************************************
  14.  
  15.  
  16. ;****************************************************************
  17. ;
  18. ; parallel.i -- external declarations for Serial Port Driver
  19. ;
  20. ; SOURCE CONTROL
  21. ; ------ -------
  22. ; $Header: parallel.i,v 25.0 85/03/27 19:14:15 tomp Exp $
  23. ;
  24. ; $Locker:  $
  25. ;
  26. ;****************************************************************
  27.  
  28.     IFND     DEVICES_PARALLEL_I@
  29. DEVICES_PARALLEL_I@ = 1
  30.  
  31.     IFND     EXEC_STRINGS_I@
  32.     include 'exec/strings.i'
  33.     ENDIF
  34.  
  35.     IFND     EXEC_IO_I@
  36.     include 'exec/io.i'
  37.     ENDIF
  38.  
  39. ;--------------------------------------------------------------------
  40. ;
  41. ; Driver error definitions
  42. ;
  43. ;--------------------------------------------------------------------
  44.  
  45. ParErr_DevBusy          EQU     1
  46. ParErr_BufTooBig        EQU     2
  47. ParErr_InvParam         EQU     3
  48. ParErr_LineErr          EQU     4
  49. ParErr_NotOpen          EQU     5
  50. ParErr_PortReset        EQU     6
  51. ParErr_InitErr          EQU     7
  52.  
  53. ;--------------------------------------------------------------------
  54. ;
  55. ; Useful constants
  56. ;
  57. ;--------------------------------------------------------------------
  58. ;
  59. PDCMD_QUERY        EQU     CMD_NONSTD 
  60. PDCMD_SETPARAMS    EQU     CMD_NONSTD+1
  61. Par_DEVFINISH      EQU     10        ; number of device comands 
  62. ;
  63. ;--------------------------------------------------------------------
  64. ;
  65. ; Driver Specific Commands
  66. ;
  67. ;--------------------------------------------------------------------
  68.  
  69. ;-- PARALLELNAME is a generic macro to get the name of the driver.  This
  70. ;-- way if the name is ever changed you will pick up the change
  71. ;-- automatically.
  72. ;--
  73. ;-- Normal usage would be:
  74. ;--
  75. ;-- internalName:       PARALLELNAME
  76. ;--
  77.  
  78. PARALLELNAME:   MACRO
  79.                 STRING  'parallel.device'
  80.                 ENDM
  81.  
  82. ;        BITDEF  PAR,SHARED,5      ; PARFLAGS non-exclusive access
  83. PARB_SHARED = 5      ; PARFLAGS non-exclusive access
  84. PARF_SHARED = 1<<5      ; PARFLAGS non-exclusive access
  85. ;        BITDEF  PAR,RAD_BOOGIE,3  ;    "     (not yet implemented)
  86. PARB_RAD_BOOGIE = 3  ;    "     (not yet implemented)
  87. PARF_RAD_BOOGIE = 1<<3  ;    "     (not yet implemented)
  88. ;        BITDEF  PAR,EOFMODE,1     ;    "     EOF mode enabled bit
  89. PARB_EOFMODE = 1     ;    "     EOF mode enabled bit
  90. PARF_EOFMODE = 1<<1     ;    "     EOF mode enabled bit
  91. ;        BITDEF  IOPAR,QUEUED,6    ; IO_FLAGS rqst-queued bit
  92. IOPARB_QUEUED = 6    ; IO_FLAGS rqst-queued bit
  93. IOPARF_QUEUED = 1<<6    ; IO_FLAGS rqst-queued bit
  94. ;        BITDEF  IOPAR,ABORT,5     ;    "     rqst-aborted bit
  95. IOPARB_ABORT = 5     ;    "     rqst-aborted bit
  96. IOPARF_ABORT = 1<<5     ;    "     rqst-aborted bit
  97. ;        BITDEF  IOPAR,ACTIVE,4    ;    "     rqst-qued-or-current bit
  98. IOPARB_ACTIVE = 4    ;    "     rqst-qued-or-current bit
  99. IOPARF_ACTIVE = 1<<4    ;    "     rqst-qued-or-current bit
  100. ;        BITDEF  IOPT,RWDIR,3      ; IO_STATUS read=0,write=1
  101. IOPTB_RWDIR = 3      ; IO_STATUS read=0F_write=1
  102. IOPT = 1<<RWDIR,3      ; IO_STATUS read=0,write=1
  103. ;        BITDEF  IOPT,PBUSY,2      ;    "     printer in busy toggle
  104. IOPTB_PBUSY = 2      ;    "     printer in busy toggle
  105. IOPTF_PBUSY = 1<<2      ;    "     printer in busy toggle
  106. ;        BITDEF  IOPT,PAPEROUT,1   ;    "     paper out
  107. IOPTB_PAPEROUT = 1   ;    "     paper out
  108. IOPTF_PAPEROUT = 1<<1   ;    "     paper out
  109. ;        BITDEF  IOPT,PSEL,0       ;    "     printer selected
  110. IOPTB_PSEL = 0       ;    "     printer selected
  111. IOPTF_PSEL = 1<<0       ;    "     printer selected
  112. ;
  113. ;
  114. ;***********************************************************************
  115.  
  116.  STRUCTURE PTERMARRAY,0
  117.         ULONG    PTERMARRAY_0
  118.         ULONG    PTERMARRAY_1
  119.         LABEL    PTERMARRAY_SIZE
  120.  
  121. ;****************************************************************
  122. ;  CAUTION |||  IF YOU ACCESS the parallel.device, you MUST (||||) use an
  123. ;  IOEXTPAR-sized structure or you may overlay innocent memory, okay ?|   
  124. ;***************************************************************; 
  125.   
  126.  STRUCTURE IOEXTPAR,IOSTD_SIZE
  127.  
  128. ;     STRUCT   MsgNode
  129. ;   0   APTR     Succ
  130. ;   4   APTR     Pred
  131. ;   8   UBYTE    Type
  132. ;   9   UBYTE    Pri
  133. ;   A   APTR     Name
  134. ;   E   APTR     ReplyPort
  135. ;  12   UWORD    MNLength
  136. ;     STRUCT   IOExt
  137. ;  14   APTR     IO_DEVICE
  138. ;  18   APTR     IO_UNIT
  139. ;  1C   UWORD    IO_COMMAND
  140. ;  1E   UBYTE    IO_FLAGS
  141. ;  1F   UBYTE    IO_ERROR
  142. ;     STRUCT   IOStdExt
  143. ;  20   ULONG    IO_ACTUAL
  144. ;  24   ULONG    IO_LENGTH
  145. ;  28   APTR     IO_DATA
  146. ;  2C   ULONG    IO_OFFSET
  147. ;
  148.  
  149. ;
  150. ;  30
  151.         ULONG   IO_PEXTFLAGS    ; (not used) flag extension area
  152.         UBYTE   IO_PARSTATUS    ; device status (see bit defs above)
  153.         UBYTE   IO_PARFLAGS     ; see PARFLAGS bit definitions above 
  154.         STRUCT  IO_PTERMARRAY,PTERMARRAY_SIZE ; termination char array
  155.         LABEL   IOEXTPar_SIZE
  156.  
  157. ;***************************************************************************
  158.  
  159.     ENDIF
  160.     END
  161.