Need some help with the Einstein compiler

5 posts / 0 new
Last post
CVT
CVT's picture
Offline
Last seen: 1 hour 34 min ago
Joined: Aug 9 2022 - 00:48
Posts: 982
Need some help with the Einstein compiler

I have been using the Einstein compiler without any issues so far with quite complicated Basic programs, but recently I ran into a very strange bug when I tried to execute a DOS command.

 

To demonstrate the problem I have the following one line program, which simply executes the CATALOG command:

 

    10 PRINT CHR$(4)”CATALOG”

 

When I run it uncompiled under DOS 3.3 or under ProDOS it works perfectly. If I compile it using Einstein, the compiled version works under DOS 3.3, but under ProDOS it ignores the CHR$(4) and just prints on the screen:

 

   #10 CATALOG

 

I am also not sure why it is printing #10, when I actually disabled tracing in the compiler options.

 

Is there any trick to make it work under ProDOS? I find it hard to believe that it is not possible to call DOS commands in ProDOS from an Einstein compiled program. I am not really trying to list files in my program, I am just using this as the simplest example to showcase the problem. I tried version 5.2 as well as 5.3 of the compiler, the result is the same.

 

Thanks in advance!

 

 

Offline
Last seen: 5 hours 55 min ago
Joined: Jun 6 2020 - 10:50
Posts: 409
Complete shot in the dark, as

Complete shot in the dark, as I'm not familiar with this compiler. But I was always taught to put a semicolon after chr$(4) to concatenate when issuing dos commands. Maybe the compiler wants it as well? Have you tried something like:

 

 

10 print chr$(4);"catalog"

Offline
Last seen: 9 hours 38 min ago
Joined: Nov 29 2020 - 19:48
Posts: 127
Einstien on ProDOS

This is strictly from memory, but as I recall Einstien supported DOS 3.3 only.  It even had disclaimers about using it with ProntoDOS and other DOS 3.3 variants.  Most people I knew used Beagle Compiler for ProDOS.  It makes sense that the disk routines in DOS and BASIC.SYSTEM would not have common entry points and the compiled code would not likely work.  Again from memory only, Beagle Compiler genereated a byte code and needed a runtime engine also (  ?? COMPILER.SYSTEM maybe?? ),  like Java or UCSD Pascal P-code.

dorkbert's picture
Online
Last seen: 1 hour 6 min ago
Joined: Apr 12 2009 - 16:33
Posts: 364
Einstein was not designed for

Einstein was not designed for ProDOS.

CVT
CVT's picture
Offline
Last seen: 1 hour 34 min ago
Joined: Aug 9 2022 - 00:48
Posts: 982
That is definitely the case,

That is definitely the case, but all of my compiled code worked perfectly under ProDOS so far, except for when I introduced the need to call DOS. I was hoping that there would be some hack or workaround, but apparently there isn’t. I’ll most likely give the other compilers a try.

Log in or register to post comments