News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

bitfield in masm

Started by Emil_halim, April 08, 2018, 12:06:57 AM

Previous topic - Next topic

Emil_halim

Hi all

what is the masm code that similar to this c struct
   
struct LDT_ENTRY {
  WORD    LimitLow;
  WORD    BaseLow;
  union {
    struct {
      BYTE    BaseMid;
      BYTE    Flags1;     // Declare as bytes to avoid alignment
      BYTE    Flags2;     // Problems.
      BYTE    BaseHi;
    } Bytes;
    struct {
      DWORD   BaseMid : 8;
      DWORD   _Type : 5;
      DWORD   Dpl : 2;
      DWORD   Pres : 1;
      DWORD   LimitHi : 4;
      DWORD   Sys : 1;
      DWORD   Reserved_0 : 1;
      DWORD   Default_Big : 1;
      DWORD   Granularity : 1;
      DWORD   BaseHi : 8;
    } Bits;
  } HighWord;
};


nidud

#1
deleted

Emil_halim