The LazyBoy Library Manual - GotoXY

Part of the CRT group.

%imacro GotoXY 1-2
Prefers: DX
Prefers: DL, DH
Prefers: position

Move the cursor to w new position within the current window. The coordinates are 0 based.

Basic positions:

FIRSTmove cursor to first column and first row
LASTmove cursor to last column of last row
HOMEmove cursor to first column on current line
ENDmove cursor to last column on current line
TOPmove cursor to same column on first row
BOTTOMmove cursor to same column on last row

Relative positions which set the Carry Flag when unable to perform the request:

LEFTmove cursor left one column
RIGHTmove cursor right one column
UPmove cursor up one row
DOWNmove cursor down on row

Logical positions that will set the Carry Flag if the screen scrolls:

NEXTmove cursor to next write position. If at the end of a line, the cursor will be moved to the first position on the next line. The screen will scroll if this occurs on the last line of the window.
PREVmove cursor back one write position. If at the first position of a line, the cursor will be moved to the first position on the previous line. The screen will scroll if this occurs on the first line of the window.

Examples:

    GotoXY   dx     ; Move cursor to column DL, row DH
    GotoXY   cl, ch ; Move cursor to column CL, row CH
    GotoXY   [si]   ; Move cursor to position stored at [DS:SI]
    GotoXY   last   ; goto last column in last row in window

See also: GetWhereXY, GetLimitXY and Window.