www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/30/09:23:53

From: Jianhua Cui <jcui AT nmt DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Change stack segment in ms-dos
Date: Tue, 29 Apr 1997 22:40:32 -0600
Organization: nmt
Lines: 15
Message-ID: <3366CD40.41C67EA6@nmt.edu>
NNTP-Posting-Host: charon.cs.nmt.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

we have two coroutines running in our program, we want to give each of
them separate segments, e.g. cs, ds,ss,fs,gs,es. but when we first
change the ss segment, it does not work, we assign an array big enough
to hold the ss segment, and put the ss selector in the ldt table of the
main program, assign the esp and ebp pointer in somewhere in the array
for ss.

when we write the new ss segment descriptor  in ldt the same as the
current ss, no problem, and if we change the limit part of ss segment
descriptor, it's okay, but when we use the our new ss base address, we
get the general protection fault, we use the same control bits as the
original ss descriptor, just change the base address, why we cann't
change it ? 

thanks very much for telling us.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019