Message-ID: <001901bedf95$7533c200$f36026c2@default> From: "Józsa Péter" To: "DJGPP mailing list" Subject: Code and data locking Date: Fri, 6 Aug 1999 00:54:20 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com Hello! I'm relatively new to DJGPP, so forgive me if my question seems stupid. I have a program in which I use some hardware interrupt handlers, and I don't want to lock them individually for several reasons (e.g. they use way too many variables). So I've decided to lock my program's code and data segments entirely (the image size is not so large) but I don't want to lock any additionally allocated memory. As I figure, the way to do it is something like this: #include int _crt0_startup_flags = _CRT0_FLAG_NONMOVE_SBRK | _CRT0_FLAG_LOCK_MEMORY; int main(void) { _crt0_startup_flags &= ~_CRT0_LOCK_MEMORY; ... Am I right? If not, please someone tell me how I could do what I described above. Thank you. (Please send answers to: p_jozsa AT freemail DOT c3 DOT hu)