Functions 'di', 'mi' checked. TODO 'mi' have to allow writing only to SRAM