home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / ASM / ALIB30B / MKEY15.ASM < prev    next >
Assembly Source File  |  1994-10-15  |  2KB  |  83 lines

  1.     page    66,132
  2. ;******************************** MKEY15.ASM *********************************
  3.  
  4. LIBSEG           segment byte public "LIB"
  5.         assume cs:LIBSEG , ds:nothing
  6.  
  7. ;----------------------------------------------------------------------------
  8. .xlist
  9.     include  mac.inc
  10.     include  common.inc
  11. .list
  12. ;----------------------------------------------------------------------------
  13.     extrn    make_pixels:near
  14. comment 
  15. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(MOUSE/KEY)
  16. BOX_THE_MOUSE - limits mouse's range of motion
  17. ;
  18. ; inputs:    dx = box upper left corner (dh=row, dl=column)
  19. ;         bx = box size (bh = number of rows,  bl = number of columns)
  20. ;
  21. ; output:   none
  22. ;* * * * * * * * * * * * * *
  23. 
  24.     PUBLIC    BOX_THE_MOUSE
  25. BOX_THE_MOUSE    PROC    FAR
  26.     apush    ax,bx,cx,dx
  27.     call    make_pixels    ;dx -> cx=left column  dx=top row
  28.     mov    dx,bx
  29.     mov    bx,cx           ;save left column
  30.     call    make_pixels    ;dx -> cx=columns*8   dx=rows*8
  31. ;
  32. ; bx=left column  cx=columns*8
  33. ; stack=top row   dx=rows*8
  34. ;
  35.     xchg    cx,bx        ;cx=left column  bx=columns*8
  36.     xchg    bx,dx        ;dx=columns*8     bx=rows*8
  37. ;
  38. ; cx = left column    bx=rows*8
  39. ; dx = columns * 8    stack=top row
  40. ;
  41.     add    dx,cx        ;compute right column
  42.     mov    ax,7
  43.     int    33h        ;set left column(cx)  right column(dx)
  44.  
  45.     apop    dx,cx,bx,ax
  46.     retf
  47. BOX_THE_MOUSE    ENDP
  48. comment 
  49. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(MOUSE/KEY)
  50. MOUSE_CURSOR_ON - Enable the mouse cursor display
  51. ;
  52. ; inputs:  none
  53. ; output:  none
  54. ;* * * * * * * * * * * * * *
  55. 
  56.     PUBLIC    MOUSE_CURSOR_ON
  57. MOUSE_CURSOR_ON    PROC    FAR
  58.    PUSH    AX
  59.    MOV     AX,0001
  60.    INT     33h
  61.    POP     AX
  62.    RETF
  63. MOUSE_CURSOR_ON    ENDP
  64. comment 
  65. ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(MOUSE/KEY)
  66. MOUSE_CURSOR_OFF - Disable the mouse cursor display
  67. ;
  68. ; inputs:  none
  69. ; output:  none
  70. ;* * * * * * * * * * * * * *
  71. 
  72.     PUBLIC    MOUSE_CURSOR_OFF
  73. MOUSE_CURSOR_OFF    PROC    FAR
  74.    PUSH    AX
  75.    MOV     AX,0002
  76.    INT     33h
  77.    POP     AX
  78.    RETF
  79. MOUSE_CURSOR_OFF    ENDP
  80.  
  81. LIBSEG    ENDS
  82.     end
  83.