Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>segread</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
segread

Usage

   #include <dos.h>            /* register structures */
   void segread(struct SREGS *segregs);

Description

   Reads segment register values and puts them in SREGS.

   In the X and P memory models, this function returns protected mode
   segment selectors, not real mode segment values.

Example 

   #include <dos.h>
   #include <stdio.h>
   #include <stdlib.h>

   struct SREGS segregs;
   unsigned code_seg, data_seg, stack_seg, extra_seg;

   int main()
   {
       segread(&segregs);
       code_seg = segregs.cs;
       stack_seg = segregs.ss;
       data_seg = segregs.ds;
       extra_seg = segregs.es;
       printf("\nSegment registers currently contain:\n");
       printf("\nCS: %4x\nDS: %4x\nSS: %4x\nES: %4x\n",
           code_seg, data_seg, stack_seg, extra_seg);
       return EXIT_SUCCESS;
   }

See Also

   intdosx, int86x, getDS




See Also: intdosx int86x getDS

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson