home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TUR6_101.ZIP / V22.ASM < prev    next >
Encoding:
Assembly Source File  |  1986-06-07  |  1.8 KB  |  32 lines

  1. ;--------------------------------------------------------------------
  2. ; Author       : Kevin Dahl                                         :
  3. ; Last Revised : June 7, 1986                                       :
  4. ;                                                                   :
  5. ; FILENAME - V22.ENH                                                :
  6. ;                                                                   :
  7. ; WHEREXABS                                                         :
  8. ;        This routine will return the absolute column coordinate    :
  9. ;        of the cursor on the active screen.                        :
  10. ;                                                                   :
  11. ; EXIT                                                              :
  12. ;        AX - The absolute column position of the cursor on the     :
  13. ;             active display screen.                                :
  14. ;--------------------------------------------------------------------
  15. wherexabs     proc      near
  16.               push      bp                       ; save stack
  17.               mov       bp,sp
  18.  
  19.               mov       ah,0fh                   ; get current video mode
  20.               int       10h                      ; use BIOS services
  21.               mov       ah,3                     ; read cursor information
  22.               int       10h                      ; use BIOS services
  23.               mov       al,dl                    ; col of cursor into al
  24.               xor       ah,ah                    ; zero out ah register
  25.               inc       ax                       ; adjust for user
  26.  
  27.               mov       sp,bp                    ; restore stack
  28.               pop       bp                       ; restore base pointer
  29.               ret       2                        ; remove parameters and return
  30. wherexabs     endp
  31.  
  32.