Connecting Tech Pros Worldwide Forums | Help | Site Map

what are REGS,SREGS ?

rahul8143@gmail.com
Guest
 
Posts: n/a
#1: Nov 15 '05
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;


Skarmander
Guest
 
Posts: n/a
#2: Nov 15 '05

re: what are REGS,SREGS ?


rahul8143@gmail.com wrote:[color=blue]
> 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?[/color]
<snip>

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

S.
A. Sinan Unur
Guest
 
Posts: n/a
#3: Nov 15 '05

re: what are REGS,SREGS ?


rahul8143@gmail.com wrote in news:1128534736.435075.269810
@g49g2000cwa.googlegroups.com:
[color=blue]
> hello,
> I want to know for what purpose union REGS and struct SREGS are
> used in windows programming?[/color]

Hmmm ... Wrong group. Try comp.os.ms-windows.programmer.*
[color=blue]
> 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;[/color]

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. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)

comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html
Alexei A. Frounze
Guest
 
Posts: n/a
#4: Nov 15 '05

re: what are REGS,SREGS ?


<rahul8143@gmail.com> wrote in message
news:1128534736.435075.269810@g49g2000cwa.googlegr oups.com...[color=blue]
> 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?[/color]

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.
[color=blue]
> 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;[/color]

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


jacob navia
Guest
 
Posts: n/a
#5: Nov 15 '05

re: what are REGS,SREGS ?


Alexei A. Frounze wrote:[color=blue]
>
> 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[/color]


AND PLEEEEEESE REMEMBER:

THAT WILL NOT WORK UNDER WINDOWS!!!
Alexei A. Frounze
Guest
 
Posts: n/a
#6: Nov 15 '05

re: what are REGS,SREGS ?


"jacob navia" <jacob@jacob.remcomp.fr> wrote in message
news:43445a8d$0$7832$8fcfb975@news.wanadoo.fr...[color=blue]
> Alexei A. Frounze wrote:[color=green]
> >
> > As it has already been pointed out, for more on the DOS/windows[/color][/color]
interrupts,[color=blue][color=green]
> > see the Ralf Brown's Interrupt List freely available on the net. If you[/color][/color]
want[color=blue][color=green]
> > 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[/color][/color]
under[color=blue][color=green]
> > this name. If you want to know more about REGS and SREGS, please study[/color][/color]
the[color=blue][color=green]
> > documentation of your compiler. Borland C/C++ compiler for DOS comes[/color][/color]
with[color=blue][color=green]
> > 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[/color]
>
>
> AND PLEEEEEESE REMEMBER:
> THAT WILL NOT WORK UNDER WINDOWS!!![/color]

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


Closed Thread


Similar C / C++ bytes