dos3d
diff src/mouse.c @ 23:f2c2e45e8edd
reverted the mistaken push from the deepstone branch
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 21 Sep 2013 18:22:11 +0300 |
parents | 00d84ab1ef26 |
children |
line diff
1.1 --- a/src/mouse.c Sat Sep 21 18:18:31 2013 +0300 1.2 +++ b/src/mouse.c Sat Sep 21 18:22:11 2013 +0300 1.3 @@ -1,5 +1,4 @@ 1.4 #include "mouse.h" 1.5 -#include "inttypes.h" 1.6 1.7 #define INTR 0x33 1.8 1.9 @@ -14,8 +13,8 @@ 1.10 1.11 int have_mouse(void) 1.12 { 1.13 - int16_t res; 1.14 - __asm { 1.15 + int res; 1.16 + asm { 1.17 mov ax, QUERY 1.18 int INTR 1.19 mov res, ax 1.20 @@ -25,8 +24,8 @@ 1.21 1.22 void show_mouse(int show) 1.23 { 1.24 - int16_t cmd = show ? SHOW : HIDE; 1.25 - __asm { 1.26 + int cmd = show ? SHOW : HIDE; 1.27 + asm { 1.28 mov ax, cmd 1.29 int INTR 1.30 } 1.31 @@ -34,9 +33,9 @@ 1.32 1.33 int read_mouse(int *xp, int *yp) 1.34 { 1.35 - int16_t x, y, bn; 1.36 + int x, y, bn; 1.37 1.38 - __asm { 1.39 + asm { 1.40 mov ax, READ 1.41 int INTR 1.42 mov bn, bx 1.43 @@ -52,24 +51,24 @@ 1.44 1.45 void set_mouse(int x, int y) 1.46 { 1.47 - __asm { 1.48 + asm { 1.49 mov ax, WRITE 1.50 - mov ecx, x 1.51 - mov edx, y 1.52 + mov cx, x 1.53 + mov dx, y 1.54 int INTR 1.55 } 1.56 } 1.57 1.58 void set_mouse_limits(int xmin, int ymin, int xmax, int ymax) 1.59 { 1.60 - __asm { 1.61 + asm { 1.62 mov ax, XLIM 1.63 - mov ecx, xmin 1.64 - mov edx, xmax 1.65 + mov cx, xmin 1.66 + mov dx, xmax 1.67 int INTR 1.68 mov ax, YLIM 1.69 - mov ecx, ymin 1.70 - mov edx, ymax 1.71 + mov cx, ymin 1.72 + mov dx, ymax 1.73 int INTR 1.74 } 1.75 }