Borland C++ reference

segread

raw OCR

Reads segment registers.

Defined in header <dos.h>

Syntax

#include <dos.h>
void segread(struct SREGS  *segp);

Portability

DOSUNIXWindowsANSI CC++ only
■■

Remarks

segread places the current values of the segment registers into the structure pointed to by segp.

This call is intended for use with intdosx and int86x.

Return value

None.

See also

Example

*include <stdio.h>
#include <dos.h>
int main(void)
{
   struct SREGS segs;
   segread(&segs);
   printf("Current segment register settings\n\n") ;
   printfC'CS: %X   DS: %X\n", segs.cs, segs.ds);
   printf("ES: %X   SS: %X\n", segs.es, segs.ss);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.