The following functions ("escapes") are all accessed through VDI function 5. The function number is given in the special member of the CONTRL array.
Get text screen size in characters. The first two words of INTOUT will hold the height and the width respectively, and this will therefore return #intout=2. If the device doesn't have a text screen (such as a printer) then this will return (-1, -1).
Exit text mode (and enter graphics mode).
Enter text mode.
Functions 4-19 (which deal with control of the text screen) aren't implemented in Intel GEM drivers. But they are:
Text cursor up.
Text cursor down.
Text cursor right.
Text cursor left.
Clear text screen, home cursor.
Clear from text cursor to end of screen.
Clear from text cursor to end of line.
Move text cursor to coordinates given in INTIN. Therefore this should be entered with #intin=2.
Print (to the text screen) a string whose characters are stored in INTIN (one character to each word). #intin = length of string.
Select reverse video.
Cancel reverse video.
Return the coordinates of the text cursor in the first two words of INTOUT.
Is a tablet (or mouse etc.) available? Returns the first word of INTOUT as 0 if no, 1 if yes.
Dump the current screen to the printer.
Place a graphic cursor (a mouse pointer or similar). Its coordinates are given in PTSIN, so enter with #ptsin=1.
Remove the graphic cursor.
Form advance - throw a page on a printer device.
As v_updwk() - Print the page, but clipped within the rectangle given by the two points xy[]. Used on printers and other devices where drawing isn't immediate.
For a printer - discard any output for this page that has not been printed (ie, any output received since the last v_updwk() or v_output_window() ).
Draw an image from a disc file onto the current device. Passed #ptsin=2, #intin=5 + length of filename. INTIN holds:
Return printer "scan heights". Returns 5 values in INTOUT:
DEFW g_height ;Height of a graphics slice DEFW g_slice ;No. of graphics slices per page DEFW a_height ;Height of a text slice DEFW a_slice ;No. of text slices per page DEFW factor ;?
Output printer alphanumeric text. Entered with #intin = no. of characters; string in INTIN, one character per word.
(GEM/3 and later) Set page orientation. Passed #intin = 1;
INTIN[0] is 0 for portrait, 1 for landscape.
(GEM/3 and later) Set number of copies to print. Passed #intin = 1;
INTIN[0] is number of copies.
(GEM/3 and later) Set paper tray to use. Passed #intin = 1;
INTIN[0] is the tray number.
Select a predefined palette. Passed #intin = 1, INTIN[0] holds the palette number. Returns the previous palette number in INTOUT[0].
Play a sound on the beeper. Passed #intin = 2; INTIN holds the frequency and duration in that order.
Enable / disable sound. Entered with #intin = 1, INTIN[0] holds -1, 0 or 1. If INTIN[0] is:
? Passed two words in INTIN (xres and yres); returns xset and yset in INTOUT.
? Passed two words in INTIN (xres and yres); returns xset and yset in INTOUT.
? Passed two words in INTIN (x and y).
? Get two dimensions in INTOUT (x and y).
? Set two words in INTIN (dx and dy).
? Set the film parameters for a camera. The two words go to INTIN[0] and INTIN[1] respectively, so this is called with #intin = 2.
? Get the name of film number "index". Passed one word in INTIN; returns #intout is the length of the name, which is stored in INTOUT (one character per word). If #intout is 0, then the C binding returns FALSE; else TRUE.
? Passed one word in INTIN, but for some reason the standard binding sets #intin to 2. This may be a bug.
Set the size of the drawing area when writing a metafile. The parameters are passed as the first two points in PTSIN (min then max), so the call is made with #ptsin equal to 2.
Escape 99 is used to perform functions that only have effect in a metafile. INTIN[0] holds the "sub-opcode" number. Sub-opcode numbers 0-100 are reserved for the GEM system; other sub-opcodes can be used by users.
Write out a "user-defined" metafile record. The INTIN and PTSIN arrays can be any size (though the INTIN array must contain at least one element - the sub-opcode).
The subfunctions 99/0 and 99/1 do not actually add records to the metafile; rather, they set values in the metafile header.
Set the size of the page used by the metafile being written, in tenths of millimetres:
Set the lower left and upper right corners of the coordinate system used by the metafile being written.
Set Bezier curve quality.
? Set the metafile filename. The filename is passed in INTIN, one character per word, with #intin being its length.
(GEM/3 and later) Draw an image from a disc file onto the current device -
with rotation and colouring. Passed
#ptsin=2, #intin=8 + length of filename. INTIN holds: