AH = 02h: Set Cursor Position
This function sets the cursor position to the specified character cell row and column address on the specified page. This function applies to both text and graphics modes. In graphics mode, the cursor is invisible, but is used to define a position on the screen. Sixteen bytes (2 bytes per page) are maintained in BIOS RAM starting at CURCOOR. The first of each pair of bytes is the cursor column number. This routine updates this RAM with the new cursor position.
- Input: AH = 02h
BH = Display page #
DH = Row address of cursor
DL = Column address of cursor
- Output: None
- Error conditions: None
- Registers modified: AX
CRTMODE Max c Max r Max p
-------------------------------
0,1 39 24 8
2,3 79 24 4
4,5 39 24 0
6,7 79 24 0
20h 39 15 0
Notes:
- Text coordinates (x,y)=(0,0) correspond to the upper left corner of the display.
- Separate cursors are maintained for each page in text video modes. These cursors can be set independently.
- If the page # is invalid in a CGA text video mode (0-3), this service simply exits. If the video mode, CRTMODE, is 4,5,6,7,or 20h, the page # parameter is ignored and p = 0 is used.
- If the page # parameter is the currently active display page, the CTRC hardware Registers (0Eh, 0Fh) are updated to reflect the new cursor location.
- The cursor coordinates (r,c) are not checked for validity. Applications sometimes use "off screen" cursor coordinates as a means of making the cursor disappear. However, as explained o the previous page, such practice will not have as reliable results as turning off the cursor directly.
- The HP palmtop BIOS supports a set of graphics cursor services. See Int 10h, Fcn DCxxh on
page 3-82 for more information.
- If the window scrolling feature is enabled, off screen writes of the cursor in the text zoom modes will invoke a window scroll to maintain view of cursor (cursor tracking). The cursor will not be tracked off of the currently active display page.