a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Devices:
 parallel.device
  CMD_CLEAR
  CMD_FLUSH
  CMD_READ
  CMD_RESET
  CMD_START
  CMD_STOP
  CMD_WRITE
  OpenDevice
  PDCMD_QUERY
  PDCMD_SETPARAMS
Include
GuruMeditation
Docs » Autodocs » parallel.device » OpenDevice

NAME

	Open -- a request to open the parallel port

SYNOPSIS

	error = OpenDevice("parallel.device", unit, ioExtPar, flags)
D0 A0 D0 A1 D1

FUNCTION

	This function allows the requestor software access to the parallel
device. Unless the shared-access bit (bit 5 of io_ParFlags) is
set, exclusive use is granted and no other access is allowed
until the owner closes the device.
A FAST_MODE, can be specified (bit 3 of io_Parflags) to speed up
transfers to high-speed printers. Rather than waiting for the printer
to acknowledge a character using the *ACK interrupt, this mode will
send out data as long as the BUSY signal is low. The printer must be
able to raise the BUSY signal within 3 micro-seconds on A2630s,
otherwise data will be lost. Should be used only in an exclusive-
access Open().
A SLOWMODE mode can be specified (bit 4 of io_ParFlags) when very
slow printers are used. If the printer acknowledges data at less
than 5000 bytes per second, then this mode will actually save CPU
time, although it consumes much more with high-speed printers.
The PTermArray of the ioExtPar is initialized only if the EOFMODE
bit (bit 1 of io_ParFlags) is set. The PTermArray can be further
modified using the PDCMD_SETPARAMS command.

INPUTS

	"parallel.device" - a pointer to literal string "parallel.device"
unit - Must be zero for future compatibility
ioExtPar - pointer to an IO Request block of structure IOExtPar to
be initialized by the Open() function. The io_ParFlags
field must be set as desired.
flags - Must be zero for future compatibility

RESULT

	d0 -- same as io_Error
io_Error -- if the Open succeded, then io_Error will be null.
If the Open failed, then io_Error will be non-zero.

SEE ALSO

exec/CloseDevice

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Alpha Flight 1970

AOA
TBL
AFL
RSI

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se