Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > what are REGS,SREGS ?

Reply
Thread Tools

what are REGS,SREGS ?

 
 
rahul8143@gmail.com
Guest
Posts: n/a
 
      10-05-2005
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;

 
Reply With Quote
 
 
 
 
Skarmander
Guest
Posts: n/a
 
      10-05-2005
wrote:
> 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.
 
Reply With Quote
 
 
 
 
A. Sinan Unur
Guest
Posts: n/a
 
      10-05-2005
wrote in news:1128534736.435075.269810
@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. Sinan Unur <>
(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
 
Reply With Quote
 
Alexei A. Frounze
Guest
Posts: n/a
 
      10-05-2005
<> wrote in message
news: oups.com...
> 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


 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      10-05-2005
Alexei A. Frounze wrote:
>
> 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!!!
 
Reply With Quote
 
Alexei A. Frounze
Guest
Posts: n/a
 
      10-05-2005
"jacob navia" <> wrote in message
news:43445a8d$0$7832$...
> Alexei A. Frounze wrote:
> >
> > 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!!!


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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57