Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-14 Thread Ralf Quint

On 11/14/2018 4:45 AM, Marco van de Voort wrote:


Op 2018-11-14 om 13:44 schreef Ozz Nixon:
Thank you all ... I am on the road, when I get back, I will track 
down TUnitHeader, TObjectTypeDefinition, TOrdinalTypeDefinition - and 
post those structures. My problem was changing the above to simple:

 PreviousUnitAddressOffset:=TUnitHeader.PreviousUnitAddress;

does not work, I think they are constants - I will have to dig back 
through the code. (It's from 1995, written by Anders Hejlsberg, so it 
does a lot of odd ASM things).


Internal identifiers are not always the same between FPC and Delphi. 
It might not be possible at all, so you need to find out why these are 
needed. 


+1

I was not sure, having nothing but that little snippet of code, if this 
was something trying to do internal to the compiler or if that was part 
of some data conversion tool.


If this is indeed accessing some Delphi internal data structures, I 
think nobody can seriously expect FreePascal to be binary compatible. It 
is (tries to be) source code compatible, as much as feasible. But 
anything beyond that,...


Ralf


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-14 Thread Marco van de Voort


Op 2018-11-14 om 13:44 schreef Ozz Nixon:
Thank you all ... I am on the road, when I get back, I will track down 
TUnitHeader, TObjectTypeDefinition, TOrdinalTypeDefinition - and post 
those structures. My problem was changing the above to simple:

 PreviousUnitAddressOffset:=TUnitHeader.PreviousUnitAddress;

does not work, I think they are constants - I will have to dig back 
through the code. (It's from 1995, written by Anders Hejlsberg, so it 
does a lot of odd ASM things).


Internal identifiers are not always the same between FPC and Delphi. It 
might not be possible at all, so you need to find out why these are needed.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-14 Thread Ozz Nixon
Thank you all ... I am on the road, when I get back, I will track down
TUnitHeader, TObjectTypeDefinition, TOrdinalTypeDefinition - and post those
structures. My problem was changing the above to simple:
   PreviousUnitAddressOffset:=TUnitHeader.PreviousUnitAddress;

does not work, I think they are constants - I will have to dig back through
the code. (It's from 1995, written by Anders Hejlsberg, so it does a lot of
odd ASM things).

Ozz

On Tue, Nov 13, 2018 at 1:31 PM Ralf Quint  wrote:

> On 11/12/2018 7:37 AM, Ozz Nixon wrote:
>
> I have these last couple of lines to port to FPC -Mdelphi, but everything
> I try fails...
>
> Asm
> MOV  PreviousUnitAddressOffset,
> TUnitHeader.PreviousUnitAddress
> MOV  PreviousLibraryUnitAddressOffset,
> TUnitHeader.PreviousLibraryUnitAddress
> MOV  AncestorTypeDefinitionOffset,
> TObjectTypeDefinition.AncestorTypeOffset
> MOV  OrdinalTypeDefLowerLimitOffset,
>  TOrdinalTypeDefinition.LowerLimit
> MOV  OrdinalTypeDefUpperLimitOffset,
>  TOrdinalTypeDefinition.UpperLimit
> end;
>
> Well, as others already mentioned, it is hard to give proper advice
> without having a reproducible piece of code.
>
> Just looking at the snippet above, I would start with questioning if there
> isn't a more "Pascal way" to do this, whatever this piece of code is trying
> to accomplish...
>
> Ralf
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_-1587466564115926972_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-13 Thread Ralf Quint

On 11/12/2018 7:37 AM, Ozz Nixon wrote:
I have these last couple of lines to port to FPC -Mdelphi, but 
everything I try fails...


Asm
    MOV PreviousUnitAddressOffset, TUnitHeader.PreviousUnitAddress
    MOV PreviousLibraryUnitAddressOffset, 
TUnitHeader.PreviousLibraryUnitAddress
    MOV AncestorTypeDefinitionOffset, 
TObjectTypeDefinition.AncestorTypeOffset

    MOV OrdinalTypeDefLowerLimitOffset,  TOrdinalTypeDefinition.LowerLimit
    MOV OrdinalTypeDefUpperLimitOffset,  TOrdinalTypeDefinition.UpperLimit
end;


Well, as others already mentioned, it is hard to give proper advice 
without having a reproducible piece of code.


Just looking at the snippet above, I would start with questioning if 
there isn't a more "Pascal way" to do this, whatever this piece of code 
is trying to accomplish...


Ralf



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-12 Thread Sven Barth via fpc-devel
Am Di., 13. Nov. 2018, 00:05 hat Ozz Nixon  geschrieben:

> Its part of 30+ units. In the main units Initialization...
>

We can't help you if we don't have a complete code snippet that should
compile as only then we can test it ourselves. Otherwise we e.g. need to
guess the types of the variables, potentially picking one that would
compile and you wouldn't be helped either.

Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-12 Thread Ozz Nixon
Its part of 30+ units. In the main units Initialization...

On Mon, Nov 12, 2018 at 6:03 PM Ozz Nixon  wrote:

> Its from D7... and does compile.
>
> On Mon, Nov 12, 2018 at 5:59 PM Marco van de Voort <
> c...@pascalprogramming.org> wrote:
>
>>
>> Op 11/12/2018 om 4:37 PM schreef Ozz Nixon:
>>
>> I have these last couple of lines to port to FPC -Mdelphi, but everything
>> I try fails...
>>
>>
>> Well, it doesn't compile in delphi either. Seems it is not a complete
>> program.
>> ___
>> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>>
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-12 Thread Ozz Nixon
Its from D7... and does compile.

On Mon, Nov 12, 2018 at 5:59 PM Marco van de Voort <
c...@pascalprogramming.org> wrote:

>
> Op 11/12/2018 om 4:37 PM schreef Ozz Nixon:
>
> I have these last couple of lines to port to FPC -Mdelphi, but everything
> I try fails...
>
>
> Well, it doesn't compile in delphi either. Seems it is not a complete
> program.
> ___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] How to move this, but in FPC 32bit?

2018-11-12 Thread Marco van de Voort


Op 11/12/2018 om 4:37 PM schreef Ozz Nixon:
I have these last couple of lines to port to FPC -Mdelphi, but 
everything I try fails...


Well, it doesn't compile in delphi either. Seems it is not a complete 
program.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel