what are REGS,SREGS ?

Discussion in 'C Programming' started by rahul8143@gmail.com, Oct 5, 2005.

  1. Guest

    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;
     
    , Oct 5, 2005
    #1
    1. Advertising

  2. Skarmander Guest

    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.
     
    Skarmander, Oct 5, 2005
    #2
    1. Advertising

  3. 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/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Oct 5, 2005
    #3
  4. <> wrote in message
    news:...
    > 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
     
    Alexei A. Frounze, Oct 5, 2005
    #4
  5. jacob navia Guest

    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!!!
     
    jacob navia, Oct 5, 2005
    #5
  6. "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
     
    Alexei A. Frounze, Oct 6, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Karl Core

    Any regs up for a CSS challenge

    Karl Core, Feb 20, 2005, in forum: HTML
    Replies:
    2
    Views:
    419
    Augustus
    Feb 21, 2005
  2. Rod Pemberton

    RE: union REGS don't get DOS Version

    Rod Pemberton, Feb 8, 2006, in forum: C Programming
    Replies:
    1
    Views:
    502
    Bruno Barros
    Feb 9, 2006
  3. Marcpp
    Replies:
    1
    Views:
    273
    Jorgen Bodde
    Jun 12, 2007
  4. vicky
    Replies:
    4
    Views:
    394
    osmium
    Jun 25, 2007
  5. Ben Bacarisse
    Replies:
    5
    Views:
    339
Loading...

Share This Page