delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/17/09:25:27

Date: Mon, 17 Jan 94 09:12:34 -0500
From: DJ Delorie <dj AT ctron DOT com>
To: ptan AT compudyn DOT com
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: IDTR and GDTR bases in go32

> typedef struct {
>     unsigned short int limit;
>     unsigned long int  base;
> } IDTR;
> typedef struct {
>     unsigned short int limit;
>     unsigned long int  base;
> } GDTR;
> typedef struct {
>     unsigned short int limit;
>     unsigned long int  base;
> } LDTR;

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.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019