Hi, thanks for trying to help. I understand all that. I made SM interface, connected c64 keyboard, added calls to SM functions to main.asm, added declarations which are needed to app_defines.h to free mem locations 0x360-0x374, assembled everything and it works. Things that aren't clear to me are how does SM relate to SR chain. Which SR and pin is invoked when pressing for example F1 on c64 keyboard. I read this http://www.midibox.org/forum/index.php?topic=7168.0 but it's not clear to me. I'm calling USER_DIN_NotifyToggle from SM_NotifyToggle and moxi's calling his own function. Maybe I need to make my own function which will pass something to MIOS_PARAMETER3. I don't know. Thanks, Zoran.