Choose Category
#include <dos.h> /* for segread() and struct SREGS */ #include <stdio.h> /* for printf() */ struct SREGS segregs; void main() { segread(&segregs); printf("CS: %u DS: %u ES: %u SS: %u\n", segregs.cs, segregs.ds, segregs.es, segregs.ss); }