Download MMBasic Language Manual
Transcript
MMBasic is a Microsoft BASIC compatible implementation of the BASIC language with floating point and string variables, long variable names, arrays of floats or strings with multiple dimensions and powerful string handling. MMBasic was originally written for the Maximite, a small computer based on the PIC32 microcontroller from Microchip. It now runs on a variety of hardware platforms including DOS. This manual describes the MMBasic language. For details of running MMBasic on specific platforms please refer to the following documentation or websites: Maximite, mini-Maximite: Maximite Hardware Manual from: http://geoffg.net/maximite.html UBW32 experimenter board: Colour Maximite on the UBW32 from: http://geoffg.net/ubw32.html DOS: DOS MMBasic ReadMe from: http://mmbasic.com/downloads.html DuinoMite series: DuinoMite MMBasic ReadMe included with the DuinoMite update. CGMMSTICK1 and CGCOLORMAX2 boards from CircuitGizmos go to http://www.circuitgizmos.com DTX2-4105C module from Dimitech go to http://dimitech.com TFT Maximite go to http://github.com/heise/MAXIMITE Throughout this manual Maximite or MM refers to the original monochrome Maximite family (Maximite, mini Maximite, CGMMSTICK1, DuinoMite and the DTX2-4105C). Colour Maximite or CMM refers to the Colour Maximite which also includes the UBW32, TFT Maximite and the CGCOLORMAX2. DOS refers to the version that runs in a DOS box under Windows. Contents Functional Summary............................................................................................................... 3 Full Screen Editor ................................................................................................................... 5 Input/Output............................................................................................................................ 7 Audio and PWM Output.......................................................................................................... 8 Special Hardware Devices ..................................................................................................... 9 Graphics and Working with Colour ....................................................................................... 15 Game Playing Features........................................................................................................ 17 Defined Subroutines and Functions...................................................................................... 18 Implementation Details ......................................................................................................... 21 Predefined Read Only Variables .......................................................................................... 23 Commands ........................................................................................................................... 24 Functions.............................................................................................................................. 46 Obsolete Commands and Functions .................................................................................... 54 Appendix A Serial Communications ..................................................................................... 55 Appendix B I2C Communications.......................................................................................... 57 Appendix C 1-Wire Communications.................................................................................... 63 Appendix D SPI Communications......................................................................................... 64 Appendix E Loadable Fonts ................................................................................................. 66 Appendix F Special Keyboard Keys ..................................................................................... 67 Appendix G Tera Term Setup............................................................................................... 68 Appendix H Sprites............................................................................................................... 69 Appendix I Random File I/O ................................................................................................. 71 MMBasic Language Manual Page 2