@DATABASE "Paarexx"
@AUTHOR "Dieter Sabathi, Bernd Gollesch, Oliver Gerler"
@$VER: Paarexx.guide 1.0 (23.12.95)© 1995 Dieter Sabathi, Bernd Gollesch, Oliver Gerler
@(C) "1995 by Dieter Sabathi"
@SMARTWRAP

@NODE MAIN "Paarexx - Contents"
@{JCENTER}



@{FG HIGHLIGHT}Paarexx


@{FG TEXT}Version 1.0


© 1995 by Dieter Sabathi





@{JLEFT}@{LINDENT 15}@{LINE}
@{" Disclaimer       " LINK i_net} What I am not responsible for!@{LINE}
@{" Preface          " LINK jo_wos} What it is and what it is not!@{LINE}
@{" Using Paarexx    " LINK kannst_eh} Which instructions can be used?@{LINE}
@{LINE}
@{" Information      " LINK wast_eh} What You ever wanted to know...@{LINE}
@{" Example          " LINK beispiel} AREXX-script for first steps.@{LINE}
@{LINE}
@ENDNODE


@NODE i_net "Disclaimer"
@{JLEFT}@{LINDENT 0}@{LINE}
@{LINE}
The author neither assumes nor accepts any responsibility for the use or misuse
of this program, code or connected hardware.
@{LINE}@{LINE}
The author will not be liable for any damage arising from the failure of this program
or any destruction of other programs or data caused by using Paarexx.
@{LINE}@{LINE}
The user of this program uses this material at his or her own risk. No guarantee of any
kind is given that the program described in this document is 100% reliable.
@{LINE}@{LINE}
Commercial usage is only allowed if You state in Your documentation that Paarexx was used
and that Paarexx is Copyright ® 1995 by Dieter Sabathi.
@ENDNODE



@NODE jo_wos "Preface"
@{JLEFT}@{LINDENT 0}@{LINE}
@{LINE}
Paarexx is an Arexx Server to control the data-pins of the internal parallel port of an Amiga,
to say some attached hardware, what it has to do.
@{LINE}
It cannot read data as an input from the attached hardware nor does it set or clear any of
the control-pins of the parallel port (Strobe, Select, Busy, ...).
@{LINE}
@{LINE}
I tried to program Paarexx as close to the guidelines discussed in the Amiga Rom Kernel
Reference Manuals as possible: The parallel port can only be used, if there is no other software,
which uses it (e.g. Bridgeboard, Printer, Digitizer, a.s.o.). Paarexx arbitrates the port via
the misc.resource for exclusive access. Normally, all software should do this!@{LINE}
@{LINE}
@{B}@{FG HIGHLIGHT}IMPORTANT:@{FG TEXT}@{LINE}
Only start Paarexx, if the desired hardware is connected to the parallel port!
The author is not responsible for any damage arising from the failure of this
program or any incompetent usage of Paarexx.@{UB}@{LINE}
@{LINE}
@ENDNODE


@NODE kannst_eh "Using Paarexx"
@{JLEFT}@{LINDENT 0}@{LINE}
@{LINE}
At startup Paarexx opens an Arexx-port named "Paarexx" (case-sensitive!)@{LINE}
@{LINE}
The commands understood by Paarexx are as follows.
@{LINE}
@{LINDENT 5}@{LINE}
SETBIT @{I}<BIT>@{UI}@{LINE}
~~~~~~@{LINDENT 8}@{LINE}
SETBIT sets the corresponding (data-)bit of the parallel port.@{LINE}
@{I}<BIT>@{UI} has to be among 0 and 7. If You try to set another bit, You
receive error 18 (incorrect argument).@{LINE}
@{LINE}
@{LINDENT 5}@{LINE}
CLEARBIT @{I}<BIT>@{UI}@{LINE}
~~~~~~~~@{LINDENT 8}@{LINE}
CLEARBIT resets the corresponding (data-)bit of the parallel port.@{LINE}
@{I}<BIT>@{UI} has to be among 0 and 7. If You try to set another bit, You
receive error 18 (incorrect argument).@{LINE}
@{LINE}
@{LINDENT 5}@{LINE}
SETALL@{LINE}
~~~~~~@{LINDENT 8}@{LINE}
SETALL sets all 8 bits of the parallel port.@{LINE}
There are no arguments required.@{LINE}
@{LINE}
@{LINDENT 5}@{LINE}
CLEARALL@{LINE}
~~~~~~~~@{LINDENT 8}@{LINE}
CLEARALL resets all 8 bits of the parallel port.@{LINE}
There are no arguments required.@{LINE}
@{LINE}
@{LINDENT 5}@{LINE}
STATUS@{LINE}
~~~~~~@{LINDENT 8}@{LINE}
STATUS gives You the actual state of the port-bits as a decimal value.
It does not read in any value from the outer side of the parallel port.@{LINE}
There are no arguments required.@{LINE}
@{LINE}
@{LINDENT 5}@{LINE}
INFO@{LINE}
~~~~@{LINDENT 8}@{LINE}
INFO writes a short informational text to the RESULT variable.@{LINE}
There are no arguments required.@{LINE}
@{LINDENT 0}@{LINE}
@{LINE}
If You use the commands STATUS and INFO You have to activate OPTIONS RESULTS
in Your Arexx-script. The result of these instructions are delivered in the variable RESULT
(to be seen in @{"beispiel.rexx" LINK beispiel}).

@ENDNODE


@NODE wast_eh "Information"
@{LINE}
Paarexx is Freeware and may be copied and uncommercially used in any way.@{LINE}
@{LINE}
@{B}@{FG HIGHLIGHT}ATTENTION!@{FG TEXT} Paarexx DIRECTLY programs the I/O-pins
of the parallel port after it has arbitrated the port from the OS. Reading in of data
is @{FG HIGHLIGHT}not@{FG TEXT} possible with Paarexx!@{UB}@{LINE}@{LINE}
The author is not reliable for any failures arising from the usage of Paarexx.
@{LINE}@{LINE}
Paarexx is © by Dieter Sabathi, PRO system Computersysteme,
Merangasse 32, 8010 Graz, Austria.@{LINE}
@{LINE}
For bugreports, infos, improvements aso. please e-mail to@{LINE}
@{LINDENT 5}@{FG SHINE}"dieter\@prosys.co.at".@{FG TEXT}@{LINE}
@{LINDENT 0}@{LINE}
Paarexx is compiled using the Arexxbox by Michael Balzer.@{LINE}

Amigaguide-files by @{FG HIGHLIGHT}Bernd Gollesch@{FG TEXT} and @{FG HIGHLIGHT}Oliver
Gerler@{FG TEXT}.

Translations by @{FG HIGHLIGHT}Oliver Gerler@{FG TEXT}.
@ENDNODE

@NODE beispiel "beispiel.rexx"
/*

** AREXX-script for Paarexx by Dieter Sabathi

**

** $VER: beispiel.rexx for Paarexx 1.0 (23.12.95)© 1995 Dieter Sabathi, Bernd Gollesch

**

** Same script as in german documentation, but with english texts

*/


ADDRESS "AREXX"


h_stat=SHOW("P","Paarexx")


IF ~ h_stat THEN DO

   SAY

   SAY "Paarexx was not started!"

   SAY

   EXIT

END


ADDRESS "Paarexx"

OPTIONS RESULTS           /* for STATUS and INFO */

OPTIONS PROMPT "PRESS RETURN"


SAY

SAY "Resetting of all bits with CLEARALL"

PULL LINE


CLEARALL

STATUS

h_stat = RESULT


SAY

SAY "Status: " h_stat

SAY

SAY "Setting of bits 0 to 7 (without resetting)"

PULL LINE

SAY


DO i = 0 TO 7

   SETBIT i

   STATUS

   h_stat = RESULT

   SAY "Setting bit" i", Status = " h_stat

END


CLEARALL


SAY

SAY "Setting of bits 0 to 7 (with resetting)"

PULL LINE

SAY


DO i = 0 TO 7

   SETBIT i

   STATUS

   h_stat = RESULT

   SAY "Setting bit" i", Status = " h_stat

   CLEARBIT i

END


CLEARALL


SAY

SAY "Setting of all bits with SETALL"

PULL LINE


SETALL

STATUS

h_stat = RESULT


SAY

SAY "Status: " h_stat

SAY

SAY "Fetching of an infotext with INFO"

PULL LINE


INFO

h_text = RESULT

SAY h_text

SAY

SAY "*** End of example ***"


EXIT

@ENDNODE
