delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq137.html   search  

| Previous | Next | Up | Top |

17.3 Converted code GP Faults!

Q: OK, I've succeeded in converting and compiling my assembly-language program, but when I run it, I get "Segmentation Violation" and "General Protection Fault". This program works when compiled with MASM, so how can this be?


A: In DJGPP, your program runs in protected mode. There are certain things you can't do in protected-mode programs (that's why it is called protected mode). This issue is too complex to describe here, so only a few of the more important aspects will be briefly mentioned. If you are serious about writing assembly language protected-mode code, or have a large body of existing code to convert to protected mode, you should read any of the available books about protected-mode programming with 80x86 processors.

Here is a short list of some of the techniques found in many real-mode programs, which will trigger protection violation or erratic behavior in protected mode:


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)