simplify test for end of DMA command. Issue #35.