@simplex
Well, when your running programs side by side some 32bit 680x0 programs, some PowerPC programs, the data has to be the same for PowerPC programs and 680x0 program, and it is, this is way this works. Its just program but its also mix and match of 680x0 libraries and PowerPC libraries.
Yes if you are not running 680x0 programs, you can forget about that problem, but then is lots of programs you must run in an emulator.
the thing you see is like code cast a (unsigned int *) into a (unsigned short *), you pick the upper 16bit, if its powerpc, if its intel it lower 16bit. And this the problem, when you are dealing with compiled programs, also you have union’s, this will also break.
typedef union { unsigned int data; struct { unsigned short high; unsigned short low; } } smart_t;
has to be rewritten on Intel as:
typedef union { unsigned int data; struct { unsigned short low; unsigned short high; } } smart_t;
in short C/C++ code is not cross platform language, its not like Javascript or Java, the CPU family is important.
Last edited by NutsAboutAmiga on 16-Apr-2021 at 12:48 AM. Last edited by NutsAboutAmiga on 15-Apr-2021 at 10:54 PM. Last edited by NutsAboutAmiga on 15-Apr-2021 at 10:49 PM. Last edited by NutsAboutAmiga on 15-Apr-2021 at 10:49 PM.
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |