Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3107792
Showing
122 changed files
with
17,626 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Temporary files | ||
*~ | ||
\#*# | ||
|
||
# MacOS X Finder metadata | ||
.DS_Store |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
2020-02-12 Display, Viewers, Oberon, System - Restore (partial) backward compatibility with the original Oberon system | ||
2020-02-13 Viewers, Oberon, TextFrames, System - Move FocusViewer to Viewers so it stays current when switching display areas | ||
2020-02-13 ORP - Fix typo in ORP.ParamList | ||
2020-02-20 ORB - Re-allow reusing canonical module names and aliases whenever possible (makes compiler less restrictive) | ||
2020-02-25 FontTool - Module FontTool added | ||
2020-02-26 ORG - Remove 64KB restriction for global variables, ORG.Put1a corrected | ||
2020-02-27 Modules, ORL - Use constants instead of literals in fixup code | ||
2020-03-02 ORP - ORP.ImportList updated | ||
2020-03-06 ORB - ORB.ThisModule updated for Project Oberon 2013 and Extended Oberon | ||
2020-03-09 Input - Move character, text and cursor related constants to module Input | ||
2020-03-12 Modules, ORL, ORG, ORTool - Use 6 bits for module number (mno) in all instructions | ||
2020-03-13 Kernel, Modules, ORL, ORG, ORTool, System - Eliminate module table starting at MTOrg | ||
2020-03-17 Modules, ORL, ORG, System - Make pre-linked binaries relocatable (ORL.Relocate, ORG.BuildTD) | ||
2020-03-22 Disk, inner core modules - Modules Disk and Kernel are now separate, FileDir.Atrributes added | ||
2020-04-27 ORG, ORB, ORP constants factored out, procedure PutPair added to generate MOV'/IOR instruction pair | ||
2020-05-15 Kernel - Fix issue in Kernel.Mark with illegal memory access to p-4 when pointer p happens to be 0 | ||
2020-05-15 Oberon0 - Clear entire root page of file directory in Oberon0.ClearDirectory, except for DirMark | ||
2020-05-15 ORC - Change timeout code in ORC.Rec and ORC.Flush to avoid issues with signed arithmetic | ||
2020-06-01 Oberon - Oberon.Batch, Oberon.Return, Oberon.Par.res added | ||
2020-06-13 ORC, PCLink0 - Add REQ-ACK handshake after sending SND or REC, and after sending or receiving a packet stream | ||
2020-06-18 Build.Tool - Allow building an entire Oberon system on a remote target system with a single Oberon.Batch command | ||
2020-07-17 ORL - Improve code in ORL.RelocateLoaded to mark an instruction as fixed up by setting the B bit | ||
2020-08-01 ORG - Set the register index in ORG.Set correctly when a set range in a set literal uses variable bounds | ||
2020-08-02 ORG, System - Allow index ranges incorporating a variable expression in ORG.Index, add System.Batch facility | ||
2020-08-06 ORP - Report a compile-time error in ORP.RecordType if a field of a private record is exported | ||
2020-08-27 Kernel - Use correct increment in Kernel.Mark when traversing pointer offsets for arrays of records | ||
2020-08-30 Kernel - Rely on correct rounding of size in Kernel.New, prevent accessing memory locations > heapLim in Kernel.Collect | ||
2020-09-01 Fonts - Replace all calls to module SYSTEM with array and pointer operations | ||
2020-10-24 Oberon, System - Oberon.Batch (but not System.Batch) invokes the garbage collector after each executed command | ||
2020-11-01 ORG, ORB - Restrict the type case statement such that type loopholes are no longer possible | ||
2020-11-12 ORP - Allow elements of a structure as numeric case expressions in all cases | ||
2020-12-01 ORL - Don't provide a hint to the bootloader for Kernel.MemLim and Kernel.stackOrg anymore | ||
2020-12-02 Disk - Enlarge boot area from sectors 2-63 (62KB) to sectors 2-159 (158KB) to accomodate entire pre-linked Oberon systems | ||
2020-12-12 Modules - Add procedure Modules.SetFinalizer to set a module finalization sequence to be executed prior to unloading | ||
2020-12-30 TextFrames - TextFrames.Copy now produces an exact copy of the text frame, including vertical offset from baseline | ||
2020-12-31 Modules, ORS, ORG, ORP, ORL, ORX, ORTool, Oberon0 - Add module finalization as a language construct (symbol FINAL) | ||
2021-01-24 ORTool - Decode FLR, FLT, RTI, STI, CLI instructions | ||
2021-04-12 In, Out - In added, Out updated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,155 @@ | ||
# The Extended Oberon operating system and the programming language Oberon-2 (2020 Edition) | ||
The Extended Oberon System is a revision of the *Project Oberon 2013* operating system and its compiler. | ||
|
||
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. | ||
|
||
Features | ||
|
||
* Programming language Oberon-2 (2020 Edition), implementing a superset of Oberon-07 | ||
* Safe module unloading and module finalization | ||
* System building and maintenance tools | ||
* Smooth line scrolling with variable line spaces | ||
* Multiple logical displays | ||
* Improved decoder tools | ||
* Import any number of modules | ||
* Simple batch execution facility | ||
|
||
**Last release:** 19.5.2021 | ||
|
||
**Last update:** 19.5.2021 | ||
|
||
The file [**S3RISCinstall.tar.gz**](Documentation/S3RISCinstall.tar.gz) always reflects the *latest* version of Extended Oberon, as described in the file [**EOS_news.txt**](EOS_news.txt). | ||
|
||
Documentation: [**Documentation**](Documentation) | ||
|
||
------------------------------------------------------ | ||
|
||
# Instructions for converting an existing Project Oberon 2013 system to Extended Oberon | ||
|
||
**PREREQUISITES**: A current version of the Project Oberon 2013 system (see http://www.projectoberon.com). | ||
|
||
**NOTE**: If you run Oberon in an emulator on the desktop (e.g., http://github.com/pdewacht/oberon-risc-emu), you can simply backup your existing S3RISCinstall directory, download the compressed archive [**S3RISCinstall.tar.gz**](Documentation/S3RISCinstall.tar.gz) from this repository (containing Extended Oberon) to your emulator directory, run the command *tar xvzf S3RISCinstall.tar.gz* in that directory and then restart the emulator, instead of going through the instructions outlined below. | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 1**: Build a slightly modified Project Oberon 2013 compiler on your Project Oberon 2013 system | ||
|
||
Edit the file *ORG.Mod* on your original system and set the following constants to the indicated new values: | ||
|
||
CONST ... | ||
maxCode = 8800; maxStrx = 3200; ... | ||
|
||
Then recompile your Project Oberon 2013 compiler (and unload the old one): | ||
|
||
ORP.Compile ORS.Mod/s ORB.Mod/s ~ | ||
ORP.Compile ORG.Mod/s ORP.Mod/s ~ | ||
System.Free ORP ORG ORB ORS ~ | ||
|
||
This step is (unfortunately) necessary since the original Oberon-07 compiler has a tick too restrictive constants. To compile Extended Oberon, one needs slightly more space (in the compiler) for both *code* and *string constants*. | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 2**: Build a slightly modified version of module Oberon on your Project Oberon 2013 system | ||
|
||
Edit the file *Oberon.Mod* on your original system and add the following line anywhere in the source text | ||
|
||
PROCEDURE Return*(n: INTEGER); BEGIN END Return; | ||
|
||
Then recompile the following modules on your original system: | ||
|
||
ORP.Compile Oberon.Mod/s ~ | ||
ORP.Compile MenuViewers.Mod/s TextFrames.Mod/s ~ | ||
ORP.Compile System.Mod/s Edit.Mod/s ~ | ||
ORP.Compile Tools.Mod/s PCLink1.Mod/s ~ | ||
|
||
Then re-compile the Oberon compiler again(!) 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 ~ | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 3:** Restart the Oberon system | ||
|
||
You are now running a slightly modified version of your your original Project Oberon 2013 system. | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 4**: Download and import the Extended Oberon files to your (slightly modified) Project Oberon 2013 system | ||
|
||
Download all files from the [**Sources**](Sources/) directory of this repository. Convert the *source* files to Oberon format (Oberon uses CR as line endings) using the command [**dos2oberon**](dos2oberon), also available in this repository (example shown for Linux or MacOS): | ||
|
||
for x in *.Mod *.Tool ; do ./dos2oberon $x $x ; done | ||
|
||
Import the files to your Oberon system. If you use an emulator, 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 *.Tool *.Scn.Fnt ; do ./pcreceive.sh $x ; sleep 0.5 ; done | ||
|
||
Open the Extended Oberon version of the [**System.Tool**](Sources/System.Tool) viewer in the system track of your Project Oberon 2013 system, so that you can directly activate the compilations needed to build Extended Oberon: | ||
|
||
System.Open System.Tool | ||
|
||
If you just follow the compilation sequence shown in *System.Tool*, you should be done with the remaining steps in a few seconds! | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 5:** Build a cross-development toolchain by compiling the "new" compiler and boot linker/loader on the "old" system | ||
|
||
ORP.Compile ORS.Mod/s ORB.Mod/s ~ | ||
ORP.Compile ORG.Mod/s ORP.Mod/s ~ | ||
|
||
Temporarily compile module *Disk* with the "old" compiler on the "old" system, so it can be used by the cross-linker *ORL* (this works, because module *Disk* is written such that it can be compiled under both Project Oberon 2013 and Extended Oberon). Note that module *Disk* will later be recompiled again with the "new" compiler (for execution in Extended Oberon). | ||
|
||
ORP.Compile Disk.Mod/s ~ | ||
|
||
Compile the remaining modules of the cross-development toolchain (where *ORL* uses a temporary version of *Disk*): | ||
|
||
ORP.Compile ORL.Mod/s ORX.Mod/s ORTool.Mod/s ~ | ||
System.Free ORTool ORP ORG ORB ORS ORL ORX ~ | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 6:** Use the cross-development toolchain on your Project Oberon 2013 system to build Extended Oberon | ||
|
||
First, load the temporary version of ORL (using module *Disk* compiled for the "old" system): | ||
|
||
ORL.Link nonexistingmodulename ~ # load the "old" version of module Disk into memory, so module Disk can be safely re-compiled below | ||
|
||
This step is absolutely necessary! Otherwise the next command below (*ORP.Compile Kernel.Mod/s Disk.Mod/s ...*) would create a "new" version of module *Disk* (i.e. a version that is compiled for Extended Oberon), before the command *ORL.Link* gets a chance to load the "old" version into memory. | ||
|
||
Compile the *inner core* of Extended Oberon and load it onto the boot area of the local disk: | ||
|
||
ORP.Compile Kernel.Mod/s Disk.Mod/s FileDir.Mod/s Files.Mod/s Modules.Mod/s ~ # modules for the "regular" boot file for Extended Oberon | ||
ORL.Link Modules ~ # generate a pre-linked binary file of the "regular" boot file (Modules.bin) | ||
ORL.Load Modules.bin ~ # load the "regular" boot file onto the boot area of the local disk | ||
|
||
This step is possible, because module *ORL* is written such that it can be executed on both the Project Oberon 2013 and the Extended Oberon system. It produces output using the Extended Oberon module and object file format. | ||
|
||
Release the temporary versions of modules *ORL* and *Disk* (compiled for the "old" system), as they are no longer needed: | ||
|
||
System.Free ORL Disk ~ | ||
|
||
Compile the remaining modules of Extended Oberon: | ||
|
||
ORP.Compile Input.Mod/s 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 ~ | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 7:** 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 ~ | ||
|
||
This step is necessary because Extended Oberon uses a different Oberon object file format (the currently loaded Extended Oberon compiler runs under Project Oberon 2013, but wouldn't be able to run under Extended Oberon). | ||
|
||
------------------------------------------------------ | ||
|
||
**STEP 8:** Restart the Oberon system | ||
|
||
You are now running Extended Oberon. Re-compile any other modules that you may have on your system. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
MODULE Blink; (*NW 30.5.2013*) | ||
IMPORT SYSTEM, Oberon; | ||
VAR z: INTEGER; | ||
T: Oberon.Task; | ||
|
||
PROCEDURE Run*; | ||
BEGIN Oberon.Install(T) | ||
END Run; | ||
|
||
PROCEDURE Stop*; | ||
BEGIN Oberon.Remove(T) | ||
END Stop; | ||
|
||
PROCEDURE Tick; | ||
BEGIN z := 1-z; LED(z) | ||
END Tick; | ||
|
||
BEGIN z := 0; T := Oberon.NewTask(Tick, 500) | ||
END Blink. |
Oops, something went wrong.