Fixed asm routines, taskloop and ringbuffer code.