Re: [fpc-pascal] Delphi-FPC portable code for endian conversion

2016-06-04 Thread Sven Barth
Am 04.06.2016 00:40 schrieb "Bo Berglund" : > > On Sat, 4 Jun 2016 00:05:21 +0200, Sven Barth > wrote: > > >FPC's NToBE and BEToN routines indeed only convert if necessary. I don't > >know about the Delphi's Swap routines, but alone from the name I'd say that > >they swap unconditionally (though c

Re: [fpc-pascal] Delphi-FPC portable code for endian conversion

2016-06-03 Thread Bo Berglund
On Sat, 4 Jun 2016 00:05:21 +0200, Sven Barth wrote: >FPC's NToBE and BEToN routines indeed only convert if necessary. I don't >know about the Delphi's Swap routines, but alone from the name I'd say that >they swap unconditionally (though considering that Delphi runs only on >little endian CPUs t

Re: [fpc-pascal] Delphi-FPC portable code for endian conversion

2016-06-03 Thread Sven Barth
Am 03.06.2016 22:08 schrieb "Bo Berglund" : > > I have a class file implementing interfaces for talking to an embedded > system and I intend to use this class for both Delphi (on Windows) and > FPC (on ARM Linux) > One part of this class deals with transfers of binary data to/from the > embedded sy

[fpc-pascal] Delphi-FPC portable code for endian conversion

2016-06-03 Thread Bo Berglund
I have a class file implementing interfaces for talking to an embedded system and I intend to use this class for both Delphi (on Windows) and FPC (on ARM Linux) One part of this class deals with transfers of binary data to/from the embedded system, which is based on a Motorola MCU and is BigEndian.