From b6556bd2f9da23499cdef864ecd71a8eaf3b9b66 Mon Sep 17 00:00:00 2001 From: Javier Date: Tue, 19 Apr 2022 23:00:53 +0200 Subject: fix register clobbering in ps2 calls --- int15ps2.h | 6 +++--- vbox.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/int15ps2.h b/int15ps2.h index 847435d..95bedf7 100644 --- a/int15ps2.h +++ b/int15ps2.h @@ -97,7 +97,7 @@ static ps2m_err ps2m_init(uint8_t packet_size); "end:" \ __parm [bh] \ __value [ah] \ - __modify [ax] + __modify [ax bx] static ps2m_err ps2m_reset(void); #pragma aux ps2m_reset = \ @@ -110,7 +110,7 @@ static ps2m_err ps2m_reset(void); "dec ah" \ "end:" \ __value [ah] \ - __modify [ax] + __modify [ax bx] static ps2m_err ps2m_get_device_id(uint8_t __far *device_id); #pragma aux ps2m_get_device_id = \ @@ -125,7 +125,7 @@ static ps2m_err ps2m_get_device_id(uint8_t __far *device_id); "end:" \ __parm [es di] \ __value [ah] \ - __modify [ax] + __modify [ax bx] static ps2m_err ps2m_set_resolution(uint8_t resolution); #pragma aux ps2m_set_resolution = \ diff --git a/vbox.h b/vbox.h index d47c01a..e2eb0ec 100644 --- a/vbox.h +++ b/vbox.h @@ -60,7 +60,7 @@ static void vbox_send_request(uint16_t iobase, uint32_t addr); "out dx, eax" \ "pop eax" \ __parm [dx] [bx ax] \ - __modify [dx] + __modify [] /** Finds the VirtualBox PCI device and reads the current IO base. * @returns 0 if the device was found. */ -- cgit v1.2.3