<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Chris,<br>
<br>
thanks a lot. Your example works on my Oberon 3-plugin Version
[Win32 2.5 (7.2.2009)]. So basically my problem seems to be
solved.<br>
However on the newer version [Win32 2.5 (18.12.2010)] your example
does not run, because <i>PELinker </i>and <i>BootLinker</i> are
not available in this distribution. <br>
I wonder whether the PELinker/BootLinker are no longer free as
non-commercial license, or did somebody overlook something, when
he created the latest Version?<br>
<br>
My application is practically ready on the Oberon side.<br>
What do you think? Will I need more Kernel32 routines in order to
do my job, namely reading and writing a file?<br>
<br>
Also I write a lot of control information onto the System.Log with
the Out-Module.<br>
Will this work during the EXE, or do I have to replace the
Out-statements by something else, e.g. writing into a third file?<br>
<br>
Although I always got along without using the Oberon Debugger, I
would like to have some more information on how to use it.<br>
<br>
<br>
For the missing PELinker and BootLinker I tried something which
did not work.<br>
When I copy the PELinker.obj from the older Version and try to run
it, then I get a trap, as follows.<br>
===============================================================================<br>
TRAP PELinker.ErrorException in thread Oberon.Loop<br>
<br>
PELinker.Error PC = 236<br>
str1 = "stub.exe"<br>
str2 = " Files.Old failed"<br>
PELinker.Assert PC = 369<br>
cond = FALSE<br>
str1 = "stub.exe"<br>
str2 = " Files.Old failed"<br>
PELinker.WriteImageHeader PC = 1530<br>
F = 00000000H (Files.File)<br>
R = 00416E98H Files.Rider<br>
ch = 00000000X<br>
char = 0<br>
dosHead = 020DD958H PELinker.ImageDosHeader<br>
imgHead = 020DDA98H PELinker.ImageFileHeader<br>
sR = 00416E98H Files.Rider<br>
sections = 3<br>
PELinker.DoLink PC = 21677<br>
F = 020F28E0H Files.File<br>
R = 00416E98H Files.Rider<br>
T = 020DF3C0H Texts.TextDesc<br>
base = 0<br>
context = 0042DBB8H Exceptions.Context<br>
done = FALSE<br>
mod = 00000000H (BootLinker.ModuleDesc)<br>
name = 00000000H (PELinker.NameList)<br>
offs = 0<br>
sections = 3<br>
PELinker.Link PC = 23391<br>
S = 00447178H Texts.Scanner<br>
T = 020DF3C0H Texts.TextDesc<br>
done = FALSE<br>
Oberon.Call PC = 5931<br>
Mod = 01F7B7C0H Kernel.ModuleDesc<br>
P = PELinker.Link PC = 22948<br>
cur = 01EE27C0H Windows.Window (Displays.Display)<br>
f = 01F7DF80H Desktops.DocViewerDesc (Objects.ObjDesc)<br>
i = 9<br>
j = 13<br>
name = "Link"<br>
new = FALSE<br>
par = 01F5B680H Oberon.ParRec<br>
res = 1<br>
=============================================<br>
et cetera<br>
=============================================<br>
Which Oberon version have you been using, Chris?<br>
<br>
This brings me also to the following questions, which could maybe
better be answered by ETHZ.<br>
<br>
Being a seasoned FORTRAN programmer, the books of Wirth and Reiser<br>
were a revelation to me, when I got them 20 years ago. I can do
things in Oberon, which I could not have dreamed off in my FORTRAN
times.<br>
<br>
System 3 is such a wonderful, effective and efficient development
environment with powerful libraries, with comprehensive
documentation, nicely embedded in the<br>
Windows system and ideal for learning to program. And I would
really be missing something in my life without Oberon. The Oberon
branch of AOS did not convince me so far.<br>
<br>
What is the future of Oberon 3 for Windows? Will Oberon 3 be
running on Windows 10?<br>
<br>
Or should I move to Native Oberon on Linux, which seems to be
actively worked upon recently?<br>
<br>
Regards, Dieter<br>
<br>
<br>
Am 16.03.2015 um 00:28 schrieb Chris Burrows:<br>
</div>
<blockquote
cite="mid:000a01d05f77$cfad4350$6f07c9f0$@cfbsoftware.com"
type="cite">
<blockquote type="cite">
<pre wrap="">From: Dieter [<a class="moz-txt-link-freetext" href="mailto:d.gloetzel@web.de">mailto:d.gloetzel@web.de</a>]
Sent: Monday, 16 March 2015 4:30 AM
To: <a class="moz-txt-link-abbreviated" href="mailto:oberon@lists.inf.ethz.ch">oberon@lists.inf.ethz.ch</a>
Subject: Re: [Oberon] Oberon 3 on Windows 7, PELinker, Windows
executable
Hi Chris,
thanks for your recommendations. I tried, what you told me. But I did
not succeed. It seems I am lacking some crucial information.
o.k. with the HelloCon-example:
</pre>
</blockquote>
<pre wrap="">Great!
</pre>
<blockquote type="cite">
<pre wrap="">Compile->Link->Register->Run and "Hello from Oberon!" appears on the
DOS-Console. This example is somewhat limited.
It does not tell me how to deal with an executable Oberon Procedure
in a Module or maybe several of these in one Module.
</pre>
</blockquote>
<pre wrap="">If you have one executable Oberon Procedure in the Module then just put a
call to that procedure in the initialisation section of the Module after all
of the existing initialisation code.
If you have more than one executable Oberon procedure in the Module then you
could add a third parameter to your command line. You can then read that
parameter and interpret it in your program to decide which executable
procedure to call.
</pre>
<blockquote type="cite">
<pre wrap="">Then I tried to extend this in a way that the EXE would read a
parameter from the command line.
Since I do not know the intricacies of the Kernel32-Library,
</pre>
</blockquote>
<pre wrap="">OK - here is a start for you. Kernel32 has a procedure call GetCommandLine
that returns the content of the command line that your program was called
with. I have extended the HelloCon example to get the command line and
display it. Hence, if you call it with the command:
Hello abc xyz 123
It will display:
Hello from Oberon!
Hello abc xyz 123
The source code is:
MODULE HelloCon;
IMPORT Kernel32;
VAR
cl: Kernel32.LPSTR;
commandLine: ARRAY 255 OF CHAR;
BEGIN
Kernel32.Str("Hello from Oberon!"); Kernel32.Ln();
cl := Kernel32.GetCommandLine();
Kernel32.CopyString(cl, commandLine);
Kernel32.Str(commandLine); Kernel32.Ln();
END HelloCon.
The work that you will now have to do is parse that command line to extract
the three parameters "abc", "def", "123" as strings and then interpret them
according to your requirements.
</pre>
<blockquote type="cite">
<pre wrap="">I tried the following:
The only idea I had was to try to use the parameter mechanism of
Oberon
and hope that this would be magically transferred to the
executable.
</pre>
</blockquote>
<pre wrap="">Unfortunately not. Once you get out of the Oberon environment and into a
Windows command line (i.e. MS-DOS) environment then you have to give up all
of the GUI capabilities of the Oberon environment. If your program is
dependent on any GUI, graphics or mouse capabilities then you need to have a
rethink about what you are trying to do.
</pre>
<blockquote type="cite">
<pre wrap="">A batch solution like << myprogram.exe "path to input file" "path to
output file">> would be sufficient for my present task.
</pre>
</blockquote>
<pre wrap="">Good. That will make your life a whole lot easier.
</pre>
<blockquote type="cite">
<pre wrap="">But could one also produce screen oriented interactive Windows
programs from Oberon code?
</pre>
</blockquote>
<pre wrap="">Yes. If you use a development system that was primarily designed to produce
screen oriented interactive MS Windows programs e.g. Blackbox, Gardens Point
Component Pascal, POW! etc.
Regards,
Chris
Chris Burrows
CFB Software
<a class="moz-txt-link-freetext" href="http://www.cfbsoftware.com/gpcp">http://www.cfbsoftware.com/gpcp</a>
--
<a class="moz-txt-link-abbreviated" href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems
<a class="moz-txt-link-freetext" href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>