delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/22/07:49:07

Message-ID: <19991022075024.4682.rocketmail@web115.yahoomail.com>
Date: Fri, 22 Oct 1999 00:50:24 -0700 (PDT)
From: Mohamed Saad <bazramit AT yahoo DOT com>
Subject: Re: exit makes my program crash (I can't!!)
To: djgpp AT delorie DOT com
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

>>
>> i have discovered that the program does NOT freeze!
>> the program has actually finished! but screen did
>not
>> return to text mode!! i became sure of this, as,
>after
>> the program freezed, i just typed 'exit' and i
>simply
>> returned back to windows!
>> This simply means that exit() does NOT always
return
>> back to text mode by itself! i HAVE to put the
>> following line:
>> screen.settext();
>> before ANY call to exit!!

>Or just put this in your atexit() handler. exit()
>always calls
>all installed atexit() handlers. Check the libc docs
>for
>more info.

well... thank you for the idea! but, i can't do this!
because any error messages that would have appeared on
the screen (after returning to text mode ,ofcourse,! a
typical example is the error message "Vesa 2 not
supported!"), will disappear before any one can read
them! this is because settext clears the screen if it
is already in text mode!!
actually i previously added settext() to the
destructor of my Tscreen class! when i noted this
problem! so i removed it!

btw, how can i write a DOS program the does not use
the CPU heavily?? isn't the program taking the whole
time of the cpu?? isn't it always executing
instructions?
well... even in Windows? what does a cpu usage of 50%
mean??? isn't the processor always executing
insturctions??

Thanx a lot!
Urs forever,
   Mohamed El Dawy

=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

- Raw text -


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