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

  1. ;--------------------------------------------------------------------
  2. ; Author       : Kevin Dahl                                         :
  3. ; Last Revised : June 7, 1986                                       :
  4. ;                                                                   :
  5. ; FILENAME - V12.ENH                                                :
  6. ;                                                                   :
  7. ; GOTOXYABS                                                         :
  8. ;        Position the cursor at the absolute x,y coordinates on the :
  9. ;        screen.                                                    :
  10. ;                                                                   :
  11. ; ENTRY                                                             :
  12. ;        [bp+4] = an integer in the range 1 to 25 giving the row    :
  13. ;                 coordinate to place the cursor on the screen.     :
  14. ;        [bp+6] = an integer in the range 1 to 40 or 1 to 80,       :
  15. ;                 depending on the screen width.  This is the       :
  16. ;                 absolute column coordinate to place the cursor in :
  17. ;                 on the screen.                                    :
  18. ;                                                                   :
  19. ; EXIT                                                              :
  20. ;        The cursor position is modified.                           :
  21. ;--------------------------------------------------------------------
  22. gotoxyabs     proc      near
  23.               push      bp                       ; save stack
  24.               mov       bp,sp
  25.               mov       ah,0fh                   ; get current video mode
  26.               int       10h                      ; use BIOS services
  27.               mov       ah,02h                   ; set cursor position function
  28.               mov       dh,[bp+4]                ; new row of cursor
  29.               mov       dl,[bp+6]                ; new column of cursor
  30.               dec       dh                       ; set for absolute row
  31.               dec       dl                       ; set for absolute col
  32.               int       10h                      ; use BIOS services
  33.               mov       sp,bp                    ; restore stack
  34.               pop       bp
  35.               ret       4                        ; remove params from stack
  36. gotoxyabs     endp
  37.