segread
raw OCR
Reads segment registers.
Defined in header <dos.h>
Syntax
#include <dos.h>
void segread(struct SREGS *segp);
Portability
| DOS | UNIX | Windows | ANSI C | C++ 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.
Stable link: /3.1/dos.h/segread/
· short form /3.1/segread/