B&B Electronics PPIO manual Xor

Page 19

For example:

 

Output_Byte

= 01010101b

Line_Number

= 3

Status

= 1

00000001b

(1 decimal)

 

 

shift-right 3

(Line_Number) =

00001000b

 

 

XOR

11111111b

 

 

 

11110111b (mask 1)

 

AND

01010101b

(Output_Byte)

00000001b

(Status)

01010101b

 

shift-right 3

(Line_Number) = OR

00001000b

(mask 2)

01011101b (New Output_Byte)

For an example of an application that uses these functions, look at the source code in PPIO.PAS.

PPIO2899 Manual

17

B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104

Image 19
Contents Not Recommended for New Installations Table of Contents Introduction Packing List PC Parallel Port Description Page BIT PPIO2899 Manual Ppio Description & Connection PPIO2899 Manual Controlling the Ppio Using Gwbasic Bit Force I/O on Force I/O OFF Low High Page Begin Controlling the Ppio Using PascalElse Mask Value Function OutputBit BitNumberBYTE Byte Procedure SetOutputBit BitNumber,OutputBYTE XOR Controlling the Ppio Using C Void SetIRQOffvoid Outport ControlAddress Mask Value Page Page New PPIO2899 Manual Page Interfacing to the Ppio PPIO2899 Manual Example USE of the Ppio Page REM IB is the Input Byte and OB is the Output Byte Appendix Hexadecimal NumbersBinary Numbers