Coder Social home page Coder Social logo

oberon-module-finalization's Introduction

Oberon-module-finalization

Module finalization for the Project Oberon 2013 and Extended Oberon operating systems

Note: In this repository, the term "Project Oberon 2013" refers to a re-implementation of the original "Project Oberon" on an FPGA development board around 2013, as published at www.projectoberon.com.

PREREQUISITES: A current version of Project Oberon 2013 (see http://www.projectoberon.com). If you use Extended Oberon (see http://github.com/andreaspirklbauer/Oberon-extended), the functionality is already implemented.


1. Description

The modification to Project Oberon 2013 provided in this repository allows a module to set a module finalization sequence by calling procedure Modules.Final during module initialization. The specified routine must be a parameterless procedure declared in the same module. It is executed when the module is removed from the system.

 MODULE M;
   IMPORT Modules, Texts, Oberon;

   VAR W: Texts.Writer;

   PROCEDURE Final;  (*module finalization sequence*)
   BEGIN Texts.WriteString(W, “Finalizing module M");
     Texts.WriteLn(W); Texts.Append(Oberon.Log, W.buf)
   END Final;

   PROCEDURE Start*;
   BEGIN  (*load module*)
   END Start;

 BEGIN Texts.OpenWriter(W); Modules.Final(Final)
 END M.

 ORP.Compile M.Mod/s ~     # compile module M
 M.Start ~                 # load module M
 System.Free M ~           # unload module M (prints "Finalizing module M")

2. Preparing your system to add module finalization

If Extended Oberon is used, module finalization is already implemented on your system.

If Project Oberon 2013 is used, download all files from the Sources/FPGAOberon2013 directory of this repository. Convert the source files to Oberon format (Oberon uses CR as line endings) using the command dos2oberon, also available in this repository (example shown for Linux or MacOS):

 for x in *.Mod ; do ./dos2oberon $x $x ; done

Import the files to your Oberon system. If you use an emulator (e.g., https://github.com/pdewacht/oberon-risc-emu) to run the Oberon system, click on the PCLink1.Run link in the System.Tool viewer, copy the files to the emulator directory, and execute the following command on the command shell of your host system:

 cd oberon-risc-emu
 for x in *.Mod ; do ./pcreceive.sh $x ; sleep 1 ; done

Compile module Modules, build a new inner core and load it onto the boot area of the local disk:

 ORP.Compile Modules.Mod ~
 ORL.Link Modules ~
 ORL.Load Modules.bin ~

Compile the remaining modules of the Oberon system:

 ORP.Compile Input.Mod Display.Mod/s Viewers.Mod/s ~
 ORP.Compile Fonts.Mod/s Texts.Mod/s Oberon.Mod/s ~
 ORP.Compile MenuViewers.Mod/s TextFrames.Mod/s ~
 ORP.Compile System.Mod/s Edit.Mod/s Tools.Mod/s ~

Re-compile the Oberon compiler itself before (!) restarting the system:

 ORP.Compile ORS.Mod/s ORB.Mod/s ~
 ORP.Compile ORG.Mod/s ORP.Mod/s ~
 ORP.Compile ORL.Mod/s ORX.Mod/s ORTool.Mod/s ~

Restart the Oberon system and recompile any other modules you may have on your system.

Test module finalization using the test program provided in this repository (see above).

oberon-module-finalization's People

Contributors

andreaspirklbauer avatar

Stargazers

Cybernetic Engineering avatar Norayr Chilingarian avatar  avatar

Watchers

James Cloos 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.