# Predefined Read Only Variables

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

Syntax:
string$ = MM.CMDLINE$
var = MM.INFO(option)

Description:

These variables are set by MMBasic and cannot be changed by the running program.

MM.CMDLINE$ | A string representing the arguments on the command line when the program was run.
MM.DEVICE$ | A string representing the device or platform that MMBasic is running on. Currently this variable will contain one of the following: "Maximite" on the standard Maximite and compatibles. "Colour Maximite" on the Colour Maximite and UBW32. "Colour Maximite 2" on the Colour Maximite 2. "DuinoMite" when running on one of the DuinoMite family. "DOS" when running on Windows in a DOS box. "Generic PIC32" for the generic version of MMBasic on a PIC32. "Micromite" on the PIC32MX150/250 "Micromite MkII" on the PIC32MX170/270 "Micromite Plus" on the PIC32MX470 "Micromite Extreme" on the PIC32MZ series
MM.ERRNO MM.ERRMSG$ | If a statement caused an error which was ignored these variables will be set accordingly. MM.ERRNO is a number where non zero means that there was an error and MM.ERRMSG$ is a string representing the error message that would have normally been displayed on the console. They are reset to zero and an empty string by RUN, ON ERROR IGNORE or ON ERROR SKIP.
MM.HRES MM.VRES | Integers representing the horizontal and vertical resolution of the VGA display in pixels.
MM.I2C | Following an I2C write or read command this integer variable will be set to indicate the result of the operation as follows: 0 = The command completed without error. 1 = Received a NACK response 2 = Command timed out
MM.INFO() MM.INFO$() | These two versions can be used interchangeably but good programming practice would require that you use the one corresponding to the returned datatype.
MM.INFO$(AUTORUN) | Returns “ON” or “OFF” depending on the status of OPTION AUTORUN
MM.INFO$(CPUSPEED) | Returns the CPU speed as a string
MM.INFO$(CURRENT) | Returns the name of the current program or NONE if called after a NEW command
MM.INFO$(DIRECTORY) | An alternative to the function cwd$. The pathname in MM.INFO$(DIRECTORY) will always end with the '/' character.
MM.INFO(DISK SIZE) | Returns the capacity of the SD card in bytes
MM.INFO(FILESIZE file$) | Returns the size of ‘file$’ in bytes Returns -1 if non existent or -2 if a directory
MM.INFO(FONTHEIGHT) MM.INFO(FONTWIDTH) | Integers representing the height and width of the current font (in pixels).
MM.INFO(FRAMEBUFFER) | Returns the physical memory location of the framebuffer. This is useful if you need to POKE/PEEK the contents of the page.
MM.INFO(FRAMEH) | Returns the horizontal size of the frame buffer in pixels.
MM.INFO(FRAMEV) | Returns the vertical size of the framebuffer in pixels
MM.INFO(FREE SPACE) | Returns the number of free bytes on the SD card
MM.INFO(HPOS) MM.INFO(VPOS) | The current horizontal and vertical position (in pixels) following the last graphics or print command.
MM.INFO$(KEYBOARD) | Returns the string CONNECTED if a USB keyboard is connected and working. Otherwise returns “NOT CONNECTED”
MM.INFO(MAX PAGES) | Returns the number of frame buffers (pages) are available in the current graphics mode.
MM.INFO(MODE) | Returns the video mode as a floating point number e.g. 1.8, 2.16, etc.
MM.INFO(MODIFIED file$) | Returns the date/time that ‘file$’ was last modified File$ can be a normal file or the name of a directory. Returns an empty string if the file or directory is not found.
MM.INFO(OPTION option) | Returns the current value of a range of options that affect how a program will run. “option” can be one of ANGLE, AUTORUN, BASE, BREAK, DEFAULT, EXPLICIT, LEGACY, Y_AXIS, USBKEYBOARD, PROFILING
MM.INFO(OPTION MOUSE) | Reports 0 to 3 or reports -1 is no mouse is specified
MM.INFO(PAGE ADDRESS n) | Returns the physical memory location of page ‘n’. This is useful if you need to POKE/PEEK the contents of the page.
MM.INFO(PATH) | Returns the path of the current program or NONE if called after a NEW command
MM.INFO$(PIN pinno) | Returns the status of I/O pin 'pinno'. Valid returns are: INVALID, RESERVED, IN USE, and UNUSED
MM.INF(PROGRAM) | Returns the address in memory of the start of the program
MM.INFO(RESET) | Returns the cause of the last restart of the firmware and then clears it Possible values are Switch, Power-On, Software, and Watchdog (NB the latter is the H/W watchdog and unrelated to the MMbasic version)
MM.INFO$(SDCARD) | Returns the status of the SD card. Valid returns are: DISABLED, NOT PRESENT, READY, and UNUSED
MM.INFO$(SEARCH PATH) | Returns the string set as the search path by OPTION SEARCH PATH
MM.INFO$(SOUND) | Returns the status of the sound output device. Valid returns are: OFF, PAUSED, TONE, WAV, MP3, MODFILE, TTS, FLAC, DAC, SOUND
MM.INFO$(TRACK) | The name of the current audio track playing. This returns "OFF" if nothing is playing.
MM.INFO(VERSION) | The version number of the firmware as a floating point number in the form aa.bbcc where aa is the major version number, bb is the minor version number and cc is the revision number. For example version 5.03.00 will return 5.03 and version 5.03.01 will return 5.0301.
MM.INFO(WRITE PAGE) | Returns the address in memory of the page to which writes will take place
MM.ONEWIRE | Following a 1-Wire reset function this integer variable will be set to indicate the result of the operation as follows: 0 = Device not found. 1 = Device found
MM.VER | All except CMM2. The version number of the firmware as a floating point number in the form aa.bbcc where aa is the major version number, bb is the minor version number and cc is the revision number. For example version 5.03.00 will return 5.03 and version 5.03.01 will return 5.0301.
MM.WATCHDOG | An integer which is true if MMBasic was restarted as the result of a Watchdog timeout (see the WATCHDOG command). False if MMBasic started up normally.

Last edited: 29 January, 2021