主片初始化程序段:MOVAL,00010001B;ICW1:边沿,ICW4,ICW3OUT20H,AL;写入ICW1MOVAL,00001111B;ICW2:IR7中断类型号为0FHOUT21H,AL;写入ICW2MOVAL,00000100B;ICW3:主片IR2接从片INTOUT21H,AL;写入ICW3MOVAL,00000101B;ICW4:无缓冲,非正常中断结束OUT21H,AL;写入ICW4从片初始化程序段:MOVAL,00010001B;ICW1:边沿,ICW4,ICW3OUT0A0H,AL;写入ICW