# DOS/4G

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/DOS/4G
> Markdown URL: https://mediated.wiki/source/DOS/4G.md
> Source: https://en.wikipedia.org/wiki/DOS%2F4G
> Source revision: 1341495692
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

**DOS/4G** is a [32-bit](/source/32-bit) [DOS extender](/source/DOS_extender) developed by [Rational Systems](/source/Rational_Systems) (later [Tenberry Software](/source/Tenberry_Software)).[3] It allows [DOS](/source/DOS) programs to eliminate the 640 [KB](/source/Kilobyte) [conventional memory](/source/Conventional_memory) limit by addressing up to 64 [MB](/source/Megabyte)[4] of [extended memory](/source/Extended_memory) on [Intel 80386](/source/Intel_80386) and above machines.

## Features

Functioning as a highly flexible and reusable memory extension library, DOS/4G allowed programmers to access extended memory without writing specialized code. It embeds itself in the executable file at [linking](/source/Linker_(computing)) time and executes before main application code, so usually DOS/4G initialization messages show up at launch. It can in principle operate within [MS-DOS](/source/MS-DOS), [PC DOS](/source/PC_DOS), [DR-DOS](/source/DR-DOS) and other DOS clones, the DOS boxes of [OS/2](/source/OS/2), [Microsoft Windows](/source/Microsoft_Windows), [Windows NT](/source/Windows_NT) and [Windows 95](/source/Windows_95), and DOS emulators such as [DOSBox](/source/DOSBox). However, in practice few DOS/4G games or other applications will run on non-DOS-based versions of [Windows](/source/Windows), including [Windows NT](/source/Windows_NT), [Windows 2000](/source/Windows_2000) and [Windows XP](/source/Windows_XP), since none of these allow direct access to the hardware as was used for display rendering in those days.

## History

Rational Systems first announced DOS/4G in July 1991. It was available immediately, at a price of US$5000 and up.[1][5]

**DOS/4GW** 1.95 was a free limited edition of DOS/4G and was included with the [Watcom C compiler](/source/Watcom_C_compiler) with a commercial re-distribution license. It was made widely popular by computer games like *[Doom](/source/Doom_(1993_video_game)) or [Tomb Raider](/source/Tomb_Raider_(1996_video_game))*.

Initial versions of DOS/4G had trouble with secondary [DMA channels](/source/DMA_channel) on the [ISA bus](/source/ISA_bus), which prevented 16-bit devices like [Gravis Ultrasound](/source/Gravis_Ultrasound) series from normally functioning; Gravis even had to develop PREPGAME, a patch utility which updated the game executable with a new version 1.97 to fix the incompatibility.

In case of problems, DOS/4G or DOS/4GW can be replaced with the newer and free [DOS/32](/source/DOS/32); a patch utility can even replace DOS/4G code embedded inside a compiled executable file.[6]

## See also

- [DOS/32](/source/DOS/32)
- [DOS Protected Mode Interface](/source/DOS_Protected_Mode_Interface) (DPMI)
- [DOS API](/source/DOS_API)

## References

1. [DOS extender works with Windows](https://books.google.com/books?id=f1AEAAAAMBAJ&pg=PA17), *InfoWorld*, July 22, 1991

1. ["DOS/4G Release Notes"](https://web.archive.org/web/20180507222545/http://www.tenberry.com/dos4g/rn4g.html). Archived from [the original](http://www.tenberry.com/dos4g/rn4g.html) on 2018-05-07.

1. [DOS4/GW Is it free? Can you distribute it?](https://groups.google.com/g/alt.msdos.programmer/c/WznGcFPdHgs/m/KKDnGT-7QAsJ)

1. [DOS4G FAQ](https://web.archive.org/web/20180609030717/http://www.tenberry.com/dos4g/faq/memory.html#02)

1. [Users can choose between two 32-bit DOS extenders](https://books.google.com/books?id=CdAPo2ZypRMC&pg=PA33), *Computerworld*, July 29, 1991

1. [TOOLS:DOS32A - DOSBoxWiki](https://www.dosbox.com/wiki/TOOLS:DOS32A)

## External links

- [DOS/4GW FAQ](https://web.archive.org/web/20180630153306/http://www.tenberry.com/dos4g/faq/index.html)

---
Adapted from the Wikipedia article [DOS/4G](https://en.wikipedia.org/wiki/DOS%2F4G) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/DOS%2F4G?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
