Migrating from ML3

Magnolia is not 100% compatible with ML3, and just cannot be. If you’re migrating your program from ML3, please take note of the following differences and limitations.

Source Code

  • Commands are now reserved words, and can not be used as the Name of an identifier.
  • Source code is assumed to be in utf-8 encoding. A different encoding can be set by specifying the -E switch to the compiler.


  • ML3 does incremental rounding for ML3-Text files and internal record storage. Magnolia will do a single round of rounding.


  • Magnolia uses a PostgreSQL database backend for all database access. All databases are stored in a single PostgreSQL schema. Paths in database filenames have no meaning. Drive letters in database names cause “per client” data emulation. (FIXME: document databases.)


  • Magnolia uses utf-8 encoding, where ML3 uses the current DOS codepage (usually CP437). This applies to screen output, the SQL database, and text files. Print job encoding can be configured per printer, see printer.<name>.encoding.
  • Printing works using the OS native printing mechanism. On Windows, all printers must be set up in Windows, and the printer driver must support RAW mode.
  • Printer attributes 20 (backspace) and 26 (stop printer) are unsupported.
  • Key mappings: Break and PrintScreen are unsupported on all currently supported platforms, as they are intercepted by the operating system. Escape is mapped to the Break keycode, and Shift-Escape is mapped to the Escape keycode.


  • Zusammengezogen: Unsupported. Compiler will refuse it.
  • Entschluesseln: Unsupported. Compiler will refuse it.


  • Unterdruecken: Does not affect on-screen output, only Printing.

Special files

  • MLSYSTEM.204: Unsupported, ignored.
  • MLSYSTEM.205: Unsupported. Compiler will refuse it.
  • MLSYSTEM.206: Does a platform specific beep, with platform specific limitations. Does not support the detailed frequency, time configuration.
  • MLSYSTEM.210: Functions 5, 6 are supported for values 2-5. Function 7 is supported, but will disable all serial ports and restore system keyboard input. All other functions or values are unsupported and will log a warning. Reads will always set gefunden to False.
  • MLSYSTEM.305: Unsupported. Compiler will refuse it.
  • MLSYSTEM.405: Unsupported. Compiler will refuse it.
  • MLSYSTEM.406: Unsupported. Compiler will refuse it.
  • MLSYSTEM.407: Unsupported, ignored.
  • MLSYSTEM.409 Read: works like a Write. There is no main menu.
  • MLSYSTEM.500-599: Unsupported. Compiler will refuse to compile models which use these.
  • MLSYSTEM.601: Uses platform specific way for executing commands, which will differ from what DOS would do. There is no reporting for “unknown commands”.

Importing ML3 printer configuration

The tool ins2yaml can be used to convert ML3 INS configuration files into Magnolia’s app.cfg syntax. You will have to edit the output, assign your print spooler’s queue names before appending it to app.cfg.

The tool’s usage is:

MagProjectBuild -t ins2yaml -E CP437 pc1.ins

Note that using -E CP437 you can specify the source file encoding, which, in case of ML3, is in the DOS code page (usually CP437).

Converting text files from CP437

As Magnolia expects any text files to be in UTF-8 encoding, you should convert all text files to this encoding before reading them. Magnolia ships with a tool named recode to do this.

The tool’s usage is:

MagProjectBuild -t recode filename1 [filename2] [filename3] [...]

recode will convert all supplied files, unconditionally assuming that the input files are in CP437 encoding, to UTF-8. Each input file will be renamed to filename.old before the newly converted file is written.

Example with CMD.EXE:

cd c:\project
for /R . %N IN ("*.UMO","*.DEF","*.MOD") DO MagProjectBuild -t recode %N