M0C

Section: User Commands (1)
Index Return to Main Contents
 

NAME

m0c - a messenger language interpreter and execution environment with built-in console.  

SYNOPSIS

m0c [ -h ] [ -I <includedirectory> ] [ -t<int> ] [ -v ] [ file ]  

DESCRIPTION

M0c is an execution platform for concurrent M0 processes similar to the m0 interpreter. However, it has a built-in console where M0 commands can be typed in interactively.

Beside the command line interface, m0c listens on UDP port 0x4d30 and filters ethernet frames with protocol type 0x4d30 for the reception of messengers (whether both interfaces are supported or not depends on the UNIX platform on which the M0 interpreter was compiled).

Lines entered by the user are inserted into a messenger which delivers its content to a previously installed console messenger process. This server process executes the given M0 commands. As a side-effect of this execution it is possible that some results are returned to the user, thus are printed on stdout.

Options:

-h
Print a brief usage indication to stdout.
-I
Tell m0strip where the include files of a file to download can be found.
-t<int>
Set the tracing level (for debugging reasons). This only works if the M0 interpreter was compiled with the -DDEBUG flag. Default is 0. A value of 1 forces a dump of all aborted messenger processes to files of the form abrt_*. If an error occurs in the initialisation (startup) phase of M0, a file stup_* is created. Still with the option -t1 or higher, a file exit_* is created when the interpreter is interrupted (^C). Higher levels of tracing print subsequently more information, level 5 currently being the highest level.
-v
Print the version to stdout.
file
Read the given file and send it to the console server process after it has installed itself. This allows a user to download M0 code into a platform in order to interactively test it via the console.

Parts of the initialisation code needed by m0c is found in the startup.m0 and longdict.m0 files. These ASCII files are first treated with the m0strip program before being read in by the M0 interpreter. As a next step, the file cons_ini.m0 is read and turned into a messenger process: it becomes the console server process which executes the typed-in commands.

A file to be downloaded is also treated by the m0strip program. If the file contains ``include'' statements, the -I option can be used to tell m0strip in which directory these files to be included can be found.

The console messenger offers five additional commands which are not part of a standard M0 execution environment:

print
Send to the console a string to display.
input
Wait for a line from the console and return the string (or null if empty).
ptop
Print (non-destructively) the top-most operand.
stack
Print (non-destructively) the content of the operand stack.
quit
Terminate the console program.
 

FILES

startup.m0
Startup code (in M0) for the M0 execution platform.
longdict.m0
Standard definitions of long command words, included by startup.m0.
cons_ini.m0
M0 code for the console server process.
abrt_*
Dump (ASCII) of aborted messengers (only of tracing level >0).
exit_*
Dump (ASCII) of all messenger processes and global memory of the M0 platform (only when tracing level >0 and INT signal (^C) received).
stup_*
Dump (ASCII) of an aborted initialisation messenger process that executes the code found in startup.m0.
M0.ps
PostScript document describing the messenger approach and containing a complete M0 language manual with examples.
 

ENVIRONMENT

M0BIN
Overrides the default path where auxiliary programs (m0strip) can be found.
M0LIB
Overrides the default path where the startup files (startup.m0 and longdict.m0) and the console code (cons_ini.m0) can be found.
 

SEE ALSO

m0strip(1), m0(1), m0uc(1)  

BUGS

The interfaces where m0c should listen for incoming messengers cannot be specified: currently all available interfaces (IP and ethernet) are tried and served. The UDP port cannot be set too, leading thus to collisions on the port number with other M0 platforms or console programs.

The interception of messengers which are encapsulated in ethernet frames requires this program to be installed with root as owner and with the SETUID bit set (due to the access protections of the ethernet devices). Insufficient privileges to open the ethernet device simply deactivates in m0c the ethernet interface.

Only one file can be donwloaded.  

AUTHOR

Christian F. Tschudin, <tschudin@cui.unige.ch>, May 1994


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
ENVIRONMENT
SEE ALSO
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 10:55:44 GMT, December 12, 2024