X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: DS and ESP Date: 22 Feb 2002 13:46:06 GMT Organization: Ericsson Erisoft AB, Sweden Lines: 32 Message-ID: References: <968-Mon18Feb2002212153+0200-eliz AT is DOT elta DOT co DOT il> NNTP-Posting-Host: lws256.lu.erisoft.se X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com MarKol (markol4 AT wp DOT pl) wrote: : : Użytkownik "Eli Zaretskii" napisał w wiadomości : : DS may become invalid if a signal happens, like if you press Ctrl-C : : or run with timers. The library provides a special alias selector, : : __djgpp_ds_alias, which is always valid and spans the same memory : : region as the selector normally loaded into DS. : Yes, but how do I load this __djgpp_ds_alias selector when my ds : is invalid?? You use CS which is valid: mov ax, cs:__djgpp_ds_alias : But I think this will work : and I'm able to load proper ds segment in my wrapper routine. : I can put something like this in my wrapper: : . : . : . : mov ax, 0 : mov ds, ax If this is in protected mode, you have an exception the moment you access any data. Right, MartinS