<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 for your recommendations. I tried, what you told me. But I
      did not succeed. It seems I am lacking some crucial information.<br>
      <br>
      o.k. with the HelloCon-example: <br>
      <br>
      Compile-&gt;Link-&gt;Register-&gt;Run and "Hello from Oberon!"
      appears on the DOS-Console. This example is somewhat limited.<br>
      It does not tell me how to deal with an executable Oberon
      Procedure in a Module or maybe several of these in one Module.<br>
      <br>
      Then I tried to extend this in a way that the EXE would read a
      parameter from the command line. <br>
      Since I do not know the intricacies of the Kernel32-Library, I
      tried the following:<br>
      The only idea I had was to try to use the parameter mechanism of
      Oberon <br>
        and hope that this would be magically transferred to the
      executable.<br>
      ================================================================<br>
      MODULE HelloConRead;    <br>
          IMPORT Kernel32, Texts, Oberon;<br>
      VAR S : Texts.Scanner;<br>
      BEGIN<br>
      Texts.OpenScanner(S,Oberon.Par.text, Oberon.Par.pos);<br>
      Texts.Scan(S);<br>
          Kernel32.Str(S.s); Kernel32.Ln()<br>
      END HelloConRead.<br>
      ==============================================================<br>
      <br>
      Is this idea at all correct? <br>
      <br>
      A batch solution like &lt;&lt; <i>myprogram.exe "path to input
        file" "path to output file"</i>&gt;&gt;
      would be sufficient for my present task.<br>
      But could one also produce screen oriented interactive Windows
      programs from Oberon code?<br>
      ==============================================================<br>
      o.k. for the Compiler: Builder.Compile \s HelloConRead.Mod ~<br>
      ==============================================================<br>
      Then I modified the HelloCon.Link statement to include the Oberon
      and Text modules<br>
      and changed the OriginalFilename to "HelloConRead.exe"<br>
      <br>
      When I call:  PELinker.Link HelloConRead.Link ~,<br>
      there is a crash, and I have no chance to go any further.<br>
      ============================================<br>
      P 100  HALT statement in thread Oberon.Loop<br>
      <br>
      BootLinker.Halt  PC = 1857<br>
          msg = "Imported module not loaded"<br>
      BootLinker.ReadImport  PC = 10781<br>
          R =  00416E98H Files.Rider<br>
          m =  0218E840H BootLinker.ModuleDesc<br>
      BootLinker.LoadModule  PC = 16007<br>
          R =  00416E98H Files.Rider<br>
          base = 4272060<br>
          body = NIL<br>
          ch =  00000000X<br>
          e = 0<br>
          i = 12<br>
          imp =  00000000H (BootLinker.ModuleDesc)<br>
          j = 0<br>
          k = 0<br>
          m =  0218E840H BootLinker.ModuleDesc<br>
          mname = "Modules"<br>
          mno = 3<br>
          nofDataLinks = 29<br>
          nofLinks = 3<br>
          symSize = 1564<br>
          t = 0<br>
          tmp = 476<br>
      BootLinker.Load  PC = 18567<br>
          R =  00416E98H Files.Rider<br>
          base = 4272060<br>
          f =  02111D00H Files.File<br>
          fname = "Oberon.Obj"<br>
          imp =  00000000H (BootLinker.ModuleDesc)<br>
          m =  0218E840H BootLinker.ModuleDesc<br>
          name = "Oberon"<br>
          tag =  000000AFX<br>
      PELinker.DoLink  PC = 22134<br>
          F =  0216F260H Files.File<br>
          R =  00416E98H Files.Rider<br>
          T =  0215BB00H Texts.TextDesc<br>
          base = 4272060<br>
          context =  0042DBB8H Exceptions.Context<br>
          done = FALSE<br>
          mod =  0218E840H BootLinker.ModuleDesc<br>
          name =  0215C3C0H PELinker.NameList<br>
          offs = 0<br>
          sections = 3<br>
      PELinker.Link  PC = 23391<br>
          S =  00447178H Texts.Scanner<br>
          T =  0215BB00H Texts.TextDesc<br>
          done = FALSE<br>
      Oberon.Call  PC = 5931<br>
          Mod =  02133D60H Kernel.ModuleDesc<br>
          P = PELinker.Link  PC = 22948<br>
          cur =  01E9DE80H Windows.Window (Displays.Display)<br>
          f =  01F99520H Desktops.DocViewerDesc (Objects.ObjDesc)<br>
          i = 9<br>
          j = 13<br>
          name = "Link"<br>
          new = FALSE<br>
          par =  02132BC0H Oberon.ParRec<br>
          res = 1<br>
      TextGadgets0.Call  PC = 16652<br>
          A =  0041F1B8H Objects.AttrMsg<br>
          F =  01E60B80H TextGadgets.FrameDesc (TextGadgets0.FrameDesc)<br>
          R =  00447218H Texts.Reader<br>
          S =  00447178H Texts.Scanner<br>
          ch =  00000000X<br>
          chl = 32767<br>
          cmd = ""<br>
          cw = 32767<br>
          cx = 0<br>
          cy = 0<br>
          dlink =  01FA30E0H Documents.DocumentDesc (Objects.ObjDesc)<br>
          i = 8<br>
          j = 0<br>
      <br>
      <br>
      <br>
      <br>
      <br>
      <br>
      Am 14.03.2015 um 02:59 schrieb Chris Burrows:<br>
    </div>
    <blockquote
      cite="mid:000301d05dfa$889fde10$99df9a30$@cfbsoftware.com"
      type="cite">
      <pre wrap="">Hi Dieter,

Read Chapter 6.6 "Building EXE and DLL Executable Files with Oberon" in the Oberon UserGuide (Docu/UserGuide.Text) for information on how to use PELinker.Tool

If you follow those instructions and get stuck let me know how far you got and I'll see if I can help. I would recommend proceeding step by step e.g.:

1. Start with the simple sample that they provide and confirm that you can get that working
2. Write a simple example that accepts filenames as command-line parameters and confirms that the input file exists and checks that the output file doesn't exist.
3. Start working on your actual application,

Regards,
Chris

Chris Burrows
CFB Software
Oberon for ARM Cortex-M3 and M4
<a class="moz-txt-link-freetext" href="http://www.astrobe.com">http://www.astrobe.com</a>
 

From: Dieter [<a class="moz-txt-link-freetext" href="mailto:d.gloetzel@web.de">mailto:d.gloetzel@web.de</a>] 
Sent: Friday, 13 March 2015 10:11 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:oberon@lists.inf.ethz.ch">oberon@lists.inf.ethz.ch</a>
Subject: [Oberon] Oberon 3 on Windows 7, PELinker, Windows executable

Hi,

I am new to this list, but do have some 20 years experience with Oberon on Windows. 
Still there are things which I do not fully understand, e.g. PELinker and Oberon debugger.

Right now I am working on an application which translates MusicXML (a proprietary language to describe musical notes) into another input language, called PMX, which in turn generates TeX-code for typesetting notes.

Is there anywhere out in Cyber Space someone, who could give me a helping hand on how to use PELinker in order to transform an Oberon-Module into a Windows *.exe, so that I can call it from the WIndows command line in the following form:
myprogram.exe "path to input file" "path to output file"

Thanks and regards,
Dieter 


--
<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>
    <pre class="moz-signature" cols="72">-- 
____________________________________
Dr. Dieter Glötzel
Im Rosengarten 27
64367 Mühltal
Tel.: 06151 / 360 82 72</pre>
  </body>
</html>