# PRINT

Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 Picomite CMM2

Syntax:
PRINT expression [[,; ]expression] ...
PRINT #nbr, expression [[,; ]expression] ...
PRINT @(x, y [, m] ) expression
PRINT #GPS, string$

Description:

PRINT expression [[,; ]expression] ...

Outputs text to the console (either the VGA screen or the serial or both is they are available). Multiple expressions can be used and must be separated by either a:

· Comma (,) which will output the tab character

· Semicolon (;) which will not output anything (it is just used to separate expressions).

· Nothing or a space which will act the same as a semicolon.

A semicolon (;) at the end of the expression list will suppress the automatic output of a carriage return/ newline at the end of a print statement.

When printed, a number is preceded with a space if positive or a minus (-) if negative but is not followed by a space.
Integers (whole numbers) are printed without a decimal point while fractions are printed with the decimal point and the significant decimal digits.
Large floating point numbers (greater than six digits) are printed in scientific number format.

The function TAB() can be used to space to a certain column and the string functions can be used to justify or otherwise format strings.

PRINT #nbr, expression [[,; ]expression] ...

Same as the normal PRINT command except that the output is directed to a file previously opened for OUTPUT or APPEND as ‘#fnbr’ or to a serial communications port previously opened as ‘nbr’.

See the OPEN command.

PRINT @(x, [y [, m]] ) expression
Same as the standard PRINT command except that the cursor is positioned at the coordinates x, y.
If y is omitted the cursor will be positioned at “x” on the current line.
Example: PRINT @(150, 45) "Hello World"
The @ function can be used anywhere in a print command.
Example: PRINT @(150, 45) "Hello" @(150, 55) "World"

The @(x,y) function can be used to position the cursor anywhere on or off the screen.
For example, PRINT @(-10, 0) "Hello" will only show "llo" as the first two characters could not be shown because they were off the screen.
The @(x,y) function will automatically suppress the automatic line wrap normally performed when the cursor goes beyond the right screen margin.

If 'm' is specified the mode of the video operation will be as follows:
m = 0 Normal text (white letters, black background)
m = 1 The background will not be drawn (ie, transparent)
m = 2 The video will be inverted (black letters, white background)
m = 5 Current pixels will be inverted (transparent background)

On the CMM2, the 'y' parameter is optional and if omitted, printing will occur on the current line.

PRINT #GPS, string$

Outputs a NMEA string to an opened GPS device. The string must start with a $ character and end with a * character.
The checksum is calculated automatically by the firmware and is appended to the string together with the carriage return and line feed characters.

Last edited: 15 December, 2020