All of lore.kernel.org
 help / color / mirror / Atom feed
* Runtime error 200 => How to slow down dosemu?
@ 2006-04-22 20:29 Felix E. Klee
  2006-04-25  5:09 ` John Coppens
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Felix E. Klee @ 2006-04-22 20:29 UTC (permalink / raw)
  To: linux-msdos

When I try to execute a program named "retrieve.exe" in Freedos under
Dosemu 1.2.2, then I get the error message "runtime error 200 at
001D:233A.".  I already tried patching the executable, but to no avail:

  >tppatch retrieve.exe
  TPPatch v1 - written by Andreas Bauer <andi.tio@hit.handshake.de>

  Überprüfe die Datei ...Datei ist ok.
  DieDatei wird jetzt gepatcht...retrieve.exe kann nicht gepatcht werden.

The error message indicates that the file is already patched, but - as
said before - "retrieve.exe" simply doesn't work.  Also in the directory
is program called "rtm.exe".  But this one also cannot be patched:

  >tppatch rtm.exe
  TPPatch v1 - written by Andreas Bauer <andi.tio@hit.handshake.de>

  Überprüfe die Datei ...rtm.exe ist keine von TP7/BP7 erzeugte Datei.

I tried uncompressing "rtm.exe" with "unp" but it doesn't seem to be a
compressed file.

Well, since the runtime error is most likely due to a processor which is
too fast, the only solution left seems to be throttling of Dosemu.  So:

  How can I slow down Dosemu to the speed of about a 233MHz PII?

The machine Dosemu is running on has a Pentium M running at varying
speeds, between 800MHz and 1.8GHz.

-- 
Felix E. Klee
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-22 20:29 Runtime error 200 => How to slow down dosemu? Felix E. Klee
@ 2006-04-25  5:09 ` John Coppens
  2006-04-25 20:13   ` Felix E. Klee
  2006-04-25 15:09 ` Jonas Eckerman
  2006-04-25 19:59 ` Felix E. Klee
  2 siblings, 1 reply; 11+ messages in thread
From: John Coppens @ 2006-04-25  5:09 UTC (permalink / raw)
  To: Felix E. Klee; +Cc: linux-msdos

On Sat, 22 Apr 2006 22:29:30 +0200
"Felix E. Klee" <felix.klee@inka.de> wrote:

> The error message indicates that the file is already patched, but - as
> said before - "retrieve.exe" simply doesn't work.  Also in the directory
> is program called "rtm.exe".  But this one also cannot be patched:

I seem to recall this problem occurs if the .exe was compressed with
lzexe. I'm not completely sure, but I seem to remember you can detect
that by checking the binary - at about 20-30 bytes from the beginning,
there is a text 'LZ90'

John

BTW: there is an unlzexe somewhere on the 'net...

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-22 20:29 Runtime error 200 => How to slow down dosemu? Felix E. Klee
  2006-04-25  5:09 ` John Coppens
@ 2006-04-25 15:09 ` Jonas Eckerman
  2006-04-25 20:09   ` Felix E. Klee
  2006-04-25 19:59 ` Felix E. Klee
  2 siblings, 1 reply; 11+ messages in thread
From: Jonas Eckerman @ 2006-04-25 15:09 UTC (permalink / raw)
  To: linux-msdos

Felix E. Klee wrote:

> When I try to execute a program named "retrieve.exe" in Freedos under
> Dosemu 1.2.2, then I get the error message "runtime error 200 at
> 001D:233A.".

That error means "Division by zero".

It is *sometimes* caused by a bad piece of timer initialisation combined with fast processors.

>   >tppatch retrieve.exe

IIRC that patch is only for programs compiled with Turbo/Borland Pascal AFAIK. It's possible that it only handles code using Borlands CRT unit as well.

Also, IIRC some patches for this problem simply replaced a value with a higher value rather than actually replace the bad code. The result was that the code worked for another couple of years, but eventually started failing again when CPUs became a lot faster.

Not sure if that was TPPatch or some other patcher.

> Well, since the runtime error is most likely due to a processor which is

I could be becuase of that, but it is entirely possible that the code tries to divide something by zero for some other reason as well.

> too fast, the only solution left seems to be throttling of Dosemu.

You don't need to slow down Dosemu, you need to slow down the buggy program.

I've got a small piece of code I call Bx200Fix.exe that usually works for this.
I don't know if attaches are ok on this list, so I just put it up for download from
<http://mmm.truls.org/j/>

Simply run it with the program you want to run as parameter. Like this:
bx200fix retrieve.exe
bx200fix retrieve.exe someparameter

If that doesnät work, run it like this instead:
bx200fix ?retrieve.exe
bx200fix ?retrieve.exe someparameter

Without the '?' it just tries to hide the problem when the app is starting, with the '?' it keeps doing it til the app exits.

It's just a quick hack and has at least one possible problem:
It does not copy the parameter data *exactly* to the program it calls.
Usually this doesn't matter though.

Use it if you like it. And you may distribute it anyway you like as well.

Regards
/Jonas


-- 
Jonas Eckerman, FSDB & Fruktträdet
http://whatever.frukt.org/
http://www.fsdb.org/
http://www.frukt.org/

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-22 20:29 Runtime error 200 => How to slow down dosemu? Felix E. Klee
  2006-04-25  5:09 ` John Coppens
  2006-04-25 15:09 ` Jonas Eckerman
@ 2006-04-25 19:59 ` Felix E. Klee
  2006-04-25 21:14   ` Felix E. Klee
  2 siblings, 1 reply; 11+ messages in thread
From: Felix E. Klee @ 2006-04-25 19:59 UTC (permalink / raw)
  To: linux-msdos

At Sat, 22 Apr 2006 22:29:30 +0200,
Felix E. Klee wrote:
> When I try to execute a program named "retrieve.exe" in Freedos under
> Dosemu 1.2.2, then I get the error message "runtime error 200 at
> 001D:233A.".

I finally got it to work. :-) First, I applied CTBPPAT.EXE with default
divisor 55:

  >ctbppat.exe retrieve.exe

Then I applied mpatch2.exe:

  >mpatch2.exe retrieve.exe

Both programs actually modified the file, though the first modification
was, I guess, superfluous.  BTW, in the directory containing
"retrieve.exe" there were also the files "dpmi16bi.ovl" and "rtm.exe".
I doubt that they are of any relevance, and I don't think that any of
the patch programs touched them.

Further info:

* Overview about another program having the same problem and how to fix
  it (in German):

  <URL:http://www.muenster.de/~matthias/aladin/fehler.htm>

* Source for mpatch2.exe:

  <URL:http://www.muenster.de/~matthias/aladin/mpatch2.zip>

* Source for ctbppat.exe:

  <URL:http://www.heise.de/ct/ftp/result.xhtml?url=/ct/ftp/ctsi.shtml&wo
  rds=ctbppat%20zip>

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-25 15:09 ` Jonas Eckerman
@ 2006-04-25 20:09   ` Felix E. Klee
       [not found]     ` <444F3DC7.3060508@frukt.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Felix E. Klee @ 2006-04-25 20:09 UTC (permalink / raw)
  To: linux-msdos

At Tue, 25 Apr 2006 17:09:24 +0200,
Jonas Eckerman wrote:
> Simply run it with the program you want to run as parameter. Like
> this:
> bx200fix retrieve.exe
> bx200fix retrieve.exe someparameter

Thanks very much for your help.  However, this didn't work, neither with
"?" nor without "?".  IIRC, when calling "bx200fix ?retrieve.exe" or
"bx200fix retrieve.exe" just nothing happened, i.e. I was returned right
to the prompt.

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-25  5:09 ` John Coppens
@ 2006-04-25 20:13   ` Felix E. Klee
  0 siblings, 0 replies; 11+ messages in thread
From: Felix E. Klee @ 2006-04-25 20:13 UTC (permalink / raw)
  To: linux-msdos

At Tue, 25 Apr 2006 02:09:07 -0300,
John Coppens wrote:
> I seem to recall this problem occurs if the .exe was compressed with
> lzexe. I'm not completely sure, but I seem to remember you can detect
> that by checking the binary - at about 20-30 bytes from the beginning,
> there is a text 'LZ90'

Nothing there.  Thanks for the hint, though.

> BTW: there is an unlzexe somewhere on the 'net...

I already tried decompression with "unp", as described in my original
posting.

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-25 19:59 ` Felix E. Klee
@ 2006-04-25 21:14   ` Felix E. Klee
       [not found]     ` <32603e510604251425r24ef7662q395b00a6bb8f7144@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Felix E. Klee @ 2006-04-25 21:14 UTC (permalink / raw)
  To: linux-msdos

At Tue, 25 Apr 2006 21:59:25 +0200,
Felix E. Klee wrote:
> > When I try to execute a program named "retrieve.exe" in Freedos under
> > Dosemu 1.2.2, then I get the error message "runtime error 200 at
> > 001D:233A.".
> 
> I finally got it to work. :-) 

I have to take that back: It's working when the machine is throttled to
800MHz, but not when it's running at full speed.  This is driving me
nuts. :-(

I guess, the only reliable solution is DosBox where one can, to my
knowledge, adjust what speed the emulated processor should have.  Of
course, it requires a lot more resources, but this should not be too
much of an issue.

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
       [not found]     ` <32603e510604251425r24ef7662q395b00a6bb8f7144@mail.gmail.com>
@ 2006-04-26  6:32       ` Felix E. Klee
  0 siblings, 0 replies; 11+ messages in thread
From: Felix E. Klee @ 2006-04-26  6:32 UTC (permalink / raw)
  To: linux-msdos

At Tue, 25 Apr 2006 21:25:54 +0000,
Einar Indridason wrote:
> (Or alternatively, start the program "slowly", and then after that
> check has run, increase speed to full throttle.)

It doesn't even have to run at full throttle, running it slowly all the
time would be fine.

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
       [not found]     ` <444F3DC7.3060508@frukt.org>
@ 2006-04-26 18:43       ` Felix E. Klee
  2006-04-26 19:42         ` Felix E. Klee
  0 siblings, 1 reply; 11+ messages in thread
From: Felix E. Klee @ 2006-04-26 18:43 UTC (permalink / raw)
  To: linux-msdos

At Wed, 26 Apr 2006 11:30:47 +0200,
Jonas Eckerman wrote:
> Were you in the same directory as "retrieve.exe" when doing this?
> If not: Did you try with the full path to retrieve.exe?

That's what I tried, and, contrary to what I said before, I get the
runtime error message, i.e. I don't get just nothing.

However: I just tried it again with the version of "Retrieve.exe"
patched with "CTBPPAT.EXE" and "mpatch2.exe" (see my message with
Message-ID <87psj5whnm.wl%felix.klee@inka.de>).  And: This time it
works, even at 1.8GHz!

Thanks a lot for this nice tool!  Hopefully, the error message won't
resurface.

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-26 18:43       ` Felix E. Klee
@ 2006-04-26 19:42         ` Felix E. Klee
  2006-04-27 15:24           ` Mike McCarty
  0 siblings, 1 reply; 11+ messages in thread
From: Felix E. Klee @ 2006-04-26 19:42 UTC (permalink / raw)
  To: linux-msdos

At Wed, 26 Apr 2006 20:43:21 +0200,
Felix E. Klee wrote:
> Hopefully, the error message won't resurface.

It just did. :-(

-- 
Felix E. Klee

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Runtime error 200 => How to slow down dosemu?
  2006-04-26 19:42         ` Felix E. Klee
@ 2006-04-27 15:24           ` Mike McCarty
  0 siblings, 0 replies; 11+ messages in thread
From: Mike McCarty @ 2006-04-27 15:24 UTC (permalink / raw)
  To: linux-msdos

Felix E. Klee wrote:
> At Wed, 26 Apr 2006 20:43:21 +0200,
> Felix E. Klee wrote:
> 
>>Hopefully, the error message won't resurface.
> 
> 
> It just did. :-(

How big is this program? Would it violate your license to send
me a copy?

"Runtime error 200" is a report, AFAIK originating only with
Borland's Turbo Pascal, reporting division by 0. When the error
occurs, the instruction pointer (IP) gets reported. Is it always
the same? There is a common cause of that report occurring which
is in the initialization of the counter used in the delay()
procedure for creating millisecond resolution delays during
execution. But this is not the only possible cause. Your program
may have other causes for division by zero. Some or all of these
may be related to the speed of execution.

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-04-27 15:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-22 20:29 Runtime error 200 => How to slow down dosemu? Felix E. Klee
2006-04-25  5:09 ` John Coppens
2006-04-25 20:13   ` Felix E. Klee
2006-04-25 15:09 ` Jonas Eckerman
2006-04-25 20:09   ` Felix E. Klee
     [not found]     ` <444F3DC7.3060508@frukt.org>
2006-04-26 18:43       ` Felix E. Klee
2006-04-26 19:42         ` Felix E. Klee
2006-04-27 15:24           ` Mike McCarty
2006-04-25 19:59 ` Felix E. Klee
2006-04-25 21:14   ` Felix E. Klee
     [not found]     ` <32603e510604251425r24ef7662q395b00a6bb8f7144@mail.gmail.com>
2006-04-26  6:32       ` Felix E. Klee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.