Date: Tue, 18 Jan 94 14:24:13 PDT From: Peter Crowley To: dj AT ctron DOT com, ptan AT compudyn DOT com Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re[2]: IDTR and GDTR bases in go32 >These structures are UNPACKED. They will not get the information >stored in them correctly, as there are four unused bytes between limit >and base to align the base to a 4 byte boundary. > >Try writing into an unsigned char[6] instead. > Will this work? #ifdef __GNUC__ /* HJB/POHC */ #define PACKED __attribute__ ((packed)); #else #define PACKED #endif typedef struct { unsigned short int limit; unsigned long int base PACKED; } IDTR; typedef struct { unsigned short int limit; unsigned long int base PACKED; } GDTR; typedef struct { unsigned short int limit; unsigned long int base PACKED; } LDTR; Peter Crowley Quarterdeck Offices Systems pcrowley AT qdeck DOT com