1
2; ===============================================================
3; Apr 2014
4; ===============================================================
5;
6; uint16_t in_mouse_kempston_wheel(void)
7;
8; Report position of mouse track wheel.
9;
10; ===============================================================
11
12SECTION code_clib
13SECTION code_input
14
15PUBLIC asm_in_mouse_kempston_wheel
16
17EXTERN __input_kempston_mouse_wheel
18
19asm_in_mouse_kempston_wheel:
20
21   ; exit : success
22   ;
23   ;           hl = track wheel position
24   ;           carry reset
25   ;
26   ;        fail
27   ;
28   ;           hl = 0
29   ;           carry set, errno = ENOTSUP
30   ;
31   ; uses : f, hl
32
33   ld a,$fa
34   in a,($df)
35
36   and $f0
37
38   ld h,a
39   ld l,0
40
41   ret
42