INT 33h AX=0004h moves the pointer to a position the program chooses: to the default button of a dialog, back to the centre after a mode change, or under a menu item. The coordinates are in the same virtual-screen pixels INT 33h AX=0003h reports. If the pointer is visible, the driver redraws it at the new place.

The driver does not take the numbers blindly. A position outside the range (set by INT 33h AX=0007h and 0008h, the whole screen by default) is moved to the nearest edge, and in text mode the reported position is rounded down to the cell. The example sets two positions and reads each back:

prints: 96 48 632 192
XOR AX, AX ; reset: the range is the whole 640x200
INT 33h
MOV AX, 0004h ; move to 100, 50
MOV CX, 100
MOV DX, 50
INT 33h
CALL SHOWP1 ; 96 48: the cell at column 12, row 6
MOV AX, 0004h ; far off the screen
MOV CX, 5000
MOV DX, 5000
INT 33h
CALL SHOWP1 ; 632 192: held at the last cell
SHOWP1 PROC NEAR ; print the mouse position: x y
MOV AX, 0003h
INT 33h ; CX = x, DX = y
MOV BX, DX ; keep y: printing uses DL
MOV AX, CX
CALL PDEC
MOV DL, " "
MOV AH, 02h
INT 21h
MOV AX, BX
CALL PDEC
MOV DL, " "
MOV AH, 02h
INT 21h
RET
SHOWP1 ENDP
PDEC PROC NEAR ; print AX in decimal; keeps every register
PUSH AX
PUSH BX
PUSH CX
PUSH DX
MOV BX, 10
XOR CX, CX ; digits on the stack
DECD1:
XOR DX, DX
DIV BX ; AX = AX / 10, DX = the last digit
PUSH DX
INC CX
TEST AX, AX
JNZ DECD1
DECD2:
POP DX ; the digits come back first to last
ADD DL, "0"
MOV AH, 02h
INT 21h
LOOP DECD2
POP DX
POP CX
POP BX
POP AX
RET
PDEC ENDP

Pitfalls

Moving the pointer does not generate a movement event for the handler installed with INT 33h AX=000Ch, and does not change the mickey counters: it is a jump, not a motion. Coordinates are signed words, so a negative value clips to the left or top edge. Set the range first and the position after, or the position may be clipped by the old range. In DOSBox-X with the host pointer integrated, moving the real mouse over the window right after this call moves the DOS pointer straight back.