reimplement mempoke, and move implementation of DMAIndication to a library