/* * mouse_init — инициализация мышиного драйвера (RST 30h, fn $00). * Возвращает 0 или -1, если драйвер недоступен (CF=1). * Все вызовы RST 30h — с push/pop IX: драйвер регистры не бережёт. */ #include int mouse_init(void) __naked { __asm push ix ld c, #0x00 ; INITIALIZATION rst #0x30 ; MOUSE pop ix jr c, _mi_err ld de, #0 ret _mi_err: ld de, #-1 ret __endasm; }