Mail Archives: djgpp/1996/08/29/17:24:14
fredex AT fcshome DOT stoneham DOT ma DOT us wrote in article
<199608290018 DOT UAA04849 AT fcshome DOT stoneham DOT ma DOT us>...
| Thinking furiously, John M. Aldrich wrote:
| > William Merril wrote:
| > > When compiling the library, I get warnings that segread() is
| > > implicitly defined, which it is. segread should be defined in
| > > dos.h, but I can't find it anywhere.
| > >
| > > Does anyone have a suggestion or clue?
| >
| > This may be a M$-specific function. Please describe its purpose
| > and we'll try to suggest a DJGPP equivalent.
|
| From my (ancient ;-) docs for MSC 5.1:
| The segread function fills the structure pointed to by segregs with
| the current contents of the segment registers. The SREGS union is
| described in the reference page for int86x. This function is intended
| to be used with the intdosx and int86x functions to retrieve segment-
| register values for later use.
Well, if you need the segment registers for your program, you can always call
_go32_my_cs() {to get the current CS}
_go32_my_ds() {to get the current DS which I believe is also the current ES}
_go32_my_ss() {to get the current SS}
FS is free for programmer use (if you really need it an `asm volatile("movw
%%fs,%1":"=q" (my_fs));' can fetch it for you. my_fs is the destination
variable and can be local). GS is reserved for the C runtime library.
--
+------------------------+----------------------+
| Mike Marcelais | Excel Developer and |
| michmarc AT microsoft DOT com | Magic Rules Guru |
+------------------------+----------------------+
| Opinions expressed in this post are mine, and |
| do not necessarily reflect those of Microsoft |
+--= Moonstone Dragon =---------------= UDIC =--+
- Raw text -