Oberon Microsystems BlackBox Component Builder (http://www.oberon.ch/) Port for OpenBSD/i386, Linux/i386 Some significant parts taken from OpenBUGS (http://www.openbugs.info/) How to build: compile loader executable (BlackBox itself and simple interpreter): `uname -s`/libBB*.so must be present (can be built from Windows) cd BlackBox/`uname -s`/Lin/Rsrc/loader; make compile self: cd BlackBox; ./switch-os `uname -s`; ./clean; ./build-lindev; ./build Files: original: BlackBox: Dev/Mod/* all except ElfLinker16 Dev/Rsrc/* Docu/BB-License.odc Docu/BB-Licensing-Policy.odc Docu/BB-Open-Source-License.odc Obx/* Std/* System/Mod/ all except Console System/Rsrc/* Text/* OpenBUGS: Dev/Mod/ElfLinker16.odc Dev/Docu/ElfLinker.odc System/Mod/Console.odc Docu/OpenBUGS-License.odc http://forum.oberoncore.ru/viewtopic.php?f=34&t=1159&sid=3e82517160caa46c64331178c1b61e95: {Linux,OpenBSD}/Lin/Mod/Kernel_so_init.odc modified: OpenBSD/Lin/Mod/Kernel.odc: 1.6-rc6 System/Mod/Kernel.odc, OpenBUGS Lin/Mod/linKernel.odc: OpenBSD specific: Memory management rewritten (based on mmap) Kernel.TrapHandler OpenBSD sigcontext-specific Kernel.Time CLOCKS_PER_SEC related Kernel.InitModule mprotect call added Kernel.InstallSignals: use alternate stack on which signals are to be processed (to catch stack overflow) do not install signal handler for SIGTHR (when executable linked with -pthread) Kernel.cmdLine support: Kernel.INIT (SetCmdLine2) Linux/Lin/Mod/Kernel.odc: OpenBSD/Lin/Mod/Kernel.odc modified for Linux: Time* TrapHandler mmap: use "/dev/zero" device instead of -1 mprotect addresses must be page-aligned do not show warning message if signal install failed sigStkSize increased, because SIGSTKSZ=8192 on Linux is too low OpenBSD/Lin/Mod/linHostFiles.odc: OpenBUGS Lin/Mod/linHostFiles.odc: OpenBSD-specific: size_t __xstat -> stat Kernel.cmdLine support: str := "" -> str := Kernel.cmdLine$ Linux/Lin/Mod/linHostFiles.odc: OpenBUGS Lin/Mod/linHostFiles.odc: Kernel.cmdLine support: str := "" -> str := Kernel.cmdLine$ OpenBSD/Lin/Mod/Console.odc: OpenBUGS Lin/Mod/Console.odc: stdin -> SYSTEM.ADR(__sF[0]) Linux/Lin/Mod/Console.odc: OpenBUGS Lin/Mod/Console.odc OpenBSD/Lin/Mod/Libc.txt: OpenBUGS Lin/Mod/Libc.odc: OpenBSD-specific Linux/Lin/Mod/Libc.odc: OpenBUGS Lin/Mod/Libc.odc: PROT_*, MAP_*, O_*, _SC_PAGESIZE, SIGSTKSZ CONSTs added open, close, read, write, mmap, munmap, mprotect, getenv, sysconf, sigaltstack functions added Linux/Lin/Mod/Dl.odc: OpenBUGS Lin/Mod/Dl.odc OpenBSD/Lin/Mod/Dates.odc: HostDates, from http://oberoncore.ru/: OpenBSD-specific Linux/Lin/Mod/Dates.odc: HostDates, from http://oberoncore.ru/ Lindev/Mod CP* BlackBox 1.6-rc6 Dev CP* modified to not depend on Dates, Texts etc. Compiler.odc: modified original BlackBox Dev/Mod/Compiler.odc ElfLinker16.odc: modified OpenBUGS Dev/Mod/ElfLinker16.odc new: Cons/Mod Interp.odc: console interpreter Compiler.odc: console interface to Dev compiler {OpenBSD,Linux}/libBB.so: compiled and linked shared library to run BlackBox {OpenBSD,Linux}/libBB0.so: compiled and linked shared library to run simple development interpreter Views.odc: minimal Views implementation required to compile StdInterpreter StdLog.odc: alternative StdLog implementation to not depend on GUI HostFonts.odc, HostDialog.odc, HostWindows.odc: simple Hosts implementation Notes: Lindev: I will not remove Lindev because I can not link .so library based on ConsInterp and Dev Kernel_so_init.SetKernelBaseStack: required only in case of .so shared library dynamic loading (at run-time via dlopen, not on link-time) A. V. Shiryaev, 2012