]> git.sur5r.net Git - cc65/blob - libsrc/tgi/tgi_ioctl.s
fixed optimization bug where array index is 16-bit, e.g. arr16[i & 0x7f7f]
[cc65] / libsrc / tgi / tgi_ioctl.s
1 ;
2 ; Ullrich von Bassewitz, 2004-10-14
3 ;
4 ; unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);
5 ; /* Call the driver specific control function. What this function does for
6 ; ** a specific code depends on the driver. The driver will set an error
7 ; ** for unknown codes or values.
8 ; */
9 ;
10
11         .include        "tgi-kernel.inc"
12
13         .import         popa
14         .importzp       ptr1
15
16
17 .proc   _tgi_ioctl
18
19         sta     ptr1
20         stx     ptr1+1          ; Save val
21         jsr     popa            ; Retrieve code
22         jmp     tgi_control     ; Call the driver
23
24 .endproc
25
26