
#define PORT_A 0
#define PORT_B 1
#define PORT_C 2
#define CWR    3

values will be written/read as
*(ptr_8255 + PORT_B) = my_val;            //writing to portB
port_val = *(ptr_8255 + PORT_A);          //reading portA
