The LazyBoy Library Manual - MouseRead

Part of the Mouse group.

%imacro MouseRead 2-3
Prefers: BX, DX
Prefers: BX, DX, label

It is safe to call any mouse routine even when a mouse is not present.

Returns the position of mouse and button status.

When Carry Flag is clear, it is live current Mouse Data. If the Carry flag is set, the returned data is a mouse event and the event is removed from the buffer.

%1 is button status of event or current button status.

%2 is XY position on display of event or current mouse position. Since the mouse can be outside the current CRT window, the coordinates are not automatically adjusted for any existing window settings.

If %3 is provided, it will be jumped to when the return data is from an event and not live data.

Examples:

    MouseRead bx, dx         ; read event or live mouse position.
    MouseRead bx, dx, ACTION ; if an event, get event and jump to ACTION

See also: MousePreview, MouseEvent and MouseOverflow.