Why DOS programs fail if loaded too low and A20 gate is enabled #5428
joncampbell123
started this conversation in
General
Replies: 2 comments
-
Just so you know, in case you think I'm just being lazy by asking you to try "LOADFIX -a" first. For anything earlier than perhaps up to the mid 1990s, this is probably the first thing you should check if it immediately crashes when you run it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This particular startup code appears in anything I compile using an old C compiler from the late 1980s called the Mix C compiler. Before I had better compilers (yes, Microsoft C/C++ in 1993 was better than this), this was a DOS compiler I used a lot back in the day. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Older DOS code will sometimes use the 8086 segment registers in a way that assumes a 1MB wraparound to access memory.
If the A20 gate is enabled, this wraparound doesn't happen and the DOS program malfunctions.
Here's an example of just such a malfunction right there in the startup code of an old C compiler from the late 1980s. To nobody's surprise, this program crashes and fails unless you LOADFIX -a first.
Beta Was this translation helpful? Give feedback.
All reactions