IO improvements for ASM. Changed references to pointers for ASM. Tests working.