Code Monkey home page Code Monkey logo

vm8-system's Introduction

VM8-System

System Disk for the VM-8 computer, and a Linux emulator

This is the second version of a system for the VM-8 Computer : now it has both the Turbo Modula-2 Reloaded compiler and an Oberon-07 compiler. The Oberon-07 compiler is derived from Project Oberon (http://www.projectoberon.com/) : roughly, it replaces the custom-RISC code generator with a new code generator that targets the Turbo Modula-2 Reloaded VM.

Compared with Turbo Modula-2 Reloaded, there are a few extensions to the VM definition, and the Kernel has been reduced to almost nothing, so the exceptions handling mechanism using coroutines has been removed in the process, which means that exceptions that aren't caught will halt the VM. This is because I'm currently writing a small Oberon system that doesn't use coroutines (but still, using coroutines is possible in Modula-2 or Oberon user programs).

Beware that the convergence between Modula-2 and Oberon modules is not complete : the object format (.MCD files) is the same, so the system can load modules without worrying if there are Modula-2 or Oberon modules. But the symbol file formats are not the same: the Modula-2 compiler compiles definition modules into .SYM files, whilst the Oberon compiler generates .SMB files along with the .MCD code. So if you want to use a Modula-2 module from an Oberon module, you will need a .SMB file generated from a stub module, and if you want to use an Oberon module from a Modula-2 module, you will need to compile a Modula-2 definition module corresponding to the Oberon module. Not mentionning that the 16-bit version number is not calculated in the same way so it has to be patched afterwards... So for now, it is better to forget about this Modula-2/Oberon compatibility, except if you only use modules from the standard library (I've provided the symbol files for the two languages).

I haven't updated the firmware for the VM-8 computer yet, so if you want to try it you can use the ugly VM implementation for Linux.

TRY IT:

  1. Download the virtual machine for Linux and compile it (make). It should work without modification on Linux, Android (in Termux), Windows (with Cygwin).

  2. Download the zipped system disk and extract it (system.dsk) in the same directory as the virtual machine interpreters, it is an image of a FAT32 filesystem with my current small operating system pre-installed in it. You can check the contents of this image:

  • file system.dsk reveals it has 128 reserved sectors (the system image is installed in the reserved sectors), apart from this it is a normal FAT32 filesystem.
  • you can access the contents with the mtools on Linux, or mount this disk image (e.g sudo mount -o loop system.dsk /mnt). For convenience, this repository has shows all the files of this disk.
  1. Start the virtual machine, telling it to boot on the disk image: ./vm3 system.dsk

  2. Try some examples:

  • dir
  • type loadpath.txt (this file contains the top level directory names that are looked up when you ask for a module to load (e.g dir and type are in SHELL.DIR)
  • cd shell
  • type cd.mod (this reveals that cd is a Modula-2 module)
  • cd (without argument, it will prompt you for a directory name)
  • ed cd.mod (this launches the editor, press F9 if you want to quit without saving, or F10 to save changes: try to change the message in the PromptFor call)
  • m2 cd.mod (this compiles the module)
  • cd (if you didn't introduce syntax errors, you now see your custom prompt message)
  • root (this returns to the root of the filesystem)
  • cd examples
  • type hello.obn (yeap this one is an Oberon module)
  • obn hello (this compiles the Oberon module)
  • ...

or have a look at a small demonstration video: https://youtu.be/5Qu8TZNxHn0

STATUS: This is not the publicly released version yet, it lacks documentation and I intend to deliver a new shell in the spirit of Midnight Commander. However, this surely is the last version of the system with both Turbo Modula-2 Reloaded and Oberon, future versions will give up Turbo Modula-2 Reloaded. The rationale behind the abandon of TM2R is that I don't have the sources (only the part that I have decompiled, and the result is not always readable), so many modifications require intensive binary patches. Another reason is that I'm experimenting working with a small stack (1 KB), it works well with the Oberon compiler and not so well with TM2R (due to some routines in the SymTab module that recurse through linked structures of symbols). Finally, I would like to remove the overlay system for the simplest system possible, and TM2R is too big to run without these overlays.

vm8-system's People

Contributors

oric4ever avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.