Dunfield Virtual Machine (for Linux).
-------------------------------------

This is a *PRELIMINARY* edition of DVM for Linux.

DVM was created to run most of my software "most anywhere". In addition, I have
released my "Micro-C" compiler for DVM. This means you can easly create simple
(to fairly complex) programs in C that run anywhere that has DVM.

Micro-C was written back in the 70's and offers a much simpler C development
method (as was common in that era) than most "modern" development environments.

DVM is free for Windows (and now Linux). Probable my next port will be Android.
It is also product you can purchase if you want to implement it on a different
platform.

This document details only DVM characteristics unique or different in the Linux
version. For more complete DVM information, please refer to the documents in my
main DVM (Wndows) ducuments. More Linux DVM information: DVM -?A

DVM was designed to make it easy to port years worth of software witten from
the 70's (till now) simply by recompiling it. Much of this software was first
written under DOS. Due to it's built in DOS emulation these programs usually
run undr Win32. Win64 dropped DOS emulation which led to DVM.

-------------------------------------
The biggest difference in Linux is the host file system:

- DOS/Windows has 26 "drives" this allows you to maintain 26 separate "current
  directories" and easly switch between these locations.
  This capability is used and supported by many of my tools and applications.

  Unix has a single "root", additional drives are "mount"ed as subdirectories
  within the one directory tree.

  DVM can make up to 26 "drives" under Unix by allowing any subdir under the
  root to appear as a separate DVM/Windows/DOS drive.       See -D..

- DOS file system is case insensitive and file names are always converted to
  Upper case. 'ab' becomes 'AB'!

  Windows file systen is case insensitive but file names are stored as they
  are specified. Subsequent access to a file can be specified in any mix of
  upper and/or lower case letters. 'ab' is the same as 'AB'!

  Unix file system is case sensitive.
  'ab', 'Ab', 'aB' and 'AB' are all different files!

  DVM (by default) will try to access a file by name "as specified", If this
  doesn't work, it will attempt "Recovery" by trying the name all lower-case,
  and then all upper case.
  Note that this isn't perfect:
   you can't access mixed case names other than "as specified".
   if you read 'ab' using 'AB' and subsequently write it back to 'AB', the
    Unix file 'AB' will be created leaving the original 'ab' unchanged.
  There are a few command options to change the way DVM handles
  filename letter case (see below).

- Windows/DOS uses '\' to separate directory/file names in a path.
  Unix uses '/'.  DVM accepts either '/' or '\'.

-------------------------------------
Library limitations:

- Some of the built in DOS/Windows compatible library functions are limited in
  Linux .. I am improving this as I figure out how to do certain things in GCC.
  See -?M.

-------------------------------------
Command options:        See DVM -?

The Linux DVM has some additional command optioins:

  -DXpath   = create drive 'X:' to reference 'path' (*1)
  -R        = disable filename Recovery (filenames always "as-is")
  -L        = always translate filenames to all Lower case
  -U        = always translate filenames to all Upper case
  -Hpath    = override DVM home directory           (*1 *2)
  -M        = allow liMited library calls (treated as no-op).

*1  I recommend you use full paths from root.
*2  -H may have multiple possible Home paths, separated by ';'

Since you might want to make some of these command lime arguments "permanent",
I have provide a utility: DVMOPT.DVM
 For more information: DVM DVMOPT

-------------------------------------
Linux versions:

Past experience showed me that Linux was fairly sensitive to executables built
under a different Linux version .. I've been told recently that this has
improved...

'DVM32' was built under Ubuntu 12.10 and is 32 bit code.
'DVN64' was built under Ubuntu 20.04 and is 64 bit code.

You may want to rename the one that works for you to just 'dvm'.

I build DVM using Linux on virtual machines. Movement of files to and from the
Windows host is done through a FAT32 RamDrive on the host mounted as a drive on
the VM. Linux can't set execute permission on a FAT32 drive, so you may need
to: chmod +x dvm

If neither of these files work on your Linux, I may be able to build (and
include in thie archive) one that does. I would need:
 - Location of a .ISO for the Linux distribution you want.
   (Preferable one thas has GCC preinstalled), otherwise:
 - The location of a GCC package that works under that Linux.

I have included a utility: LNX.DVM
Converts all .C .H .CH .TXT and .DVM files in current directory to Linux.
 This means rename to all lower-case and except for .DVMs removing all CR
 (0x0D) characters from the file.
For more info: DVM LNX ?

-------------------------------------
Dave Dunfield   -   https://dunfield.themindfactory.com
