The LazyBoy Library Manual - RequireTextMode

Part of the CRT group.

%imacro RequireTextMode 0-1
Prefers: nothing
Prefers: AX

WARNING: No general registers are preserved.

Verify the current video mode is supported.

When no parameter is provided, if the current video mode is not supported, the program will terminate with an error message.

When a parameter is provided, if the current video mode is not supported, the program will attempt to use the TextMode macro to change to the video mode supplied in the parameter. If this is not successful, the program will terminate with an error message.

Examples:

    RequireTextMode             ; just test if the mode is supported

    RequireTextMode 0x03        ; if not in a compatible text mode, try
                                ; to switch to mode 3 before aborting.

See also: TextMode and Terminate