CLRBIT(OPCSDEFS) Optical Printer Control System CLRBIT(OPCSDEFS) NAME clrbit - clear bit(s) on an IBMPC port USAGE clrbit [port] [mask] [softlatch] # (values hex!) EXAMPLES clrbit 0378 04 0 # lpt1 port 0378, bit #2 (0x04) clrbit 0306 01 1 # kuper logic connector softlatch bit #1 DESCRIPTION This command disables bits on a port based on a bit mask. All bits specified in the mask are cleared. All values are in hex. [port] is the port number in the range 0000-03ff [mask] is a hex byte value indicating the bits to be cleared on that port. SETBIT(OPCSDEFS) and CLRBIT(OPCSDEFS) can be used in OPCSDEFS.OPC to initialize port hardware bits to known states on OPCS startup. CAVEATS o With [softlatch] set to 1, only ports 0x0000 - 0x07ff are allowed. Any ports above 0x07ff with [softlatch] enabled causes an error. o External programs changing port bits defined to OPCS with [softlatch] (e.g. the kuper logic I/O port) should be aware that OPCS is maintaining its own internal latch for that port, and that latch won't know about hardware changes made by external programs. o Due to these issues, it's best to avoid using hardware that has to be latched. It's usually bad hardware practice to make WRITE ONLY ports, since different programs cannot co-communicate with them, unless some common data area or driver is arranged. SEE ALSO 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 ORIGIN Version K1.12d+ Gregory Ercolano, Venice California 03/04/98