what are REGS,SREGS ?

R

rahul8143

hello,
I want to know for what purpose union REGS and struct SREGS are
used in windows programming? also how following code an determine that
running OS is windows?
in_regs.x.ax = 0x160A;
int86x(0x2F, &in_regs, &out_regs, &seg_regs);
if (out_regs.x.ax == 0)
Running_WIN=TRUE;
provided here
union REGS in_regs, out_regs;
struct SREGS seg_regs;
 
S

Skarmander

hello,
I want to know for what purpose union REGS and struct SREGS are
used in windows programming? also how following code an determine that
running OS is windows?
<snip>

Off-topic. Take it to comp.os.ms-windows.programmer, please.

S.
 
A

A. Sinan Unur

(e-mail address removed) wrote in @g49g2000cwa.googlegroups.com:
hello,
I want to know for what purpose union REGS and struct SREGS are
used in windows programming?

Hmmm ... Wrong group. Try comp.os.ms-windows.programmer.*
also how following code an determine that
running OS is windows?
in_regs.x.ax = 0x160A;
int86x(0x2F, &in_regs, &out_regs, &seg_regs);
if (out_regs.x.ax == 0)
Running_WIN=TRUE;
provided here
union REGS in_regs, out_regs;
struct SREGS seg_regs;

You would need to find out what int86x does, and then find out the
meanings of the parameters, and figure out what interrupt 0x2f does on
Windows. Google is your friend. Look for "Ralph Brown's Interrupt List".

Sinan
 
A

Alexei A. Frounze

I want to know for what purpose union REGS and struct SREGS are
used in windows programming? also how following code an determine that
running OS is windows?

First of all, these types and the intel 80x86 CPU architecture are beyond
the scope of the standard C, and so is the compiler having support for them.
in_regs.x.ax = 0x160A;
int86x(0x2F, &in_regs, &out_regs, &seg_regs);
if (out_regs.x.ax == 0)
Running_WIN=TRUE;
provided here
union REGS in_regs, out_regs;
struct SREGS seg_regs;

As it has already been pointed out, for more on the DOS/windows interrupts,
see the Ralf Brown's Interrupt List freely available on the net. If you want
to know more about the intel 80x86 CPUs, you're welcome to
http://developer.intel.com -- get yourself free intel manuals, called
something like intel ia32 software architecture -- they're 3 volumes under
this name. If you want to know more about REGS and SREGS, please study the
documentation of your compiler. Borland C/C++ compiler for DOS comes with
built in help in the IDE, Watcom C/C++ compiler also comes with the full
documentation -- these are two compilers which I know to support this
feature.

Alex
 
J

jacob navia

Alexei said:
As it has already been pointed out, for more on the DOS/windows interrupts,
see the Ralf Brown's Interrupt List freely available on the net. If you want
to know more about the intel 80x86 CPUs, you're welcome to
http://developer.intel.com -- get yourself free intel manuals, called
something like intel ia32 software architecture -- they're 3 volumes under
this name. If you want to know more about REGS and SREGS, please study the
documentation of your compiler. Borland C/C++ compiler for DOS comes with
built in help in the IDE, Watcom C/C++ compiler also comes with the full
documentation -- these are two compilers which I know to support this
feature.

Alex


AND PLEEEEEESE REMEMBER:

THAT WILL NOT WORK UNDER WINDOWS!!!
 
A

Alexei A. Frounze

jacob navia said:
AND PLEEEEEESE REMEMBER:
THAT WILL NOT WORK UNDER WINDOWS!!!

Not as part of a win32 program, that's for sure. The O.P. didn't say he
would execute that code in a win32 app.

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top