If the program is too large to run in DOS, how can it run in DOS?

Source: Internet
Author: User

If your program cannot run in DOS because it is too large (more than KB), there are two ways to provide more memory for the program. One way is to use overlay manager ). Overwrite the modules used by hypervisor to manage programs and read them from the disk or delete them from the memory as needed. In this way, even if your program is several megabytes large, it can still run on a computer with only KB of available memory. Some advanced overwrite management programs allow you to "group" the modules that need to be read and deleted at the same time, which helps you to improve its performance by carefully adjusting the program. Some other slightly inferior overwrite management programs do not have this function, so when using them, you cannot adjust the overwrite module through grouping.

Another way to get more available memory is to use the DOS extender, which is a special application, it uses the protection mode of 386,486 or newer models to access up to several megabytes of memory in a flat address space. When your program is connected to the DOS extension, the DOS extension code will become part of the startup code of the program. When your program is executed, the DOS extension is loaded and you have control of the program. All memory allocation calls must be performed through the DOS extension, which skips DOS and the DOS extension allocates more than KB of memory.

Unfortunately, DOS extensions also have some obvious disadvantages. One of them is that when you release your program, most dos extensions require you to pay the run royalty. This may be very expensive, especially when you have many users. There are also a few compiled programs with royalty-free dos extensions, but this is only an exception. Another disadvantage of using DOS extensions is that it usually requires you to use its application programming interface (API) by modifying the source code rather than calling it through DOS ).

Overwrite hypervisor generally does not require running fees, so it has a higher cost-performance ratio and is cheaper than DOS extensions. In addition, when using overwrite hypervisor, you generally do not need to modify the source code. In most cases, overwrite hypervisor is transparent to the program.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.