Date: Sun, 7 Apr 1996 09:11:56 +0200 (IST) From: Eli Zaretskii To: cchoi AT ids2 DOT idsonline DOT com Cc: djgpp AT delorie DOT com Subject: Re: Novice question on pmode In-Reply-To: <4k38a7$mah@news.cais.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 4 Apr 1996 cchoi AT ids2 DOT idsonline DOT com wrote: > I'm just new at djgpp so undoubtly I have many questions about it but > unable to find the answers in either the faq nor other sources such as > avly AT remus DOT rutgers DOT edu's tutors. Be sure you've read the latest version of the DJGPP FAQ list. You can get it by downloading the file v2/faq200b.zip from the same place you got the rest of DJGPP. > The main question I have right now is about the memory organization of > djgpp. I am wondering if I can use memcpy, memset and other memory > related procedures in string.h or mem.h as if I would have used in > Borland C++/Turbo C++. It's much better than that: you can use all those functions without bothering about such 16-bit plagues as crossing 64K boundaries etc. However, if you move data between your program and memory-mapped devices (like the video memory), please be sure to read section 18.4 in the FAQ list. > Also if I declare a large array: char buffer[64000] then can I access > it as I were in real mode such as buffer[0]=0. Of course. Just be aware that if you declare large automatic arrays, the default amount of stack in DJGPP is 256KB. If you get anywhere near that figure, you should enlarge the stack size. The FAQ list explains how in section 15.8. > I have compiled some > graphics program I programmed under Turbo C++ and they did compile but > when I linked and ran the program, the program spit out "page fault." If that program was written under TC, be sure you convert correctly all the places where you access the video RAM and call various interrupts. The FAQ explains this in chapters 17 and 18; please read them. If that doesn't help, post a code fragment that crashes and somebody will have an answer for you.