Node:Program Index, Previous:Topic Index, Up:Top

25 Program Index

This index lists the problems and solutions by the program/package to which they pertain. If you know what program or package gives you the trouble, look it up here.


Footnotes

  1. Please report any issues that couldn't be found via the indices to the maintainer of this FAQ, whose name and e-mail address can be found near the end of the FAQ.

  2. Posix is an international standard for a portable operating system. It specifies facilities of a compiler, its libraries, and the basic set of development tools. Posix was originally modeled on Unix systems, but is currently supported by most modern operating systems.

  3. For example, the DOS version of the well-known game Quake by id Software was compiled with DJGPP.

  4. The typo in the word Exception is in the actual message popped by Linux.

  5. This was reported for DOSEmu version 0.66.7; the format of dosemu.conf might be different in version 0.9x.

  6. But the development environment will only run on Windows 9X/NT.

  7. This DLL can be stripped off the debugging symbols using the strip utility, which leaves a much smaller--about 500KB--file.

  8. The BUFFERS=40,8 setting defines a primary cache of 40 512-byte blocks and a secondary cache of 8 blocks. The primary cache is used by DOS to store the data actually read by a program, in case it is re-read shortly afterwards; while the secondary cache is used to read data ahead of the requests, which is optimized towards sequential reads.

  9. ftp.simtel.net is actually several ftp sites arranged in a rotating pattern of IP addresses to help balance the load and to avoid access problems due to network outages and simultaneous user limits.

  10. The version numbers of the packages listed here might not be up to date by the time you read this. For the latest versions, check out the DJGPP Mini-FAQ posted weekly to the the comp.os.msdos.djgpp news group. The file LISTINGS.zip available on every DJGPP site includes one file for every zip that lists all the files inside that zip; download and unzip it on your machine, and you've got a set of files you can search for substrings. Another place where you can look for the latest versions of all files is on the DJGPP server, which is also a convenient way of downloading individual files if you have lost them somehow.

  11. Like its name suggests, texi2html converts a Texinfo source to HTML.

  12. You will need to install the port of Bash and some auxiliary utilities to be able to run shell scripts; texi2dvi itself is part of the GNU Texinfo distribution and comes with the v2gnu/txiNNNb.zip archive.

  13. The example uses Unix-style forward slashes, but DOS-style backslashes can also be used.

  14. While admittedly perverse, this little monstrosity was written with the sole purpose of demonstrating that C and C++ have quite different semantics under certain circumstances. Some people think that C is a proper subset of C++; the above example shows that this is not true.

  15. If you define an empty substitute for __crt0_setup_arguments, you don't need to define a substitute for __crt0_glob_function.

  16. In particular, running strip on a program and then compressing it with DJP would produce a program that crashes upon startup.

  17. Those who want all the details should consult a good book about DOS internals, such as Undocumented DOS, 2nd ed. by Andrew Schullman, or Geoff Chappel's DOS Internals.

  18. All DOS programs get the default 20-handle table when they start; DOS only copies the first 20 handles into the child, so it is not possible to inherit more than 20 handles. The expansion of the default 20-handle table to 255 handles is a special feature of the DJGPP library, and it only happens when the programs exhausts all of the 20 handles while it runs. Therefore, when all of the first 20 handles are taken up by files inherited from the parent program, the child program can fail to start because the DJGPP stub loader needs one free handle to open and read the COFF executable into memory. The stub cannot use the enlarged 255-handle table, since it cannot call the DJGPP library. Such problems indeed happen in programs compiled with DJGPP v2.01; v2.02 fixes this bug.

  19. Each handle created by a call to open uses up one slot in the SFT, whereas a handle created by dup just increments the use count of a slot that was already in use.

  20. That's the program being debugged, in case you didn't know.

  21. Programs that create machine code in malloced storage and then jump into it could have their EIP above EBP. The Allegro library utilizes this technique in some of its functions (specifically, compiled sprites and stretched blits are normally performed in this way).

  22. If you absolutely need to call ld.exe directly, invoke gcc once with a -v switch and you will see what are the arguments that you should pass to the linker in your case.

  23. Here's a more detailed explanation. DOS cannot access memory above 1MB mark, where your DJGPP program lives, since real-mode addresses are 20-bit wide, and 20-bit addresses cover only the first megabyte. So, each time a DJGPP program needs to call a DOS function (or any other real-mode service, like some BIOS interrupt) and needs to pass data to or from that service, we must use some buffer in conventional memory to communicate with DOS and BIOS. The transfer buffer is a block of conventional memory that the DJGPP startup code allocates for this purpose. When a real-mode service is called, the data that needs to be submitted to it is copied to the transfer buffer, and the address of the transfer buffer is passed to the real-mode service. If the service returns some data (e.g., if you want to read a portion of a file), data is copied from the transfer buffer when the service returns.

    The transfer buffer primarily exists for library functions, but it can also be used by an application, if it needs to invoke real-mode services.

  24. Actually, the maximum possible value is FEF0h, or 65254 in decimal, because the transfer buffer is created by the startup code by resizing the PSP memory block. Since the resized block needs to leave 256 bytes for the PSP, and needs to be aligned on a 16-byte boundary, you cannot have the entire 65535 bytes for the transfer buffer. In DJGPP v2.01, if you invoke stubedit with a bufsize=64k parameter, what you actually get is a 2KB buffer, since the combined size of the PSP and the transfer buffer will wrap around in a 16-bit variable when the startup code computes it. The versions of stubedit which will come with DJGPP v2.02 and later explicitly warn you about this case and will reset any value that is too large to the maximum allowed size of FE00h (65024 decimal) bytes--this is less than FEF0h because the latter is not aligned on the 512-byte DOS sector size, which could slow down disk I/O.

  25. Without a real x87 FPU, an exception is generated by the CPU each time a floating-point instruction is seen in the code. __djgpp_exception_processor is called for each such exception and services it by calling the emulator, emu387.dxe, or functions from the emulator library libemu.a (if the program was linked with -lemu), to emulate the instruction. Since exception processing incurs a lot of overhead, this emulation is slow.

  26. The DPMI 0.9 spec does not provide any means for the application to control where in the address space will the DPMI server allocate a particular chunk of memory. The application asks the DPMI server for whatever amount of memory it needs, and gets a chunk of that size whose address can be anywhere. Since the stack must be contiguous and expands downwards, growing it during program's run would require a very complicated code, unless it is pre-allocated at startup.

  27. In case you wonder, the name !proxy comes from the string which identifies the use of this method: instead of getting the actual command line, the program gets !proxy followed by the address of the actual command line.

  28. If you use MASM or LIB32, please post your experiences to the comp.os.msdos.djgpp news group, so that I can make the above instructions less vague.

  29. Note that mixing object files from different compilers generally doesn't work at all, even if all the object files are in .obj format.

  30. This function calls the video BIOS interrupt 10h to allow bright background colors to be used instead of blinking characters. DJGPP has a library function, called intensevideo, to do that, but for the purpose of this example, let's assume we have reasons not to use it.

  31. The DPMI spec indicates that you should not use the default stack if your procedure/interrupt handler uses more that 60 bytes, or 1/8 of the total stack space available by default.

  32. DJGPP v2.01 makes the limit of _dos_ds be 4GB, which effectively disables memory protection when you use that selector. However, since no memory outside the first 1MB is properly mapped into your program's address space without additional DPMI calls, and the DPMI host is then free to put memory-mapped devices, such as Weitek I/O space or the linear frame buffer of an SVGA, on any address it sees fit, that huge limit is an unjustified security hole. DJGPP v2.02 will really be limited by 1MB+64KB.

  33. If you want to decipher the 8-byte structure that is passed to __dpmi_set_descriptor in this example, read the documentation of the __dpmi_get_descriptor library function in the library reference. This structure is the descriptor maintained by the processor for each protected-mode segment, such as those loaded into the CS and DS registers.

  34. If you are using this example in your program, don't forget to disable the handler at program's exit by calling the same function 0Ch of Int 33h with a zero mask in the CX register, and then deallocate the callback by calling the _go32_dpmi_free_real_mode_callback library function. Also, remember that all code and data touched by the handler must be locked, otherwise it will crash under some DPMI servers, such as CWSDPMI.

  35. Locking a region of memory means that this region should be always present in RAM. Usually, the virtual-memory mechanism is allowed to page regions out of RAM when it needs to load another region that is not loaded. This happens if the program uses more memory than what is physically available to it. When a program needs to access an address that isn't currently in RAM, the operating system will look for some memory region that wasn't accessed for quite some time, and replace it with the block that needs to be accessed now. Locking a region prevents that region to be paged out, for as long as the program runs.

  36. This discussion does not pertain to the __dpmi_int function as opposed to the _go32_dpmi_simulate_int function. On the contrary, you will be much better off using __dpmi_int, since it automatically zeroes out some of the members of the real-mode registers structure, while with _go32_dpmi_simulate_int you need to do that by hand.

  37. Actually, it is possible to avoid reentrancy problems in interrupt-driven programs: programs known as TSRs (Terminate and Stay Resident) have been doing that for years. But doing so requires hooking and monitoring many DOS and BIOS interrupts, to know when it is safe to page. If CWSDPMI would use these techniques, it would take much more DOS memory to load and run. It would also need to be updated with every new DOS release, since some of the internal DOS structures it would need to monitor change their address and/or layout with new versions of DOS.

  38. CWSDPMI has an experimental VDS support in its sources, but the distributed binary was compiled without it. Contact Charles Sandmann if you want to try to enable VDS support in CWSDPMI.

  39. In case somebody thinks there is a contradiction here: I don't consider a requirement to provide information to be a restriction.

  40. Note that this still allows the struct to be padded at the end.

  41. For some reason, Microsoft doesn't like it when users disable numeric tails. Several Microsoft publications warn against doing that, and I'm told that Windows 98 has made it harder to disable them. I'm not sure why do they object so much. Presumably, some programs rely on certain directories to have numeric tails, so that they could be found even in plain DOS mode. Apparently, some of those programs have short aliases such as PROGRA~1 (the short version of the Program Files directory) hard-wired into them, and Microsoft is afraid you could reinstall or move those directories when numeric tails are disabled, and thus cause such programs not to find their "home". It is obvious that such programs are badly broken (e.g., the short alias could easily be PROGRA~2), and you have every right to yell at the vendor who sells them to you. But even if you have no other way than to live with them, my experience shows that you have nothing real to worry about. Remember: numeric tails only have effect when files are created or renamed. So, if you want to be on the safe side, re-enable them before installing Windows software, especially if the programs you install need to run in DOS mode as well (a typical example would be a disk-recovery package such as Norton Utilities). Then disable numeric tails again, once the installation is over.

    For what it's worth, I always run my system with numeric tails disabled, and I have yet to see a single real problem.

  42. If you need Binutils configured for elf32-i386 target that can be used with DJGPP, you can find it at http://www.multimania.com/~placr/.

  43. Since these series are computed using a deterministic algorithm, they are not really random. Real random numbers can only be a result of unpredictable physical processes such as radioactive decay etc. However, a good algorithm for pseudo-random numbers produces a series of numbers that pass many tests for randomality.