Aquí existen algunas funciones que no están implementadas en macros de la cabecera. No todas las he usado, y por ello no creé macro.
MOUSE.ASM
; Copyright (C) 2013 José Ángel Moneo Fernández ; This program is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; along with this program. If not, see <http://www.gnu.org/licenses/>.
_modelo exe
_code
public _mouse_thd
public _inst_sub_mouse
public _set_rang
public _mouse_graf
public _vel_mouse
;DEFINE CURSOR DE TEXTO POR HARDWARE
;MOUSE_THD()
_mouse_thd proc near
mov ax,10
mov bx,1
mov cx,1
mov dx,24
int 33h
ret
_mouse_thd endp
;COLOCA RANGO DE MOVIMIENTO DEL RATON EN UNA CIERTA DIRECCION
;SET_RANG(INT DIRECCION,INT MINIMO,INT MAXIMO)
_set_rang proc near
push bp ;DIRECCION 0 HORIZONTAL
mov bp,sp ; 1 VERTICAL
mov cx,[bp+6]
mov dx,[bp+8]
cmp byte ptr[bp+4],0
jz horizontal
cmp byte ptr [bp+4],1
jz vertical
pop bp
ret
horizontal:
mov ax,7
int 33h
pop bp
ret
vertical:
mov ax,8
int 33h
pop bp
ret
_set_rang endp
;DEFINE CURSOR GRAFICO
;MOUSE_GRAF(INT CEN_X,INT CEN_Y,INT *MASK)
_mouse_graf proc near
push bp ;cen_x y cen_y -16 y 16
mov bp,sp ; fondo cursor efecto
mov ax,9 ; 0 0 0
mov bx,[bp+4] ; 0 1 1
mov cx,[bp+6] ; 1 0 invariable
mov dx,[bp+8] ; 1 1 invertido
int 33h ;
pop bp
ret
_mouse_graf endp
;CAMBIA LA VELOCIDAD DEL RATON
;VEL_MOUSE(INT V_HORIZONTAL,INT V_VERTICAL)
_vel_mouse proc near
push bp
mov bp,sp
mov ax,15
mov cx,[bp+4]
mov dx,[bp+6]
int 33h
pop bp
ret
_vel_mouse endp
end
No hay comentarios:
Publicar un comentario
Si tienes algún comentario, duda o sugerencia, o si quieres aportar algún código creado a partir de las librerías expuestas aquí, por favor, indícamelo.