[fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-03 Thread _-jane-_
Hello! In order to address the endian problem I use some auxiliary types to access the entities: (* Standard types *) type t_32u=longint; // 32 bit unsigned t_bool=boolean; (* Endian types *) (*$a1 *) type t_intel_32u=object // Delphi forbids "packed object"; trusting $a1 instead...

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Mark Morgan Lloyd
Thomas Schatzl wrote: Hi, Or maybe this is a moot question if FPC is only so far running on platforms that have the same endian as x86 CPU:s? I have no information on this though... I can see at least these targets: - Windows and Linux on x86 CPU:s - Embedded Linux on ARM CPU:s Sparc, PowerP

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Thomas Schatzl
Hi, > Or maybe this is a moot question if FPC is only so far running on > platforms that have the same endian as x86 CPU:s? I have no > information on this though... > > I can see at least these targets: > - Windows and Linux on x86 CPU:s > - Embedded Linux on ARM CPU:s Sparc, PowerPC are big en

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Marco van de Voort
In our previous episode, Bo Berglund said: > Now, however, the problem may be complicated because the program may > well run on a CPU that is using the *same* endian structure as the > original instrument in which case of course the swaps should not be > done. Correct. > So I need some detector o

[fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
I am writing a serial communications program, which will connect to a data acquisition instrument and download data. I am using FPC/Lazarus in order to make the program platform independent so it can be deployed also on an embedded Linux system even though it is developed on Windows or Ubuntu on an