Is there any classic PS/2 mouse init code works in PMode, without disabling Keyboard interrupt? The init code I wrote works fine in BOCHS.
The keyboard dies when enabling the mouse IRQ12 bit, but the mouse works fine alone.
IBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_IBF
jnz IBF8042
ret
OBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_OBF
jz OBF8042
ret
call IBF8042
mov al,0x20
out PS2_Port_Command,al
call IBF8042
in al,PS2_Port_Data
or al,00000011b
push eax
call IBF8042
mov al,0x60
out PS2_Port_Command,al
call IBF8042
pop eax
out PS2_Port_Data,al
Is there any classic PS/2 mouse init code works in PMode?
With Mr. PCMattMan, my lucky star's help.
We got a working PMode code sequence for PS/2 mouse initialization.
IBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_IBF
jnz IBF8042
ret
OBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_OBF
jz OBF8042
ret
PS2MousePMInit: call IBF8042
mov al,0xA8
out PS2_Port_Command,al
call IBF8042
mov al,0x20
out PS2_Port_Command,al
/***/ call IBF8042
/***/ call OBF8042
in al,PS2_Port_Data
or al,00000011b
push eax
call IBF8042
mov al,0x60
out PS2_Port_Command,al
call IBF8042
pop eax
out PS2_Port_Data,al
call IBF8042
mov al,0xD4
out PS2_Port_Command,al
call IBF8042
mov al,0xF4
out PS2_Port_Data,al
call OBF8042
in al,PS2_Port_Data
Pay attention to the Mark /***/
We got a working PMode code sequence for PS/2 mouse initialization.
IBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_IBF
jnz IBF8042
ret
OBF8042: nop,,nop,,nop,,nop,,nop
in al,PS2_Port_Status
test al,PS2_KB_Bit_OBF
jz OBF8042
ret
PS2MousePMInit: call IBF8042
mov al,0xA8
out PS2_Port_Command,al
call IBF8042
mov al,0x20
out PS2_Port_Command,al
/***/ call IBF8042
/***/ call OBF8042
in al,PS2_Port_Data
or al,00000011b
push eax
call IBF8042
mov al,0x60
out PS2_Port_Command,al
call IBF8042
pop eax
out PS2_Port_Data,al
call IBF8042
mov al,0xD4
out PS2_Port_Command,al
call IBF8042
mov al,0xF4
out PS2_Port_Data,al
call OBF8042
in al,PS2_Port_Data
Pay attention to the Mark /***/