Skip to content
Артур Ефимов edited this page Jul 5, 2021 · 2 revisions

Welcome to the Free Oberon wiki!

Free Oberon allows you to write and compile programs in Oberon language in a comfortable way. Just write your program, press F9 and it runs. It produces native executables for Windows and Linux. The old-fashioned retro DOS-like IDE can be used to develop your entire project or just to compile it. Your program can consist of multiple modules.

The website of the projects is free.oberon.org.

Graphics Programming in Oberon

You can use the module called Graph to write games or graphical programs (like Free Oberon itself). The module Graph is currently based on SDL2, but it is made in such a way that it can be easily ported (and in fact there exists a port to Allegro 4).

The Compiler

Free Oberon includes a slightly modified version of an Oberon-to-C translator called Vishap Oberon Compiler (VOC). When you compile a program using Free Oberon, it runs a simple script called compile.sh (or compile.bat on Windows). You are free to edit these files -- thus Free Oberon is highly flexible. When all modules are translated to C and compiled (o-files are produced), link_console.sh (or link_console.bat) is called, which calls a C-linker to create an executable file (EXE on Windows). If module Graph is used in the project, link_graph is called instead of link_console. The difference between the two is that the "graph" version links your program together with SDL2. These files are also free to change, i.e. replace gcc with clang.

The output of the compiler is checked to see if there are any error messages, and the messages are displayed in the IDE. The cursor is moved to the correct position in the file.

Unicode

Free Oberon loads and saves files in UTF-8. Currently only Cyrillic characters are supported (the conversion procedures are very simple and can be edited easily). Funny enough, internally, Free Oberon uses a 1-byte character set CP866 (DOS Cyrillic Russian). The plan is to change it to UTF-16 link in BlackBox.

Written in Oberon

The source files of Free Oberon itself reside in the src directory. All of the main code is written in Oberon. The project basically consists of these modules: FreeOberon, Editor, EditorText, Graph, OV, Term and Terminal. OV is "Oberon Vision" -- a done-from-scratch version of Turbo vision. Module Terminal is a graphical emulation of a terminal. Module Term is a cross-platform module used to open a running application (or a compiler/linker script) and get all of it output so that it could be shown inside the terminal emulator. Of course, it also passes user input in the running application.

Clone this wiki locally