Oberon Community Platform Forum

General => General Discussion => Topic started by: Dave on November 17, 2008, 05:44:20 PM



Title: Request for help
Post by: Dave on November 17, 2008, 05:44:20 PM
Hello,

I've recently stumbled across Oberon and I like what I see, especially the stand alone version.
I however have some questions which I hope someone will be able to help me with.

Coming from a Windows background, I'm very familiar with the exe format and dlls,vxd's etc
How does the compiler of Oberon differ in producing the binary executables?
Are they in elf, PE or which format?
Further more, does Oberon make use of dynamically linked libraries (like windows) or shared objects (like linux)?

Another question, do all "programs" have to be compiled/linked or does Oberon also have a scripting engine?

thanking you in advance,
Dave.


Title: Re: Request for help
Post by: leledumbo on November 18, 2008, 05:29:16 AM
I'm not a master here, but I'll share what I know so far.
Quote
How does the compiler of Oberon differ in producing the binary executables?
Are they in elf, PE or which format?
AFAIK, Oberon has it's own executable format which is quite unique in that there's no entry point defined for every module (CMIIW). Instead, you can call any exported procedure and it will run as a program.
Quote
Further more, does Oberon make use of dynamically linked libraries (like windows) or shared objects (like linux)?
It does use dynamically loadable libraries, but I don't know how it's handled internally.
Quote
Another question, do all "programs" have to be compiled/linked or does Oberon also have a scripting engine?
I haven't seen any scripting engine available so I guess it's all compiled.


Title: Re: Request for help
Post by: Alexey on November 18, 2008, 09:26:22 AM
Hi,

In WinAos you can import procedures using Win API available through Win32.Kernel32.Mod (binary Kernel32.Obw).

Here is an example:

TYPE
   ADDRESS32 = LONGINT;
VAR
   lib: Kernel32.HMODULE;

   (*
       imported procedure, {C} means C argument passing convention,       
       in C this procedure corresponds to:
       long MyProc(void* A, void* A, void* A, float* d, long e);       
   *)
   myProc: PROCEDURE{C}(A: ADDRESS32; B: ADDRESS32; C: ADDRESS32; VAR d: REAL; e: LONGINT): LONGINT;

(* load the library *)
lib := Kernel32.LoadLibrary('mydll.dll');
ASSERT(lib # Kernel32.NULL); (* error handling *)

(* import your procedure *)
Kernel32.GetProcAddress(lib,'MyProc',SYSTEM.VAL(ADDRESS32,myProc));
ASSERT(myProc # NIL); (* error handling *)

(* unload the library *)
Kernel32.FreeLibrary(lib);

Best regards,
Alexey


Title: Re: Request for help
Post by: Dave on November 18, 2008, 09:33:00 AM
Thank you all for the prompt replies.

You've got me really keen to experiment with Oberon.
Gonna try and get an old pentium machine and load the stand alone version
untill I get to know it then load it on my XP box.

Thanks once again,
Dave.


Title: Re: Request for help
Post by: masta on November 18, 2008, 01:05:27 PM
You can also run Oberon, respectively Aos from a USB Stick. It is as fast as from a disk...


Title: Re: Request for help
Post by: Dave on November 18, 2008, 06:35:04 PM
Hi masta,

Great idea.
Are you saying that I could get an oldish m/board with a bios that supports booting from USB,
some RAM and run Oberon directly from say a 1GB USB stick with no HDD required?
(That would be great in keeping costs down for experimenting with.)

What Oberon files would I need to transfer to the stick?
Am I correct in assuming that if I place all the files present in the Oberon iso file I'm in business?

Dave.


Title: Re: Request for help
Post by: Dave on November 18, 2008, 06:48:01 PM
I have subsequently found some info on running from USB sicks at:

https://lists.inf.ethz.ch/pipermail/oberon/2005/004330.html (https://lists.inf.ethz.ch/pipermail/oberon/2005/004330.html)

Do you agree with the info?

Dave.


Title: Re: Request for help
Post by: staubesv on November 19, 2008, 10:10:07 AM
Dear Dave,

The easiest way to get A2 running on a USB stick is to boot A2 from a CD and then use the graphical installer found in MainMenu -> System -> Installer. The installer will recognized the fact that you want to install A2 on a USB device and will take appropriate actions (there should be no need to do anything more than just let the installer do its job).

WARNING: The installer will destroy the data on the USB stick!!!

https://lists.inf.ethz.ch/pipermail/oberon/2005/004330.html:
Still valid, except:
- you can use the graphical installer and just ignore this information
- you don't have to set BootFromUsb=1
- not sure whether information in AosSetup.Text is still valid
- USB mass storage driver is typically loaded automatically, but if you want to load it manually, the command would be UsbStorage.Install

If you encounter any problems, please don't hesitate to post questions on this board.

Best,
Sven


Title: Re: Request for help
Post by: Dave on November 19, 2008, 10:27:57 AM
Thanks Sven,
Gonna give it a try.
Regards,
Dave.