[comp.lang.pascal] bined.obj

pemmc@rivm02.rivm.nl (Mat Claessen) (02/27/91)

Does anyone know a site from which I can FTP the file BINED.OBJ ?
This is the assembler part of the binary editor, included with
Borland's Editor Toolbox 4.0. The original version is not compatible
with TP 6.0. Borland offers a new version on Compuserve, but I'm
afraid I don't have access to that. I wrote Borland with my serial
numbers and all, but received no reply (yet ?).

Thanks,

Matt Claessen
pemmc@rivm02.rivm.nl
-------------------------------------------------------
-------------------------------------------------------

fehr@ms.uky.edu (Jeffrey Davis) (03/01/91)

In article <1991Feb27.153751.23339@rivm.nl> pemmc@rivm02.rivm.nl (Mat Claessen) writes:
>Does anyone know a site from which I can FTP the file BINED.OBJ ?
>This is the assembler part of the binary editor, included with
>Borland's Editor Toolbox 4.0. The original version is not compatible
>with TP 6.0. Borland offers a new version on Compuserve, but I'm
>afraid I don't have access to that. I wrote Borland with my serial
>numbers and all, but received no reply (yet ?).
>
Post this info if possible. I, too, have that Toolbox and have been unable
to update and do not have Compuserve access.

Will this be true of all those OBJ files people pass around?
-- 
davis@ca.uky.edu 

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (03/01/91)

In article <1991Feb28.161534.26947@ms.uky.edu> fehr@ms.uky.edu (Jeffrey Davis) writes:
>In article <1991Feb27.153751.23339@rivm.nl> pemmc@rivm02.rivm.nl (Mat Claessen) writes:
>>Does anyone know a site from which I can FTP the file BINED.OBJ ?
>>This is the assembler part of the binary editor, included with
>>Borland's Editor Toolbox 4.0. The original version is not compatible
>>with TP 6.0. 

>Post this info if possible. I, too, have that Toolbox and have been unable
>to update and do not have Compuserve access.
>
>Will this be true of all those OBJ files people pass around?

I wrote this to Mat, but it looks like it may be of general interest, even 
though it's rather vague information.

First, there are no differences in the interface that will cause bug-free
.OBJ files that work with 5.5 to stop working with 6.0.  So what's the problem
with BINED.OBJ?  It's not bug-free.  One of the routines in it (and I wish I
could find the message I saw on Fidonet saying just which one it is) doesn't
clean up the stack properly on return.

This is a bug, but in TP 5.5, it didn't matter.  Routines there always restore
the stack pointer before they do a return, so the extra word(s?) on the stack
didn't cause any trouble.  However, one of the optimizations in 6.0 is to
skip the restore of SP from BP when there aren't any local variables.  This
means that any routine that you call *must* remove its parameters from the
stack properly, or the caller will crash when it tries to return.

So, to fix this you have two choices:  you can get the fixed up BINED.OBJ
from Compuserve or elsewhere, or you can just make sure that when you call
that buggy BINED routine you have local variables.  This means adding

  var
    junk : integer;

to the routine that calls into BINED.  (I can't remember the name of it,
either).  

You can find which routine is the bad one by tracing through a program 
using BINED until it crashes, or hoping that my posting will trigger someone's
memory and the name will show up here.

By the way, one of the plotting routines in the GRAPH3 unit has the same 
problem:  it leaves one of its parameters on the stack.  In this case I'm
pretty sure it's the PLOT routine.

Duncan Murdoch

fehr@ms.uky.edu (Jeffrey Davis) (03/02/91)

Thanks to Norman Walsh for the info on BINED.OBJ. My e-mail
thank you note bounced.

-- 
davis@ca.uky.edu