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>getds</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
getDS

Usage

   #include <io.h>
   int getDS(void);

Description

   getDS returns the value of the data segment register.

   In the X and P memory models, getDS returns the actual value in the DS
   register. This will be the protected mode segment selector. This is not
   the base address of DGROUP. You should use __X386_get_abs_addr() to find
   DGROUP.

Example 

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

   int main()
   {
       unsigned int data_seg;
       data_seg = getDS();
       printf("The current contents of DS are %x\n",
   data_seg);

       return EXIT_SUCCESS;
   }

Return Value

   The current value in the data segment register DS is returned.

See Also

   segread



See Also: segread

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