diff --git a/ponydos.asm b/ponydos.asm index 2ffb8f3..91e44cd 100644 --- a/ponydos.asm +++ b/ponydos.asm @@ -11,6 +11,9 @@ org 0x7c00 COLUMNS equ 80 ROWS equ 25 +X_SENSITIVITY equ 1 +Y_SENSITIVITY equ 2 + jmp 0:start initialize_mouse_error: @@ -108,9 +111,9 @@ mainloop: jz .mouse_change_end .mouse_change: mov cx, [di - mouse_column + mouse_x] - shr cx, 1 + shr cx, X_SENSITIVITY mov bx, [di - mouse_column + mouse_y] - shr bx, 2 + shr bx, Y_SENSITIVITY mov ch, bl call flip_mouse_cursor @@ -412,8 +415,8 @@ Y_OVERFLOW equ 0x80 X_OVERFLOW equ 0x40 BUTTONS equ 0x03 -X_MAX_VALUE equ 2*COLUMNS-1 -Y_MAX_VALUE equ 4*ROWS-1 +X_MAX_VALUE equ (1 << X_SENSITIVITY)*COLUMNS-1 +Y_MAX_VALUE equ (1 << Y_SENSITIVITY)*ROWS-1 ; in: ; si = non-zero for Y @@ -484,8 +487,7 @@ mouse_handler: inc si ; will be non-zero mov ax, [bp+2*8+6] mov cl, 2 - ;mov dx - mov dl, Y_MAX_VALUE + mov dx, Y_MAX_VALUE test bl, Y_OVERFLOW call xy_handler