manipulating I/O ports of Intel 8255 PPI
You cannot address all 24 bits at the same time (e.g. a 24-bit data bus).  Only one of the eight-bit three ports (A, B, C) an be addressed at a time.  This is done using address bits A0 and A1.  The data bus of the 8255 is only 8-bits wide (D0 through D7).

A1 A0
-----
 0  0  Port A
 0  1  Port B
 1  0  Port C
 1  1  control register


The control register determines whether the bits in the various register are used as input or output or handshaking.