# The first line.

The first line in a listing has many uses beyond actual code.

The picomite family displays the first line when listing flash slots. In this case a filename in the first line is useful.
Many programmers put their name and the date or a description of the code for easy reference.

MMEdit uses the first line to determine the appropriate syntax file to use. To do this the line is scanned looking for " kw\" followed by a syntax file name.
If " 'target" is found in the lien, only the portion of the line after 'target is scanned.

That is a space before kw\ is important and there is no space after the \

Examples

' myfabprogram.bas kw\cmm2 The CMM2 syntax is set for this file.

' target kw\picomite The picomite syntax is selected.

MMCC, the Control Centre also scans the first line and many more directives are available to instruct the Control Centre.

To direct MMCC " 'target " must be present and before any directives. Any commented text can appear before 'target.

The current directives are:

dev\ = device nick-name. It should match one of the nick-names saved in MMCC

syn\ or s\ = syntax This is not to be confused with the syntax keyword lists in MMEdit. It directs MMCC to know things like AUTOSTART commands and existence of a file system.
Current devices recognised are:
maximite - includes original maximite and colour maximite and clones
micromite - includes micromite 1 and 2 and any micromite that doesn't have a file system (default)
micromite+ - includes micromite extreme and any micromite that does have a file system
cmm2 - includes gen 1 and gen 2 CMM2
pi-cromite , pi - MMBasic on RPi. Now obsolete but there is still some in use.
picomite, pico - includes picoVGA, with file system and flash slots
command - special case used for immediate commands and setting OPTIONs etc

ast\ = autosave start command. This replaces the default setting to cater for new devices that are not recognised in their own right yet.
ase\ = autosave end. Some devices end the AUTOSAVE process with ^Z, others use ^C, The CMM2 uses F1 or F2 as an escape sequence.

le\ = line endings (default CRLF) Overrides and changes the ending set in MMCC

port\ = com port and baud rate. eg com4:115200 or ttyACM0:115200
ip\ = TCPIP V4 address or domain name followed by port number. eg tassyjim.ddns.net:3002

file\ = filename to save as or "no" for no filename

crunch\ = no parameter. The crunch in MMEdit is preferred.

settime\ = sets the device time to the PC time.
setRTC\ = for devices with a RTC module fitted, this sets the RTC time to the current PC time. Not required too often.

norun\ = suppress the sending a RUN command after uploading the file

nonew\ = suppress sending a NEW command before uploading the program.

discon\ = disconnect the device after uploading has completed.

Command files: Command files are similar to batch files. The have an extension of mmc instead of bas. mmc = MaxiMite Control

Last edited: 12 September, 2022