LD X000
ANI X001
OR Y000
OUT Y000
LD Y000
MPS
ANI T0
ANI Y002
OUT T0 K5
MRD
AND T0
OR M0
ANI Y002
OUT M0
OUT T1 K2
MPP
AND T1
OR Y002
ANI Y001
OUT Y002
LD X000
ANI X001
OR Y000
OUT Y000
LD Y000
MPS
ANI T0
ANI Y002
OUT T0 K5
MRD
AND T0
OR M0
ANI Y002
OUT M0
OUT T1 K2
MPP
AND T1
OR Y002
ANI Y001
OUT Y002