I am writing a Delphi app to read/write data files created by an old DOS app written in C ( Armor Systems - Advantage).
I am stuck trying to read a field used to figure mark-up percentages. They are storing this field in "Motorola model" which I assume means "Big Endian" order. Their instructions are to:
1. read the data as a long
2. swap the bytes to "Little Endian"
3. move into a double
4. multiply this by 0.0001
I assume Delphi's LongInt is the equivalent of C's Long. When I enter 30.00 in the DOS software, it stores $000493E0
in the file field. Converting this to Little Endian gives $E0930400. At this point I am lost. Can anyone help point me in the right direction?
I am stuck trying to read a field used to figure mark-up percentages. They are storing this field in "Motorola model" which I assume means "Big Endian" order. Their instructions are to:
1. read the data as a long
2. swap the bytes to "Little Endian"
3. move into a double
4. multiply this by 0.0001
I assume Delphi's LongInt is the equivalent of C's Long. When I enter 30.00 in the DOS software, it stores $000493E0
in the file field. Converting this to Little Endian gives $E0930400. At this point I am lost. Can anyone help point me in the right direction?