Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ segread(DOS) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought

     Name
          segread - Fills a structure with the contents of a register.

     Syntax
          #include <dos.h>

          void segread(segregs)
          struct SREGS *segregs;

     Description
          The segread function fills the structure pointed to by
          segregs with the current contents of the segment registers.
          The SREGS union is described on the int86x manual page.
          This function is intended to be used with the intdosx and
          int86x functions to retrieve segment-register values for
          later use.

     Return Value
          None.

     See Also
          FP_SEG(DOS), intdosx(DOS), int86x(DOS)

     Example
          #include <dos.h> struct SREGS segregs; unsigned int cs, ds,
          es, ss; main()
           {      /* Read the segment register values */
                  segread(&segregs);
                  cs = segregs.cs;
                  ds = segregs.ds;
                  es = segregs.es;
                  ss = segregs.ss;
                  printf("cs = %x, ds = %x, es = %x, ss = %x\n", cs,
          ds, es, ss);
           } This program uses segread to obtain the current values of
          the segment registers, then displays these values.

                                                (printed 6/18/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026