HELP
The same topics the in-computer HELP command reads, imported from mmcore.
Pages
- ASCII CHARACTER CODES
ASCII Character Codes Regular ASCII (codes 0-127) 000 (nul) 016 (dle) 032 sp 048 0 064 @ 080 P 096 \ 112 p 001 (soh) 017 (dc1) 033 !
- CONSOLES
Virtual consoles let one Raspberry Pi host several independent MMBasic sessions.
- CONTENTS
MMBasic Interactive Help Use arrows to move between Index links.
- KEYBOARD CODES
Keyboard Codes KEYDOWN() and INKEY$ use Colour Maximite 2 character codes, not PC/AT scan codes.
- ME
Welcome to mmCore mmCore is the operating system around MMBasic on Raspberry Pi hardware (and QEMU).
- OVERVIEW
mmCore Help Type ME for a short introduction.
- SYNTAX CONVENTIONS
Syntax Conventions Help topics show command forms like this: COMMAND name, [optional], {choice1 | choice2} name - a required argument you supply [optional] - may be omitted {a | b}
- TDF
TheDraw fonts Native TDF commands load the TheDraw (.TDF) fonts seeded in A:/fonts/tdf/ (categories mono/, color/ and deco/) and draw banner text using the normal text console.
- USING HELP
Using Help Type HELP to open this viewer.
Commands
- ABS
Return the absolute (unsigned) magnitude of a number.
- ACOS
Return the arccosine of a number in radians (0..PI).
- ACS
Return the arccosine of a number in radians.
- AFK
Show a Win31 "Mystify"-style screensaver: two polygons of points bounce around the screen, leaving fading trails of connecting lines.
- APPS
List and run packaged \.APP\ applications found on the app path.
- ARC
Draw an elliptical arc centred at (x, y).
- ARRAY
Bulk operations on whole arrays.
- ASC
Return the character code (0-255) of the first character of a string.
- ASIN
Return the arcsine of a number in radians (-PI/2..PI/2).
- ASN
Return the arcsine of a number in radians.
- ATAN
Return the arctangent of a number in radians.
- ATAN2
Return the angle of the vector (x, y) with quadrant.
- ATN
Return the arctangent of a number in radians (-PI/2..PI/2).
- ATN2
Return the angle of the vector (x, y) with quadrant.
- AUDIO_TARGET
Select where PLAY sends PCM.
- BASE$
Format an integer in any base from 2 to 36, zero-padded.
- BIN$
Return the binary digits of an integer, unsigned.
- BIT
Read or write one bit of an integer variable.
- BITMAP
Plot a 1-bit bitmap at a pixel location.
- BLIT
Copy a rectangle of pixels, or save and restore rectangles in named blit buffers.
- BOOT
Choose what the machine does after power-on or REBOOT, set with \OPTION BOOT\.
- BOUND
Return the declared length of an array dimension.
- BOX
Draw a rectangle, optionally filled, or combine a colour with every pixel in a rectangle using AND, OR, or XOR.
- BYTE
Read or write one byte of a string variable.
- CALL
Call a SUB (or FUNCTION) by name.
- CAT
Append one string onto another in place (same as s$ = s$ + t$).
- CHAIN
Load and run another program in place of the current one.
- CHDIR
Change the current directory.
- CHOICE
Select one of two values by a condition.
- CHR$
Return a one-character string for a character code.
- CINT
Round a number to the nearest integer (.5 away from zero).
- CIRCLE
Draw a circle centred at (x, y).
- CLEAR
Clear all variables.
- CLOSE
Close an open file or TCP stream.
- CLS
Clear the graphics screen and home the text cursor so the next prompt is at the top of HDMI.
- CMM2
CMM2 / MMBasic inventory (this Pi console) Manuals used: Colour Maximite 2 User Manual 5.07, Programming with the CMM2, MMBasic Language Manual.
- COLOUR
Set foreground and optional background colour for PRINT / INPUT text and for graphics when a colour argument is omitted.
- COMMON
Declare variables as shared between chained programs.
- CONNECT
Open a telnet-style TCP session to a host.
- COPY
Copy a file or folder to a new path or name.
- COS
Return the cosine of an angle in radians.
- CREDITS
Show MMBasic / PicoMite copyright (Geoff Graham, Peter Mather), Circle runtime credit, ASCII homage to the Colour Maximite, and the Raspberry Pi port line.
- CSRLIN
Return the current console cursor row, 1-based.
- CWD$
Return the current working directory.
- DATE$
Return the current date as a string.
- DATETIME$
Format an epoch value as "dd-mm-yyyy hh:mm:ss" in the local timezone (see TIMEZONE; UTC by default).
- DAY$
Return the weekday name for a date.
- DEC
Subtract amount from a numeric variable (default 1).
- DEG
Convert an angle in radians to degrees.
- DIR
List files in the current directory, or matching an optional path/wildcard.
- DIR$
Iterate over directory entries.
- DRIVE
List available drives, or select the current drive by letter.
- EDIT
Open the colour TUI editor (menu bar, tabs, status).
- EJECT
Safely unmount a USB volume before removing it.
- END
Stop a running program.
- EOF
Test whether a file is positioned at the end.
- EPOCH
Convert a date (and optional time), or the current clock, to Unix epoch seconds.
- ERROR
Stop with an error.
- ETHERNET
Turn wired Ethernet on or off.
- EVAL
Evaluate a string as an expression and return its value.
- EXECUTE
Run the text of a string as if it had been typed as a program line.
- EXP
Return e raised to a power.
- FACTORY RESET
Restore default OPTION settings (DEFAULT MODE 11, PROMPT CWD, THEME Slate, EDIT THEME SYSTEM, AUTOSAVE ON).
- FIELD$
Return one field from a delimited string.
- FILES
Open the dual-pane file manager (not a DIR listing).
- FIX
Truncate a number towards zero, discarding the fraction.
- FONT
Select the font number and optional integer scale used by TEXT.
- FORMAT$
Format a number as a decimal string.
- FRAMEBUFFER
Create and use an off-screen drawing buffer.
- FUNCTIONS
Catalogue of functions for use in expressions.
- HELP
Open interactive help (QuickBASIC-style).
- HEX$
Return the hexadecimal digits of an integer, unsigned.
- IMAGE
Software scale, rotate, and warp of a rectangle on a page.
- INC
Add amount to a numeric variable (default 1).
- INKEY$
Return the next console key as a one-character string, or "" if none.
- INPUT
Read values from the console or from an open file/TCP stream.
- INPUT$
Read up to nbr characters from an open file or TCP handle.
- INSTR
Find a substring.
- INT
Round a number down towards minus infinity (floor).
- IPCONFIG
Show the active network interface.
- JSON_PARSE
Fill a TYPE variable from a JSON string.
- JSON_STRINGIFY$
Turn a TYPE variable into a JSON string.
- JSON$
Query a JSON object stored in a STRING (255).
- JUKE
JUKE is a first-party retro music player with a spectrum/VU visualiser.
- KEYDOWN
Return a held key's code, or count the keys held down.
- KILL
Delete a file.
- LCASE$
Return a string with all letters converted to lower case.
- LEFT$
Return the leftmost n characters of a string.
- LEN
Return the number of characters in a string.
- LINE
Draw a straight line between two pixels.
- LINE INPUT
Read one line from an open file or TCP stream into a string variable.
- LIST
Print the program in memory with line numbers, or list defined TYPE blocks.
- LOAD
Load an image onto the current WRITE page.
- LOC
Return the current position of an open file.
- LOCATE
Move the text cursor to a character cell.
- LOF
Return the length of an open file.
- LOG
Return the natural logarithm (base e) of a number.
- LSET
Assign a string into a fixed-width field.
- LTRIM$
Strip characters from the left of a string.
- MATH
Math helpers and array operators.
- MAX
Return the largest of its arguments.
- MEMORY
Show how many program lines, variables, and open files the interpreter is using.
- MID$
As a statement, overwrite characters in a string.
- MIN
Return the smallest of its arguments.
- MKDIR
Create a directory.
- MM.BATTERY%
Return the battery charge as a percentage (0-100).
- MM.BRIGHTNESS%
Read or set the display backlight brightness as a percentage (0-100).
- MM.CMDLINE$
Return the name of the program currently being run.
- MM.DEVICE$
Return the device name this build reports.
- MM.ERRMSG$
Return the text of the last trapped runtime error as a string, or an empty string when there has not been one.
- MM.ERRNO
Return the error code of the last trapped runtime error, or zero when there has not been one.
- MM.HOST.HRES
Return the width of the host display that the current graphics mode is shown on, in pixels.
- MM.HOST.VRES
Return the height of the host display that the current graphics mode is shown on, in pixels.
- MM.HPOS
Return the current text cursor column in pixels.
- MM.HRES
Return the width of the current graphics mode in pixels.
- MM.INFO
Return information about the current graphics mode.
- MM.INFO$
Return information about the system as a string.
- MM.RUNTIME$
Return the name of the runtime the program is running on, so a program can behave differently where needed.
- MM.VER
Return the MMBasic compatibility version string.
- MM.VPOS
Return the current text cursor row in pixels.
- MM.VRES
Return the height of the current graphics mode in pixels.
- MODE
Set the graphics page size, colour depth, and HDMI framebuffer.
- MOUSE
Enable the software mouse cursor, choose its icon, and install pointer event handlers.
- NEW
Erase the program in memory and clear variables and constants.
- NTP
Synchronise the clock from a Network Time Protocol server.
- OCT$
Return the octal digits of an integer, unsigned.
- ON
Jump to the n-th line number (1-based), or call a SUB when a key or pointer event is waiting.
- OPEN
Open a disk file, or a TCP client stream.
- OPTION
Change interpreter settings.
- PACKAGE
Zip the contents of a folder into a package file (ZIP store).
- PAGE
Select off-screen pages for drawing and display, copy or scroll pages, and combine pages with AND/OR/XOR.
- PAINT
Paint is a full-screen, mouse-driven pixel paint application in the spirit of Dr.
- PATH
Directories searched for \.APP\ packages, set with \OPTION PATH\.
- PAUSE
Wait for the given number of milliseconds.
- PI
Return the constant pi (3.141592653589793).
- PIXEL
Set a pixel, or set many pixels from arrays.
- PLAY
Decode and play audio to OPTION AUDIO\TARGET.
- PLAYING
Return 1 while a sound is playing, otherwise 0.
- POLYGON
Draw a closed polygon (at least 3 vertices).
- POS
Return the current console cursor column, 1-based.
- PRINT
Write values to the console, or to an open file or TCP stream.
- PROMPT
Choose the immediate-mode prompt.
- QUIT
End the host application and return to the operating system.
- RAD
Convert an angle in degrees to radians.
- RANDOMIZE
Seed the RND generator.
- RBOX
Draw a rounded rectangle.
- REBOOT
Restart the Raspberry Pi.
- REDIM
Re-dimension an array, or create it if it does not exist.
- RENAME
Rename a file or folder, or move it to another folder.
- RESUME
Continue after a runtime error trapped by ON ERROR GOTO.
- RGB
Build a colour value from red, green and blue, or a colour name.
- RIGHT$
Return the rightmost n characters of a string.
- RMDIR
Remove an empty directory.
- RND
Return a pseudo-random number in the range 0 <= x < 1.
- RTRIM$
Strip characters from the right of a string.
- RUN
Run the program in memory, or load a file first then run it.
- SAVE
Save the program in memory to disk.
- SCREENSHOT
Capture the current screen to a PNG image on a writable drive.
- SEEK
Set the read/write position of an open disk file.
- SETTICK
Call a SUB every period milliseconds.
- SETTINGS
Open the system-wide settings hub as a modal dialog.
- SGN
Return the sign of a number: -1, 0 or 1.
- SHUTDOWN
Power off the machine.
- SIN
Return the sine of an angle in radians.
- SORT
Sort a one-dimensional array in place (numeric or string).
- SPACE$
Return a string of n spaces.
- SPRITE
Sprites drawn into the current write page.
- SQR
Return the square root of a non-negative number.
- SQRT
Return the square root of a non-negative number.
- STOP
Halt the running program.
- STR$
Convert a number to the string a PRINT of it would show.
- STRING$
Return a string by repeating a character or a string.
- STRUCT
Operate on TYPE variables and arrays.
- SWAP
Exchange the values of two variables.
- TAB
Return a string of n spaces (the column-tab used by PRINT).
- TAN
Return the tangent of an angle in radians.
- TERM
Fullscreen telnet-style terminal.
- TEXT
Draw a string at a pixel location using the default 8x16 IBM VGA CP437 face (the same glyphs as TERM and PRINT).
- THEME
Return the active system theme colour as an RGB integer (0xRRGGBB), the same value form as RGB().
- TIME$
Return the current time as a string.
- TIMER
Return milliseconds since the program or console started.
- TIMEZONE
Select the local timezone offset applied to DATE$, TIME$ and DATETIME$.
- TRIANGLE
Draw a triangle, optionally filled.
- TRIM$
Strip characters from the left, right or both ends of a string.
- TURTLE
Software turtle graphics.
- UCASE$
Return a string with all letters converted to upper case.
- UNPACK
Extract every file from a ZIP archive into the current folder.
- VAL
Parse the leading number in a string.
- VSYNC_WAIT
Wait until the next display refresh (about 16 ms at 60 Hz).
- WORDPAD
Typora-style markdown editor with a centred text column.
- XFER
Receive nbytes of raw serial data and write them to a file.
Language
- CONST
Define a named constant.
- CONTINUE
Skip to the NEXT or LOOP of the current loop, then test the loop condition.
- DATA
Store literal values in the program for READ.
- DIM
Declare a variable or array.
- DO
Repeat a block of statements.
- EXIT
Leave the current DO, FOR, SUB, or FUNCTION immediately.
- FOR
Count a variable from start to end.
- FUNCTION
Define a user function that returns a value.
- GOSUB
Call a numbered subroutine.
- GOTO
Jump to a numbered program line or a label.
- IF
Run statements when a condition is true.
- LET
Assign an expression to a variable.
- LOCAL
Declare a variable inside a SUB or FUNCTION.
- REM
A remark.
- SELECT
Choose a branch matching an expression.
- STATIC
Like LOCAL but the value is kept between calls.
- SUB
Define a subroutine.
- TYPE
Define a user type.
- WHILE
Repeat while condition is non-zero.