home *** CD-ROM | disk | FTP | other *** search
- ;* Eric Fogelin
-
- func12 segment para public 'CODE'
- assume cs:func12
- public _MSFCN12 ; Must declare PUBLIC with underscore
- ; for reference in C program.
- ;
- _MSFCN12 proc far ; Function 12 enables a far CALL.
-
- ; Routine to display custom cursor.
- ; Hide cursor at old location/restore what was under cursor
- ; Save what's under cursor's new position and show cursor
- ; Return to mouse ISS.
-
- ;*********************** Example Specific Code **********************
- ; Save current mouse cursor position
- push cx
- push dx
- mov cx, cs:[oldx]
- mov dx, cs:[oldy]
- ; Hide cursor at old position
- mov bh, 0 ; Video Page 0
- mov al, 0 ; Black pixel
- mov ah, 12 ; Video BIOS Write Pixel
- int 10h ; Call Video BIOS routine
-
- ; Get cursor's new position
- pop dx
- pop cx
- mov cs:[oldx],cx
- mov cs:[oldy],dx
- ; Show cursor at new position
- mov bh, 0 ; Video Page 0
- mov al, 1 ; White pixel
- mov ah, 12 ; Video BIOS Write Pixel
- int 10h ; Call Video BIOS routine
-
- ret
- oldx DW 320 ; New vertical cursor position
- oldy DW 100 ; Old vertical cursor position
- ;**************************************************************************
- _MSFCN12 endp
- ;
- func12 ends
- end
-