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++ Language Reference - segread 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.

   Example
   #include <dos.h>
   #include <stdio.h>
   struct SREGS segregs;
   unsigned code_seg, data_seg, stack_seg, extra_seg;
   main()
   {
        segread(&segs);
        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);
   }


See Also: intdosx int86x getDS

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