Register Structures for Turbo C and MS C
Turbo C MS C
struct WORDREGS struct WORDREGS
{ {
unsigned int ax; unsigned int ax;
unsigned int bx; unsigned int bx;
unsigned int cx; unsigned int cx;
unsigned int dx; unsigned int dx;
unsigned int si; unsigned int si;
unsigned int di; unsigned int di;
unsigned int cflag; unsigned int cflag;
unsigned int flags; };
};
struct BYTEREGS
{
unsigned char al;
unsigned char ah;
unsigned char bl;
unsigned char bh; <-- same as Turbo C
unsigned char cl;
unsigned char ch;
unsigned char dl;
unsigned char dh;
};
union REGS
{
struct WORDREGS x; <-- same as Turbo C
struct BYTEREGS h;
};
struct SREGS
{
unsigned int es;
unsigned int cs; <-- same as Turbo C
unsigned int ss;
unsigned int ds;
};
struct REGPACK
{
unsigned r_ax;
unsigned r_bx;
unsigned r_cx;
unsigned r_dx;
unsigned r_bp; Turbo C only
unsigned r_si;
unsigned r_di;
unsigned r_ds;
unsigned r_es;
unsigned r_flags;
};