title mse2.asm ; shows how to instal a new mouse coursor ; .model small .stack 100h .data A dw 0 B dw 0 ; (A,B) is the initial mouse cursor position C db 150 ; how many times to display mouse cursor D dw 64000 ; delay factor (64000 is the maximum value ; that fits in a word!) default_cur LABEL byte ; screen mask --- dw 0011111111111111b dw 0001111111111111b dw 0000111111111111b dw 0000011111111111b ; dw 0000001111111111b dw 0000000111111111b dw 0000000011111111b dw 0000000001111111b ; dw 0000000000111111b dw 0000000111111111b dw 0001000011111111b dw 0011000011111111b ; dw 1111100001111111b dw 1111100001111111b dw 1111110000111111b dw 1111111111111111b ; ; cursor mask --- dw 0000000000000000b dw 0100000000000000b dw 0110000000000000b dw 0111000000000000b ; dw 0111100000000000b dw 0111110000000000b dw 0111111000000000b dw 0111111100000000b ; dw 0111111110000000b dw 0111111111000000b dw 0111110000000000b dw 0100011000000000b ; dw 0000011000000000b dw 0000001100000000b dw 0000001100000000b dw 0000000000000000b ; funny_cur LABEL BYTE ; my own cursor ; screen mask --- dw 0011101111111111b dw 0001110111111111b dw 0000111011111111b dw 0000011101111111b ; dw 0000001110111111b dw 0000000111011111b dw 0000000011101111b dw 0000000001110111b ; dw 0000000000111011b dw 0000000111011111b dw 0001000011101111b dw 0011000011101111b ; dw 1111100001110111b dw 1111100001110111b dw 1111110000111011b dw 1111111111111111b ; ; cursor mask --- dw 0000000000000000b dw 0100010000000000b dw 0110001000000000b dw 0111000100000000b ; dw 0111100010000000b dw 0111110001000000b dw 0111111000100000b dw 0111111100010000b ; dw 0111111110001000b dw 0111111111000100b dw 0111110001000000b dw 0100011000100000b ; dw 0000011000100000b dw 0000001100010000b dw 0000001100010000b dw 0000000000000000b .code if1 include ..\mac\basic.mac endif ; main proc ; initdata ;macro ; save mode mov ah,0fh int 10h save ;macro ; choose mode 13h mov ah,0 mov al,13h int 10h ; define mouse cursor mov ax, 9 mov bx, -1 ; default hot spot is past arrow tip mov cx, -1 mov dx, offset funny_cur ; es has been setup already int 33h ; set mouse at position (a,b) mov ax,4 mov cx,a mov dx,b int 33h AGAIN: mov ax,1 int 33h ; show cursor ; test if mouse button pressed mov ax,3 int 33h xor bx,bx jnz Done inc A inc A ; increment the horizontal position twice mov cx,A inc B ; increment the vertical position once mov dx,B mov ax,4 int 33h mov cx,D DELAY: loop DELAY sub C,1 jnz again DONE: ; wait for key stroke to terminate program mov ah,0 int 16h restore ;macro xor ah,ah int 10h mov al,bh mov ah,5 int 10h exitdos ;macro main endp end main