qa.hlp (Table of Contents; Topic list)
GetCurPos
   Example  Back  Contents  Index
──────────────────────────────────────────────────────────────────────────────
 
;* GetCurPos - Gets current cursor position.
;*
;* Shows:   BIOS Interrupt - 10h, Function 3 (Get Cursor Position)
;*
;* Uses:    vconfig - Video configuration structure, declared in the
;*          DEMO.INC include file. The structure must first be
;*          initialized by calling the GetVidConfig procedure.
;*
;* Params:  None
;*
;* Return:  Short integer with high byte = row, low byte = column
 
GetCurPos PROC
 
        mov     ah, 3                   ; Function 3
        mov     bh, vconfig.dpage
        int     10h                     ; Get Cursor Position
        mov     ax, dx                  ; Return cursor row/column
        ret
 
GetCurPos ENDP
                                    -♦-