0

Hello i want to implement some functions in NASM to get the 3 or 4 bytes of the mouse. i know that IN At 0x64 with 5 bit on (0x20) says that in 0x60 is available info from the mouse (how to get the remaining?). i would like to have these 3 or 4 packets. Im in REAL MODE. with no interruption handling. i know:

1st byte has button states and others
2nd x offset
3rd y offset

i want to get them or identify the movement. thanks

in al, 0x64
test al, 0x20
jnz mouse-event

(how to get packets)

Im compiling asm to elf and boot it in qemu (Seabios) in REAL MODE with vga text, the only progress that i have is detect when the mouse is moved or clicked with the code above

  • 1
    Are you looking at any particular documentation for the I/O ports? – lurker Nov 30 '18 at 03:00
  • 2
    According to https://wiki.osdev.org/Mouse_Input#PS2_Mouse_--_Basic_Operation_.28Microsoft_compliant.29, those "packets" only show up after you initialize the mouse. (And of course your computer or virtual machine has to *have* a PS/2 mouse, or emulate one for a USB mouse if you enabled that in your BIOS.) – Peter Cordes Nov 30 '18 at 04:14
  • Are you making a DOS program or doing this in a bootloader/kernel running in realmode? – Michael Petch Nov 30 '18 at 09:48
  • @MichaelPetch bototloader kernel over seabios in qemu. I detect with the code above the changes from mouse but i want to get the info. thanks – JuanPa Madraxv Dec 04 '18 at 00:57
  • @PeterCordes nice doc. i would like to implement a function to initialize it and query the info. thanks – JuanPa Madraxv Dec 04 '18 at 01:02
  • @luker I just want to implement functions to work with mouse. like query position,initialize button pressed. thanks – JuanPa Madraxv Dec 04 '18 at 01:05

0 Answers0