home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / misc / realmem.zip / REALMEM.NFO < prev    next >
Text File  |  1994-01-30  |  4KB  |  92 lines

  1. ·∙-───────────────────────────> PROGREX'94 <─────────────────────────────────-∙·
  2.  
  3.                                  presents
  4.  
  5.   REAL-MEMORY SYSTEM - A 32bit MEMORY ADDRESSING TECHNIQUE FOR THE REAL-MODE!
  6.  
  7.  
  8.  
  9.  
  10. What is the REAL-MEMORY system?
  11. ───────────────────────────────
  12.  
  13. "REAL-MEMORY" is just our way to call the usage of extended memory in
  14. the real-mode. We've never heard of anyone doing such a thing before,
  15. so we decided to distribute some information about this little thing.
  16. Of course the protected mode might be a lot better way to solve problems
  17. due to its ability to run 32bit code and so. Anyway, as long as we use
  18. DOS, it's a lot easier to use memory in the real-mode. For instance,
  19. the REAL-MEMORY works in the background when using TSR:s - with no extra
  20. drivers. Using it, is also as fast as the usage of basememory, and in
  21. addition, it's a superior technique to QEMM and other corresponding
  22. memory managers. For the last thing, the REAL-MEMORY is, at least, a lot
  23. easier to use than the protected mode!
  24.  
  25.  
  26. How does it work, then?
  27. ───────────────────────
  28.  
  29. Well... a 80386 is initially started in the real-mode to be 100% PC/XT-compa-
  30. tible. All you are expected to know the segment limit (64KB) in the realmode
  31. and what happens if you address over it (like: mov edi,66000 - mov ax,[edi])
  32. - an exception will be generated. However, a 386 allows the modification of
  33. segment limit in the protected mode - up to 4GB. So, we simply switch to the
  34. protected mode and adjust the limit of all segments to 4GB. After that we
  35. switch back to the real-mode without resetting the CPU. And...voila : we can
  36. address the maximum of 4GB memory in the real-mode without the nasty segment
  37. limit of 64KB! However, there's still one thing, which has to be made sure
  38. before using extended memory; the addressline 20 must be enabled. Fortunately
  39. HIMEM.SYS, for example, includes a function for it. Thus, it's not a problem
  40. at all.
  41.  
  42.  
  43. How about the compatibility with other applications?
  44. ────────────────────────────────────────────────────
  45.  
  46. Expanded memory managers, like QEMM, usually prevent the modifications
  47. directly. We haven't tested, if it would be possible to use the REAL-MEMORY
  48. system under QEMM. Anyway, there's no reason. There's no need for QEMM, if
  49. the memory is entirely in use without QEMM! If you really want to make your
  50. code compatible with one of the most incompatible programs ever made, do it
  51. freely. We won't.
  52.  
  53. As always, there are also some difficulties. The problem comes up with the
  54. A20-line, because it has to be enabled all the time. When extended memory
  55. is used and DOS (5.0 or newer) is loaded into HMA, the A20-line is turned
  56. off every time a new program is executed. It's not a problem, if we are not
  57. in a DOSshell. If we are, it's anything but an easy thing to handle. For this
  58. case, We have coded a short routine to patch HIMEM.SYS (or other extended
  59. memory manager) for the time the shutdown of the A20-line has to be preven-
  60. ted.
  61.  
  62. The REAL-MEMORY system has been tested with over 20 different 80386s and
  63. 80486s and it's been found working with all those CPUs. Anyway, we can
  64. give no guarantee, because the system seems to be quite undocumented.
  65.  
  66.  
  67. The examples
  68. ────────────
  69.  
  70. There are three programming examples distributed with this info. First
  71. is an initialization code. Second is a short program, which allocates
  72. 100KB of XMS and fills the area with data. Third code is the patch for
  73. XMS driver to prevent A20 shutdown. The first two are in C (mainly in-
  74. line assembly) and the last one is pure assembly. Hopefully the examples
  75. are clear enough.
  76.  
  77.  
  78. The final words...
  79. ──────────────────
  80.  
  81. Yeah, that's it... if any information in this packet is useful for you, it
  82. would be nice to greet us in your product. And, if YOU find out something
  83. useful, perhaps undocumented, which you've never heard of before, don't
  84. hesitate; inform also the others about it!!!
  85.  
  86.  
  87. All netmail concerning REAL-MEMORY to
  88. Fidonet: 2:220/980 (to Chatter/PROGREX)
  89.  
  90.  
  91.                                         Thank you for your attention.
  92.