home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGASM.ZIP / PROG024P.ASM < prev    next >
Assembly Source File  |  1988-06-29  |  1KB  |  39 lines

  1.  
  2. ;************************************************************************
  3. ; Get current size of the cursor from the BIOS data area                *
  4. ; Entry: Start - Pointer to where to save the starting value            *
  5. ;        Stop  - Pointer to where to save the ending value              *
  6. ; Exit:  Values at the pointers are set to proper values                *
  7. ;************************************************************************
  8.  
  9. start_seg       EQU     [BP+12]
  10. start_offset    EQU     [BP+10]
  11. stop_seg        EQU     [BP+8]
  12. stop_offset     EQU     [BP+6]
  13.  
  14.         PUBLIC  Get_Cursor_Size
  15.  
  16. Get_Cursor_Size PROC FAR
  17.         PUSH    BP
  18.         MOV     BP,SP
  19.         PUSH    SI
  20.         PUSH    DS
  21.         PUSH    ES                      ;Preserve ES
  22.         XOR     AX,AX                   ;Set ES to segment zero
  23.         MOV     ES,AX
  24.         MOV     BX,ES:[BIOS_Curs_Mode]  ;Fetch cursor size
  25.         MOV     DS,start_seg
  26.         MOV     SI,start_offset         ;Fetch pointer to save
  27.         MOV     AL,BH                   ;Fetch start value
  28.         MOV     [SI],AX                 ;Save starting value
  29.         MOV     DS,stop_seg
  30.         MOV     SI,stop_offset          ;Fetch pointer to save
  31.         MOV     AL,BL                   ;Fetch stop value
  32.         MOV     [SI],AX                 ;Save ending value
  33.         POP     ES
  34.         POP     DS
  35.         POP     SI
  36.         POP     BP
  37.         RET     8
  38. Get_Cursor_Size ENDP
  39.