The 8259A has an even address (A0=0) and an odd address (A0=1) associated with it and the initialization command words must be filled consecutively by using the even address for ICW1 and the odd address for the remaining ICWs.
The definitions of the bits in ICW1 are:

Bits 7-3 of ICW2 are filled from bits 7-3 of the second byte output by the CPU during the initialization of the 8259A and bits 2-0 are set according to the level of the interrupt request, e.g. a request on IR6 would cause them to be set to 110. ICW3 is significant only in systems including more than one 8259A and is output to only if SNGL=0. This case is discussed in Sec.8-3-2. ICW4 is output to only if IC4 (ICW1) is set to 1, otherwise, the contents of ICW4 is cleared. The bits in ICW4 are defined as follows: A typical program sequence for setting the contents of the ICWs, which assumed that the even address of the 8259A is 0080 is:
MOV AL, 13H
OUT 80H, AL
MOV AL, 18H
OUT 81H, AL
MOV AL, 0DH
OUT 81H, AL
The first two instructions cause the requests to be edge-triggered, denote that only one 8259A is used, and inform the 8259A that an ICW4 will be output. The next two instructions cause the 5 most significant bits of the interrupt type to be set to 0011. ICW3 is not output to because SNGL=1; therefore, the last two instructions set ICW4 to 0DH, which informs the 8259A that the special fully nested mode is not to be used, the /SP / /EN is used to disable transceivers, the 8259A is a master, EOI commands must be used to clear the ISR bit, and the 8259A is part of an 8086/8088 system.
There are three OCWs. The command word OCW1 is used for masking interrupt requests; when the mask bit corresponding to an interrupt request is set to 1, then the request is blocked. OCW2 and OCW3 are for controlling the mode of the 8259A and receiving EOI commands.

PRETHODNA FOLIJA SADRZAJ SLEDECA FOLIJA