ALLSTOP(OPCSDEFS)	Optical Printer Control System	  ALLSTOP(OPCSDEFS)

        allstop - define the ALLSTOP key

        allstop [port] [mask] [test] [0]    # (all values in hex!)

        allstop 0060 7f 46 0                # typical for SCROLL LOCK key

        This command defines the allstop key for the software. The ALLSTOP
	button can be any key, or for that matter any bit on any port on the
	IBM PC, but keyboard's (`) key is recommended.

        To determine the correct value to use for a different key to be
        the ALLSTOP key, you can run the following BASIC program which
        will print hex numbers you can use for the [test] value:
                10 PRINT HEX$(INP(&h60));:GOTO 10

        Run this program in BASIC. As you type different keys, different
        values will show up on the screen. Use this for the [test] argument
        to ALLSTOP(OPCSDEFS) to change the allstop key.

	[port] is the  port number.

	[mask] is applied to the value received from the port 
	whenever the software is checking for an allstop condition. This
	is applied before comparing to [test].

	[test] is compared to the value read from the port after
	[mask] is applied. If the result is the same as [test], an allstop 
	condition exists.

        [0] is always zero.

	Under normal conditions, [port] is 0060 (the keyboard port), [mask]
	is usually '7f' (meaning mask off the high bit) and [test] is normally
	'29', which is the (`) key's scancode.

	The software essentially uses the following C code to read the port:

	    if ( ( inp(port) & mask ) == test )
		/* An allstop condition exists  */


	DEENERGIZE(OPCSDEFS)  - define port/bit to deenergize motors
	ALLSTOP(OPDSDEFS)     - define port/bit to detect the allstop key
	BUCKLE(OPCSDEFS)      - define port/bit to detect film buckles
	VIEWER(OPCSDEFS)      - define port/bit to detect viewer open
	TRIPSWITCH(OPCSDEFS)  - define port/bit to detect trip switches
	SETBIT(OPCSDEFS)      - set bit(s) on a port
	CLRBIT(OPCSDEFS)      - clear bit(s) on a port
	XORBIT(OPCSDEFS)      - invert bit(s) on a port

	Gregory Ercolano, Los Feliz California 09/11/90
© Copyright 1997 Greg Ercolano. All rights reserved.