Wrote some APIC code