get the values of the segment registers
#include <i86.h> void segread( struct SREGS *seg_regs );
The segread() function places the values of the segment registers in the structure located by seg_regs.
#include <stdio.h> #include <i86.h> void main() { struct SREGS sregs; segread( &sregs ); printf( "Current value of CS is %04X\n", sregs.cs ); }
WATCOM
All (except DOS/PM)