3 The associated file (LIMEMS41.DOC) is a complete transcription of
\r
4 the Lotus/Intel/Microsoft (LIM) Expanded Memory Specification
\r
5 (EMS) Version 4.0, updated October 1987. It can be printed by
\r
6 "COPY LIMEMS41.DOC PRN:"
\r
8 I created this transcription because of the difficulty I origin-
\r
9 ally had finding a copy of the document, because of the number of
\r
10 people who have subsequently expressed an interest in having
\r
11 access to a machine-readable copy of the specification, and,
\r
12 finally, because of the annoying number of typographical errors
\r
13 contained in the original and updated documents.
\r
15 This transcription is not an exact letter-for-letter duplicate of
\r
16 the original document. Some minor changes were necessitated by
\r
17 the simple fact that the document's proportionally-spaced, multi-
\r
18 fonted typography and line drawings did not lend themselves to
\r
19 the generic fixed-spacing, single-fonted, non-graphical ASCII
\r
20 transcription I wanted to produce for general dissemination.
\r
22 Other minor changes were made to correct obvious typographical
\r
23 and grammatical errors, or to simply improve the visual aes-
\r
24 thetics of the presented material.
\r
26 In one area, however, I simply trashed their original material
\r
27 and substituted my own. This area is the Index. The original
\r
28 document contains an Index that is little more than a reformatt-
\r
29 ing of the Table of Contents. As anyone who has ever indexed a
\r
30 large document knows, it is very difficult to produce an Index
\r
31 that is both complete AND easy to use. I didn't have time to
\r
32 produce one that was both, so I aimed for the former. In fact,
\r
33 the Index I have provided is more of an alphabetical listing of
\r
34 key words and phrases and the pages where they are referenced,
\r
35 than it is a more typical Index with its multi-level headings and
\r
38 You should be able obtain a printed, 3-hole-punched, 5.5 x 8.5"
\r
39 copy of the original (and uncorrected) document directly from
\r
40 Intel by calling their "Information Department" at 1-800-538-3373
\r
41 and asking for a copy of the "LIM EMS 4.0 Developer's Kit." It
\r
42 is available free of charge and mine arrived in about two weeks.
\r
43 (European availability, however, is reported to be from poor to
\r
46 It is my intent to provide this transcription as a public
\r
47 service. I am, therefore, releasing it into the public domain.
\r
48 The original document has also been released into the public
\r
49 domain by Lotus, Intel, and Microsoft, though it remains their
\r
50 copyrighted property (I'm not quite sure how they manage to do
\r
53 I have tried as best I can to provide an accurate and corrected
\r
54 transcription of the original document. It is inevitable,
\r
55 however, that some typographical errors have slipped through in
\r
56 spite of my hours of bleary-eyed proof reading. For these errors
\r
57 I apologize and plead simple human frailty.
\r
59 THIS TRANSCRIPTION IS PROVIDED WITHOUT ANY GUARANTEES
\r
60 OR WARRANTIES OF ANY KIND, AND I ASSUME ABSOLUTELY NO
\r
61 LIABILITY FOR ITS ACCURACY, CONTENT, OR SUBSEQUENT USE.
\r
63 Dick Flanagan, W6OLD, Ben Lomond, California November 1987
\r
75 LOTUS(R)/INTEL(R)/MICROSOFT(R)
\r
77 EXPANDED MEMORY SPECIFICATION [1]
\r
107 Lotus Development Corporation
\r
108 55 Cambridge Parkway
\r
109 Cambridge, MA 02142
\r
112 5200 NE Elam Young Parkway
\r
113 Hillsboro, OR 97124
\r
115 Microsoft Corporation
\r
121 [1] Transcribed into machine-readable form by Dick Flanagan,
\r
122 Ben Lomond, California. This transcription is released into the
\r
123 public domain without warranty or assumption of liability.
\r
129 This specification was jointly developed by Lotus Develop-
\r
130 ment Corporation, Intel Corporation, and Microsoft Corpora-
\r
131 tion. Although it has been released into the public domain
\r
132 and is not confidential or proprietary, the specification is
\r
133 still the copyright and property of Lotus Development
\r
134 Corporation, Intel Corporation, and Microsoft Corporation.
\r
137 DISCLAIMER OF WARRANTY
\r
139 LOTUS DEVELOPMENT CORPORATION, INTEL CORPORATION, AND MICRO-
\r
140 SOFT CORPORATION EXCLUDE ANY AND ALL IMPLIED WARRANTIES,
\r
141 INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
\r
142 PARTICULAR PURPOSE. NEITHER LOTUS NOR INTEL NOR MICROSOFT
\r
143 MAKE ANY WARRANTY OF REPRESENTATION, EITHER EXPRESS OR
\r
144 IMPLIED, WITH RESPECT TO THIS SPECIFICATION, ITS QUALITY,
\r
145 PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
\r
146 PURPOSE. NEITHER LOTUS NOR INTEL NOR MICROSOFT SHALL HAVE
\r
147 ANY LIABILITY FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
\r
148 DAMAGES ARISING OUT OF OR RESULTING FROM THE USE OR MODIF-
\r
149 ICATION OF THIS SPECIFICATION.
\r
153 This specification uses the following trademarks:
\r
155 Intel is a trademark of Intel Corporation
\r
156 Lotus is a trademark of Lotus Development Corporation
\r
157 Microsoft is a trademark of Microsoft Corporation
\r
194 What is Expanded Memory? . . . . . . . . . . . . . . . . . 1
\r
195 How Expanded Memory Works . . . . . . . . . . . . . . . . 1
\r
198 WRITING PROGRAMS THAT USE EXPANDED MEMORY
\r
199 What Every Program Must Do . . . . . . . . . . . . . . . . 4
\r
200 Advanced Programming . . . . . . . . . . . . . . . . . . . 5
\r
201 Saving The State of Mapping Hardware . . . . . . . . . . 6
\r
202 Retrieving Handle and Page Counts . . . . . . . . . . . 6
\r
203 Mapping and Unmapping Multiple Pages . . . . . . . . . . 6
\r
204 Reallocating Pages . . . . . . . . . . . . . . . . . . . 6
\r
205 Using Handles and Assigning Names to Handles . . . . . . 6
\r
206 Using Handle Attributes . . . . . . . . . . . . . . . . 7
\r
207 Altering Page Maps and Jumping/Calling . . . . . . . . . 7
\r
208 Moving or Exchanging Memory Regions . . . . . . . . . . 7
\r
209 Getting the Amount of Mappable Memory . . . . . . . . . 8
\r
210 Operating System Functions . . . . . . . . . . . . . . . 8
\r
211 Programming Guidelines . . . . . . . . . . . . . . . . . . 12
\r
212 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 14
\r
213 Example 1 . . . . . . . . . . . . . . . . . . . . . . . 14
\r
214 Example 2 . . . . . . . . . . . . . . . . . . . . . . . 19
\r
215 Example 3 . . . . . . . . . . . . . . . . . . . . . . . 30
\r
216 Example 4 . . . . . . . . . . . . . . . . . . . . . . . 32
\r
220 Function 1. Get Status . . . . . . . . . . . . . . . . . . 37
\r
221 Function 2. Get Page Frame Address . . . . . . . . . . . . 38
\r
222 Function 3. Get Unallocated Page Count . . . . . . . . . . 40
\r
223 Function 4. Allocate Pages . . . . . . . . . . . . . . . . 42
\r
224 Function 5. Map/Unmap Handle Pages . . . . . . . . . . . . 46
\r
225 Function 6. Deallocate Pages . . . . . . . . . . . . . . . 49
\r
226 Function 7. Get Version . . . . . . . . . . . . . . . . . 51
\r
227 Function 8. Save Page Map . . . . . . . . . . . . . . . . 53
\r
228 Function 9. Restore Page Map . . . . . . . . . . . . . . . 55
\r
229 Function 10. Reserved . . . . . . . . . . . . . . . . . . 57
\r
230 Function 11. Reserved . . . . . . . . . . . . . . . . . . 58
\r
231 Function 12. Get Handle Count . . . . . . . . . . . . . . 59
\r
232 Function 13. Get Handle Pages . . . . . . . . . . . . . . 61
\r
233 Function 14. Get All Handle Pages . . . . . . . . . . . . 63
\r
234 Function 15. Get/Set Page Map . . . . . . . . . . . . . . 65
\r
235 Get Page Map subfunction . . . . . . . . . . . . . . . . 65
\r
236 Set Page Map subfunction . . . . . . . . . . . . . . . . 67
\r
237 Get & Set Page Map subfunction . . . . . . . . . . . . . 69
\r
238 Get Size of Page Map Save Array subfunction . . . . . . 71
\r
247 Function 16. Get/Set Partial Page Map . . . . . . . . . . 73
\r
248 Get Partial Page Map subfunction . . . . . . . . . . . . 73
\r
249 Set Partial Page Map subfunction . . . . . . . . . . . . 76
\r
250 Get Size of Partial Page Map Save Array subfunction . . 78
\r
251 Function 17. Map/Unmap Multiple Handle Pages . . . . . . . 80
\r
252 Mapping Multiple Pages . . . . . . . . . . . . . . . . . 80
\r
253 Unmapping Multiple Pages . . . . . . . . . . . . . . . . 80
\r
254 Mapping and Unmapping Multiple Pages Simultaneously . . 80
\r
255 Alternate Mapping and Unmapping Methods . . . . . . . . 81
\r
256 Logical Page/Physical Page Method . .OF THE EXPANDED MEMORY MANAGER
\r
257 Which method should your program use? . . . . . . . . . . 199
\r
258 The "open handle" technique . . . . . . . . . . . . . . . 199
\r
259 The "get interrupt vector" technique . . . . . . . . . . . 204
\r
262 EXPANDED MEMORY MANAGER IMPLEMENTATION GUIDELINES
\r
263 The amount of expanded memory supported . . . . . . . . . 206
\r
264 The number of handles supported . . . . . . . . . . . . . 206
\r
265 Handle Numbering . . . . . . . . . . . . . . . . . . . . . 206
\r
266 New handle type: Handles versus Raw Handles . . . . . . . 206
\r
267 The system Raw Handle (Raw Handle = 0000h) . . . . . . . . 207
\r
268 Terminate and Stay Resident (TSR) Program Cooperation . . 208
\r
269 Accelerator Cards . . . . . . . . . . . . . . . . . . . . 208
\r
272 OPERATING SYSTEM/ENVIRONMENT USE OF FUNCTION 28
\r
273 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 209
\r
274 Example 1 . . . . . . . . . . . . . . . . . . . . . . . 209
\r
275 Example 2 . . . . . . . . . . . . . . . . . . . . . . . 210
\r
276 Example 3 . . . . . . . . . . . . . . . . . . . . . . . 211
\r
306 Because even the maximum amount (640K bytes) of conventional
\r
307 memory isn't always enough for large application programs,
\r
308 Lotus Development Corporation, Intel Corporation, and Micro-
\r
309 soft Corporation created the Lotus/Intel/Microsoft (LIM)
\r
310 Expanded Memory Specification.
\r
312 The LIM Expanded Memory Specification defines the software
\r
313 interface between the Expanded Memory Manager (EMM) -- a
\r
314 device driver that controls and manages expanded memory --
\r
315 and application programs that use expanded memory.
\r
318 What is Expanded Memory?
\r
320 Expanded memory is memory beyond DOS's 640K-byte limit. The
\r
321 LIM specification supports up to 32M bytes of expanded
\r
322 memory. Because the 8086, 8088, and 80286 (in real mode)
\r
323 microprocessors can physically address only 1M bytes of
\r
324 memory, they access expanded memory through a window in
\r
325 their physical address range. The next section explains how
\r
329 How Expanded Memory Works
\r
331 Expanded memory is divided into segments called logical
\r
332 pages. These pages are typically 16K bytes of memory. Your
\r
333 computer accesses logical pages through a physical block of
\r
334 memory called a page frame. The page frame contains
\r
335 multiple physical pages, pages that the microprocessor can
\r
336 address directly. Physical pages are also typically 16K
\r
339 This page frame serves as a window into expanded memory.
\r
340 Just as your computer screen is a window into a large
\r
341 spreadsheet, so the page frame is a window into expanded
\r
344 A logical page of expanded memory can be mapped into (made
\r
345 to appear in) any one of the physical pages in the page
\r
346 frame. Thus, a read or write to the physical page actually
\r
347 becomes a read or write to the associated logical page. One
\r
348 logical page can be mapped into the page frame for each
\r
351 Figure 1-1 shows the relationship among the page frame,
\r
352 physical pages, and logical pages.
\r
361 32M +--------------+
\r
371 1024K +--------------+ | |
\r
372 | / / / / / / | / | |
\r
373 960K +--------------+ | |
\r
376 | 12 16K-Byte | | |
\r
379 768K +--------------+ | Divided into |
\r
380 | / / / / / / | \ | logical |
\r
381 640K +--------------+ | pages |
\r
386 | 24 16K-Byte | \ | |
\r
393 256K +--------------+ | |
\r
395 | / / / / / / | | |
\r
397 | / / / / / / | | |
\r
399 | / / / / / / | | |
\r
401 0 +--------------+ | |
\r
404 *Intended for operating \ | |
\r
405 system/environment use only 0 +--------------+
\r
409 Figure 1-1. Expanded Memory
\r
420 The page frame is located above 640K bytes. Normally, only
\r
421 video adapters, network cards, and similar devices exist
\r
422 between 640K and 1024K.
\r
424 This specification also defines methods for operating
\r
425 systems and environments to access expanded memory through
\r
426 physical pages below 640K bytes. These methods are intended
\r
427 for operating system/environment developers only.
\r
480 WRITING PROGRAMS THAT USE EXPANDED MEMORY
\r
483 This chapter describes what every program must do to use
\r
484 expanded memory and describes more advanced techniques of
\r
485 using expanded memory.
\r
487 This chapter also lists programming guidelines you should
\r
488 follow when writing programs that use expanded memory and
\r
489 provides the listings of some example programs.
\r
492 What Every Program Must Do
\r
494 This section describes the steps every program must take to
\r
495 use expanded memory.
\r
497 In order to use expanded memory, applications must perform
\r
498 these steps in the following order:
\r
500 1. Determine if EMM is installed.
\r
502 2. Determine if enough expanded memory pages exist for your
\r
503 application. (Function 3)
\r
505 3. Allocate expanded memory pages. (Function 4, 18, or 27)
\r
507 4. Get the page frame base address. (Function 2)
\r
509 5. Map in expanded memory pages. (Function 5 or 17)
\r
511 6. Read/write/execute data in expanded memory, just as if
\r
512 it were conventional memory.
\r
514 7. Return expanded memory pages to expand memory pool
\r
515 before exiting. (Function 6 or 18)
\r
517 Table 2-1 overviews the functions while Chapter 3 describes
\r
518 each of these functions in detail. Example programs at the
\r
519 end of this chapter illustrate using expanded memory.
\r
532 Writing Programs That Use Expanded Memory 4
\r
538 Table 2-1. The Basic Functions
\r
539 ----------------------------------------------------------------
\r
541 Function Description
\r
543 ----------------------------------------------------------------
\r
545 1 The Get Status Function returns a status code
\r
546 indicating whether the memory manager hardware is
\r
549 2 The Get Page Frame Address function returns the
\r
550 address where the 64K-byte page frame is located.
\r
552 3 The Get Unallocated Page Count function returns the
\r
553 number of unallocated pages (pages available to your
\r
554 program) and the total number of pages in expanded
\r
557 4 The Allocate Pages function allocates the number of
\r
558 pages requested and assigns a unique EMM handle to
\r
561 5 The Map/Unmap Handle Page function maps a logical
\r
562 page to a specific physical page anywhere in the
\r
563 mappable regions of system memory.
\r
565 6 The Deallocate Pages deallocates the logical pages
\r
566 currently allocated to an EMM handle.
\r
568 7 The Get Version function returns the version number
\r
569 of the memory manager software.
\r
571 ----------------------------------------------------------------
\r
575 Advanced Programming
\r
577 In addition to the basic functions, the Lotus/Intel/Micro-
\r
578 soft Expanded Memory Specification provides several advanced
\r
579 functions which enhance the capabilities of software that
\r
580 uses expanded memory.
\r
582 The following sections describe the advanced programming
\r
583 capabilities and list the advanced EMM functions.
\r
586 Note............................................................
\r
587 Before using the advanced functions, programs should first
\r
588 call Function 7 (Get Version) to determine whether the
\r
589 installed version of EMM supports these functions.
\r
591 Writing Programs That Use Expanded Memory 5
\r
597 Saving The State of Mapping Hardware
\r
599 Some software (such as interrupt service routines, device
\r
600 drivers, and resident software) must save the current state
\r
601 of the mapping hardware, switch mapping contexts, manipulate
\r
602 sections of expanded memory, and restore the original
\r
603 context of the memory mapping hardware. Use Functions 8 and
\r
604 9 or 15 and 16 to save the state of the hardware.
\r
607 Retrieving Handle and Page Counts
\r
609 Some utility programs need to keep track of how expanded
\r
610 memory is being used; use Functions 12 through 14 to do
\r
614 Mapping and Unmapping Multiple Pages
\r
616 Mapping multiple pages reduces the overhead an application
\r
617 must perform during mapping. Function 17 lets a program map
\r
618 (or unmap) multiple pages at one time.
\r
620 In addition, you can map pages using segment addresses
\r
621 instead of physical pages. For example, if the page frame
\r
622 base address is set to D000, you can map to either physical
\r
623 page 0 or segment D000. Function 25 (Get Mappable Physical
\r
624 Address Array) returns a cross reference between all
\r
625 expanded memory physical pages and their corresponding
\r
631 Reallocating pages (Function 18) lets applications dynami-
\r
632 cally allocate expanded memory pages without acquiring
\r
633 another handle or obtain a handle without allocating pages.
\r
634 Reallocating pages is an efficient means for applications to
\r
635 obtain and release expanded memory pages.
\r
638 Using Handles and Assigning Names to Handles
\r
640 This specification lets you associate a name with a handle,
\r
641 so a family of applications can share information in
\r
642 expanded memory. For example, a software package consisting
\r
643 of a word processor, spreadsheet, and print spooler can
\r
644 share the same data among the different applications. The
\r
645 print spooler could use a handle name to reference data that
\r
646 either the spreadsheet or word processor put in expanded
\r
647 memory and could check for data in a particular handle
\r
648 name's expanded memory pages.
\r
650 Writing Programs That Use Expanded Memory 6
\r
656 Use Function 20 (Set Handle Name subfunction) to assign a
\r
657 handle name to an EMM handle or Function 21 (Search for
\r
658 Named Handle subfunction) to obtain the EMM handle as-
\r
659 sociated with the handle name. In addition, you can use
\r
660 Function 14 (Get Handle Pages) to determine the number of
\r
661 expanded memory pages allocated to an EMM handle.
\r
664 Using Handle Attributes
\r
666 In addition to naming a handle, you can use Function 19 to
\r
667 associate an attribute (volatile or non-volatile) with a
\r
668 handle name. A non-volatile attribute enables expanded
\r
669 memory pages to preserve their data through a warmboot.
\r
670 With a volatile attribute, the data is not preserved. The
\r
671 default attribute for handles is volatile.
\r
673 Because using this function depends on the capabilities of
\r
674 the expanded memory hardware installed in the system, you
\r
675 should use the Get Attribute Capability subfunction before
\r
676 attempting to assign an attribute to a handle's pages.
\r
679 Altering Page Maps and Jumping/Calling
\r
681 You can use Functions 22 (Alter Page Map & Jump) and 23
\r
682 (Alter Page Map & Call) to map a new set of values into the
\r
683 map registers and transfer program control to a specified
\r
684 address within expanded memory. These functions can be used
\r
685 to load and execute code in expanded memory. An application
\r
686 using this feature can significantly reduce the amount of
\r
687 conventional memory it requires. Programs can load needed
\r
688 modules into expanded memory at run time and use Functions
\r
689 22 and 23 to transfer control to these modules.
\r
691 Using expanded memory to store code can improve program
\r
692 execution in many ways. For example, sometimes programs
\r
693 need to be divided into small overlays because of conven-
\r
694 tional memory size limitations. Overlays targeted for
\r
695 expanded memory can be very large because LIM EMS 4.0
\r
696 supports up to 32M bytes of expanded memory. This method of
\r
697 loading overlays improves overall system performance by
\r
698 conserving conventional memory and eliminating conventional
\r
699 memory allocation errors.
\r
702 Moving or Exchanging Memory Regions
\r
704 Using Function 24 (Move/Exchange Memory Region), you can
\r
705 easily move and exchange data between conventional and
\r
706 expanded memory. Function 24 can manipulate up to one
\r
707 megabyte of data with one function call. Although applica-
\r
709 Writing Programs That Use Expanded Memory 7
\r
715 tions can perform this operation without this function,
\r
716 having the expanded memory manager do it reduces the amount
\r
717 of overhead for the application.
\r
719 In addition, this function checks for overlapping regions
\r
720 and performs all the necessary mapping, preserving the
\r
721 mapping context from before the exchange/move call.
\r
724 Getting the Amount of Mappable Memory
\r
726 Function 25 enables applications to determine the total
\r
727 amount of mappable memory the hardware/system currently
\r
728 supports. Not all expanded memory boards supply the same
\r
729 number of physical pages (map registers).
\r
731 The Get Mappable Physical Address Array Entries subfunction
\r
732 returns the total number of physical pages the expanded
\r
733 memory hardware/system is capable of supporting. The Get
\r
734 Mappable Physical Array subfunction returns a cross refer-
\r
735 ence between physical page numbers and the actual segment
\r
736 address for each of the physical pages.
\r
739 Operating System Functions
\r
741 In addition to the functions for application programs, this
\r
742 specification defines functions for operating systems/en-
\r
743 vironments. These functions can be disabled at any time by
\r
744 the operating system/environment, so programs should not
\r
745 depend on their presence. Applications that avoid this
\r
746 warning and use these functions run a great risk of being
\r
747 incompatible with other programs, including the operating
\r
768 Writing Programs That Use Expanded Memory 8
\r
774 Table 2-2. The Advanced Functions
\r
775 ----------------------------------------------------------------
\r
777 Function Description
\r
779 ----------------------------------------------------------------
\r
781 8 The Save Page Map saves the contents of the page
\r
782 mapping registers from all expanded memory boards in
\r
783 an internal save area.
\r
785 9 The Restore Page Map function restores (from an
\r
786 internal save area) the page mapping register
\r
787 contents on the expanded memory boards for a
\r
788 particular EMM handle.
\r
794 12 The Get Handle Count function returns the number of
\r
795 open EMM handles in the system.
\r
797 13 The Get Handle Pages function returns the number of
\r
798 pages allocated to a specific EMM handle.
\r
800 14 The Get All Handle Pages function returns an array
\r
801 of the active EMM handles and the number of pages
\r
802 allocated to each one.
\r
804 15 The Get/Set Page Map subfunction saves or restores
\r
805 the mapping context for all mappable memory regions
\r
806 (conventional and expanded) in a destination array
\r
807 which the application supplies.
\r
809 16 The Get/Set Partial Page Map subfunction provides a
\r
810 mechanism for saving a partial mapping context for
\r
811 specific mappable memory regions in a system.
\r
813 17 The Map/Unmap Multiple Handle Pages function can, in
\r
814 a single invocation, map (or unmap) logical pages
\r
815 into as many physical pages as the system supports.
\r
817 18 The Reallocate Pages function can increase or
\r
818 decrease the amount of expanded memory allocated to
\r
821 19 The Get/Set Handle Attribute function allows an
\r
822 application program to determine and set the
\r
823 attribute associated with a handle.
\r
827 Writing Programs That Use Expanded Memory 9
\r
833 Table 2-2. The Advanced Functions (continued)
\r
834 ----------------------------------------------------------------
\r
836 Function Description
\r
838 ----------------------------------------------------------------
\r
840 20 The Get/Set Handle Name function gets the eight
\r
841 character name currently assigned to a handle and
\r
842 can assign an eight character name to a handle.
\r
844 21 The Get Handle Directory function returns informa-
\r
845 tion about active handles and the names assigned to
\r
848 22 The Alter Page Map & Jump function alters the memory
\r
849 mapping context and transfers control to the
\r
852 23 The Alter Page Map & Call function alters the speci-
\r
853 fied mapping context and transfers control to the
\r
854 specified address. A return can then restore the
\r
855 context and return control to the caller.
\r
857 24 The Move/Exchange Memory Region function copies or
\r
858 exchanges a region of memory from conventional to
\r
859 conventional memory, conventional to expanded
\r
860 memory, expanded to conventional memory, or expanded
\r
861 to expanded memory.
\r
863 25 The Get Mappable Physical Address Array function
\r
864 returns an array containing the segment address and
\r
865 physical page number for each mappable physical page
\r
868 26 The Get Expanded Memory Hardware Information
\r
869 function returns an array containing the hardware
\r
870 capabilities of the expanded memory system.
\r
872 27 The Allocate Standard/Raw Pages function allocates
\r
873 the number of standard or non-standard size pages
\r
874 that the operating system requests and assigns a
\r
875 unique EMM handle to these pages.
\r
877 28 The Alternate Map Register Set function enables an
\r
878 application to simulate alternate sets of hardware
\r
881 29 The Prepare Expanded Memory Hardware for Warm Boot
\r
882 function prepares the expanded memory hardware for
\r
883 an "impending" warm boot.
\r
886 Writing Programs That Use Expanded Memory 10
\r
892 Table 2-2. The Advanced Functions (continued)
\r
893 ----------------------------------------------------------------
\r
895 Function Description
\r
897 ----------------------------------------------------------------
\r
899 30 The Enable/Disable OS/E function enables operating
\r
900 systems developers to enable and disable functions
\r
901 designed for operating system use.
\r
903 ----------------------------------------------------------------
\r
945 Writing Programs That Use Expanded Memory 11
\r
951 Programming Guidelines
\r
953 The following section contains guidelines for programmers
\r
954 writing applications that use EMM.
\r
956 o Do not put a program's stack in expanded memory.
\r
958 o Do not replace interrupt 67h. This is the interrupt
\r
959 vector the EMM uses. Replacing interrupt 67h could
\r
960 result in disabling the Expanded Memory Manager.
\r
962 o Do not map into conventional memory address space your
\r
963 application doesn't own. Applications that use the EMM
\r
964 to swap into conventional memory space, must first
\r
965 allocate this space from the operating system. If the
\r
966 operating system is not aware that a region of memory it
\r
967 manages is in use, it will think it is available. This
\r
968 could have disastrous results. EMM should not be used
\r
969 to "allocate" conventional memory. DOS is the proper
\r
970 manager of conventional memory space. EMM should only
\r
971 be used to swap data in conventional memory space
\r
972 previously allocated from DOS.
\r
974 o Applications that plan on using data aliasing in
\r
975 expanded memory must check for the presence of expanded
\r
976 memory hardware. Data aliasing occurs when mapping one
\r
977 logical page into two or more mappable segments. This
\r
978 makes one 16K-byte expanded memory page appear to be in
\r
979 more than one 16K-byte memory address space. Data
\r
980 aliasing is legal and sometimes useful for applications.
\r
982 Software-only expanded memory emulators cannot perform
\r
983 data aliasing. A simple way to distinguish software
\r
984 emulators from actual expanded memory hardware is to
\r
985 attempt data aliasing and check the results. For
\r
986 example, map one logical page into four physical pages.
\r
987 Write to physical page 0. Read physical pages 1-3 to
\r
988 see if the data is there as well. If the data appears
\r
989 in all four physical pages, then expanded memory
\r
990 hardware is installed in the system, and data aliasing
\r
993 o Applications should always return expanded memory pages
\r
994 to the expanded memory manager upon termination. These
\r
995 pages will be made available for other applications. If
\r
996 unneeded pages are not returned to the expanded memory
\r
997 manager, the system could "run out" of expanded memory
\r
998 pages or expanded memory handles.
\r
1000 o Terminate and stay resident programs (TSR's) should
\r
1001 ALWAYS save the state of the map registers before
\r
1002 changing them. Since TSR's may interrupt other programs
\r
1004 Writing Programs That Use Expanded Memory 12
\r
1010 which may be using expanded memory, they must not change
\r
1011 the state of the page mapping registers without first
\r
1012 saving them. Before exiting, TSR's must restore the
\r
1013 state of the map registers.
\r
1015 The following sections describe the three ways to save
\r
1016 and restore the state of the map registers.
\r
1018 1. Save Page Map and Restore Page Map (Functions 8 and
\r
1019 9). This is the simplest of the three methods. The
\r
1020 EMM saves the map register contents in its own data
\r
1021 structures -- the application does not need to
\r
1022 provide extra storage locations for the mapping
\r
1023 context. The last mapping context to be saved,
\r
1024 under a particular handle, will be restored when a
\r
1025 call to Restore Page Map is issued with the same
\r
1026 handle. This method is limited to one mapping
\r
1027 context for each handle and saves the context for
\r
1028 only LIM standard 64K-byte page frames.
\r
1030 2. Get/Set Page Map (Function 15). This method
\r
1031 requires the application to allocate space for the
\r
1032 storage array. The EMM saves the mapping context in
\r
1033 an array whose address is passed to the EMM. When
\r
1034 restoring the mapping context with this method, an
\r
1035 application passes the address of an array which
\r
1036 contains a previously stored mapping context.
\r
1038 This method is preferable if an application needs to
\r
1039 do more than one save before a restore. It provides
\r
1040 a mechanism for switching between more than one
\r
1043 3. Get/Set Partial Page Map (Function 16). This method
\r
1044 provides a way for saving a partial mapping context.
\r
1045 It should be used when the application does not need
\r
1046 to save the context of all mappable memory. This
\r
1047 function also requires that the storage array be
\r
1048 part of the application's data.
\r
1050 o All functions using pointers to data structures must
\r
1051 have those data structures in memory which will not be
\r
1052 mapped out. Functions 22 and 23 (Alter Map & Call and
\r
1053 Alter Map & Jump) are the only exceptions.
\r
1063 Writing Programs That Use Expanded Memory 13
\r
1071 This section lists four example programs that demonstrate
\r
1072 the use of expanded memory.
\r
1077 This program was written using the Microsoft C compiler
\r
1078 Version 3.0. EMM function calls are made with the int86
\r
1079 function found in the dos.h library. To create an ex-
\r
1080 ecutable program use the following compile command line:
\r
1082 msc /Gs /Oat /Ml program,,program;
\r
1085 #include <stdio.h>
\r
1087 #define EMM_INT 0x67 /* EMM interrupt number */
\r
1088 #define GET_PAGE_FRAME 0x41 /* EMM get page frame */
\r
1089 /* function number */
\r
1090 #define GET_UNALLOC_PAGE_COUNT 0x42 /* EMM get unallocated */
\r
1092 /* function number */
\r
1093 #define ALLOCATE_PAGES 0x43 /* EMM allocate pages */
\r
1094 /* function number */
\r
1095 #define MAP_PAGES 0x44 /* EMM map pages */
\r
1096 /* function number */
\r
1097 #define DEALLOCATE_PAGES 0x45 /* EMM deallocate pages */
\r
1098 /* function number */
\r
1099 #define DEVICE_NAME_LENGTH 8 /* length of a device */
\r
1104 union REGS input_regs, output_regs;
\r
1105 struct SREGS segment_regs;
\r
1108 /*------------------------------------------------------------*/
\r
1109 /* Routine to convert a segment:offset pair to a far ptr. */
\r
1110 /*------------------------------------------------------------*/
\r
1111 char *build_ptr (segment, offset)
\r
1113 unsigned int segment;
\r
1114 unsigned int offset;
\r
1118 ptr = (char *)(((unsigned long)segment << 16) + offset);
\r
1122 Writing Programs That Use Expanded Memory 14
\r
1128 /*------------------------------------------------------------*/
\r
1129 /* Function which determines whether EMM device driver */
\r
1130 /* is installed. */
\r
1131 /*------------------------------------------------------------*/
\r
1132 char emm_installed()
\r
1135 char *EMM_device_name = "EMMXXXX0";
\r
1136 char *int_67_device_name_ptr;
\r
1138 /*--------------------------------------------------------*/
\r
1139 /* AH = DOS get interrupt vector function. */
\r
1140 /*--------------------------------------------------------*/
\r
1141 input_regs.h.ah = 0x35;
\r
1143 /*--------------------------------------------------------*/
\r
1144 /* AL = EMM interrupt vector number. */
\r
1145 /*--------------------------------------------------------*/
\r
1146 input_regs.h.al = EMM_INT;
\r
1147 intdosx (&input_regs, &output_regs, &segment_regs);
\r
1149 /*--------------------------------------------------------*/
\r
1150 /* Upon return ES:0Ah points to location where */
\r
1151 /* device name should be. */
\r
1152 /*--------------------------------------------------------*/
\r
1153 int_67_device_name_ptr = build_ptr (segment_regs.es, 0x0A);
\r
1155 /*--------------------------------------------------------*/
\r
1156 /* Compare memory with EMM device name. */
\r
1157 /*--------------------------------------------------------*/
\r
1158 if (memcmp (EMM_device_name, int_67_device_name_ptr,
\r
1159 DEVICE_NAME_LENGTH) == 0)
\r
1165 /*------------------------------------------------------------*/
\r
1166 /* Function which determines if there are enough unallocated */
\r
1167 /* expanded memory pages for the application. */
\r
1168 /*------------------------------------------------------------*/
\r
1169 char enough_unallocated_pages (pages_needed)
\r
1173 input_regs.h.ah = GET_UNALLOCATED_PAGE_COUNT;
\r
1174 int86 (EMM_INT, &input_regs, &output_regs);
\r
1175 if (output_regs.h.ah != 0 || pages_needed > output_regs.x.bx)
\r
1181 Writing Programs That Use Expanded Memory 15
\r
1187 /*------------------------------------------------------------*/
\r
1188 /* Function which allocates expanded memory pages and passes */
\r
1189 /* back to the main EMM handle. */
\r
1190 /*------------------------------------------------------------*/
\r
1191 char allocate_expanded_memory_pages (pages_needed,emm_handle_ptr)
\r
1194 unsigned int *emm_handle_ptr;
\r
1196 input_regs.h.ah = ALLOCATE_PAGES;
\r
1197 input_regs.x.bx = pages_needed;
\r
1198 int86 (EMM_INT, &input_regs, &output_regs);
\r
1199 if (output_regs.h.ah == 0) {
\r
1200 *emm_handle_ptr = output_regs.x.dx;
\r
1207 /*------------------------------------------------------------*/
\r
1208 /* Routine to map a logical page to a physical page. */
\r
1209 /*------------------------------------------------------------*/
\r
1210 char map_expanded_memory_pages (emm_handle, physical_page,
\r
1212 unsigned int emm_handle;
\r
1213 int physical_page;
\r
1216 input_regs.h.ah = MAP_PAGES;
\r
1217 input_regs.h.al = physical_page;
\r
1218 input_regs.x.bx = logical_page;
\r
1219 input_regs.x.dx = emm_handle;
\r
1220 int86 (EMM_INT, &input_regs, &output_regs);
\r
1221 if (output_regs.h.ah == 0)
\r
1240 Writing Programs That Use Expanded Memory 16
\r
1246 /*------------------------------------------------------------*/
\r
1247 /* Routine which gets the page frame base address from EMM. */
\r
1248 /*------------------------------------------------------------*/
\r
1249 char get_page_frame_address (pf_ptr)
\r
1253 input_regs.h.ah = GET_PAGE_FRAME;
\r
1254 int86 (EMM_INT, &input_regs, &output_regs);
\r
1255 if (output_regs.h.ah != 0) /* check EMM status */
\r
1258 *pf_ptr = build_ptr (output_regs.x.bx, 0);
\r
1262 /*------------------------------------------------------------*/
\r
1263 /* Routine to release all expanded memory pages allocated */
\r
1264 /* by an EMM handle. */
\r
1265 /*------------------------------------------------------------*/
\r
1267 char deallocate_expanded_memory_pages (emm_handle)
\r
1269 unsigned int emm_handle;
\r
1271 input_regs.h.ah = DEALLOCATE_PAGES;
\r
1272 input_regs.x.dx = emm_handle;
\r
1273 int86 (EMM_INT, &input_regs, &output_regs);
\r
1274 if (output_regs.h.ah == 0)
\r
1283 unsigned int emm_handle;
\r
1286 int physical_page;
\r
1290 /*--------------------------------------------------------*/
\r
1291 /* Determine if EMM is installed. */
\r
1292 /*--------------------------------------------------------*/
\r
1293 if (!emm_installed())
\r
1299 Writing Programs That Use Expanded Memory 17
\r
1305 /*--------------------------------------------------------*/
\r
1306 /* Determine if enough expanded memory pages exist for */
\r
1307 /* application. */
\r
1308 /*--------------------------------------------------------*/
\r
1310 if (!enough_unallocated_pages (pages_needed))
\r
1313 /*--------------------------------------------------------*/
\r
1314 /* Allocate expanded memory pages. */
\r
1315 /*--------------------------------------------------------*/
\r
1316 if (!allocate_expanded_memory_pages (pages_needed,
\r
1320 /*--------------------------------------------------------*/
\r
1321 /* Map in the required pages. */
\r
1322 /*--------------------------------------------------------*/
\r
1323 physical_page = 0;
\r
1325 if (!map_expanded_memory_pages (emm_handle, physical_page,
\r
1329 /*--------------------------------------------------------*/
\r
1330 /* Get expanded memory page frame address. */
\r
1331 /*--------------------------------------------------------*/
\r
1332 if (!get_page_frame_address (&pf_addr))
\r
1335 /*--------------------------------------------------------*/
\r
1336 /* Write to expanded memory. */
\r
1337 /*--------------------------------------------------------*/
\r
1338 for (index = 0; index < 0x3fff; index++)
\r
1339 pf_addr[index] = index;
\r
1341 /*--------------------------------------------------------*/
\r
1342 /* Return expanded memory pages before exiting. */
\r
1343 /*--------------------------------------------------------*/
\r
1344 if (!deallocate_expanded_memory_pages (emm_handle))
\r
1358 Writing Programs That Use Expanded Memory 18
\r
1366 This program shows you how to use the basic functions of the LIM
\r
1367 Expanded Memory Specification with Turbo Pascal. The program
\r
1368 does the following:
\r
1370 1. Makes sure the LIM Expanded Memory Manager (EMM) has
\r
1373 2. Displays the version number of the EMM.
\r
1375 3. Determines if there are enough pages of memory for the
\r
1376 program. It then displays the total number of EMM pages
\r
1377 present in the system and the number available for use.
\r
1379 4. Requests the desired number of pages from the EMM.
\r
1381 5. Maps a logical page into one of the physical pages.
\r
1383 6. Displays the base address of our EMM memory page frame.
\r
1384 Performs a simple read/write test on the EMM memory.
\r
1386 7. Returns the EMM memory given to us back to the EMM.
\r
1390 All the calls are structured to return the result or error code
\r
1391 of the Expanded Memory function performed as an integer. If the
\r
1392 error code is not zero, an error has occurred, a simple error
\r
1393 procedure is called, and the program terminates.
\r
1397 ST80 = string[80];
\r
1400 Registers = record
\r
1402 1: (AX,BX,CX,DX,BP,SI,DI,DS,ES,FLAGS: Integer);
\r
1403 2: (AL,AH,BL,BH,CL,CH,DL,DH : Byte);
\r
1409 GET_PAGE_FRAME = $41;
\r
1410 GET_UNALLOCATED_PAGE_COUNT = $42;
\r
1411 ALLOCATE_PAGES = $43;
\r
1413 DEALLOCATE_PAGES = $45;
\r
1414 GET_VERSION = $46;
\r
1417 Writing Programs That Use Expanded Memory 19
\r
1423 {------------------------------------------------------------}
\r
1424 { Assume the application needs one EMM page. }
\r
1425 {------------------------------------------------------------}
\r
1426 APPLICATION_PAGE_COUNT = 1;
\r
1432 Page_Frame_Base_Address,
\r
1438 Pages_EMM_Available,
\r
1440 Available_EMM_Pages: Integer;
\r
1443 Pages_Number_String: ST3;
\r
1447 {------------------------------------------------------------}
\r
1448 { The function Hex_String converts an integer into a four }
\r
1449 { character hexadecimal number (string) with leading zeros. }
\r
1450 {------------------------------------------------------------}
\r
1451 Function Hex_String (Number: Integer): ST5;
\r
1452 Function Hex_Char (Number: Integer): Char;
\r
1454 If Number < 10 then
\r
1455 Hex_Char := Char (Number + 48)
\r
1457 Hex_Char := Char (Number + 55);
\r
1458 end; { Function Hex_char }
\r
1465 S := Hex_Char ((Number shr 1) div 2048);
\r
1466 Number := (((Number shr 1) mod 2048) shl 1) + (Number and 1);
\r
1467 S := S + Hex_Char (Number div 256);
\r
1468 Number := Number mod 256;
\r
1469 S := S + Hex_Char (Number div 16);
\r
1470 Number := Number mod 16;
\r
1471 S := S + Hex_Char (Number);
\r
1472 Hex_String := S + 'h';
\r
1473 end; { Function Hex_String }
\r
1476 Writing Programs That Use Expanded Memory 20
\r
1482 {------------------------------------------------------------}
\r
1483 { The function Emm_Installed checks to see if the }
\r
1484 { EMM is loaded in memory. It does this by looking }
\r
1485 { for the string 'EMMXXXX0', which should be located }
\r
1486 { at 10 bytes from the beginning of the code segment the }
\r
1487 { EMM interrupt, 67h, points to. }
\r
1488 {------------------------------------------------------------}
\r
1489 Function Emm_Installed: Boolean;
\r
1491 Emm_Device_Name : string[8];
\r
1492 Int_67_Device_Name: string[8];
\r
1493 Position : integer;
\r
1497 Int_67_Device_Name := '';
\r
1498 Emm_Device_Name := 'EMMXXXX0';
\r
1501 {----------------------------------------------------}
\r
1502 { Get the code segment interrupt 67h points to }
\r
1503 { the EMM interrupt by using DOS function 35h. }
\r
1504 { (get interrupt vector) }
\r
1505 {----------------------------------------------------}
\r
1508 Intr (DOS_Int, Regs);
\r
1509 {----------------------------------------------------}
\r
1510 { The ES pseudo-register contains the segment }
\r
1511 { address pointed to by interrupt 67h. Create an }
\r
1512 { eight character string from the eight successive }
\r
1513 { bytes at address ES:$000A (10 bytes from ES) }
\r
1514 {----------------------------------------------------}
\r
1515 For Position := 0 to 7 do
\r
1516 Int_67_Device_Name :=
\r
1517 Int_67_Device_Name + Chr (mem[ES:Position + $0A]);
\r
1518 Emm_Installed := True;
\r
1519 {----------------------------------------------------}
\r
1520 { If the string is the EMM manager signature, }
\r
1521 { 'EMMXXXX0', then EMM is installed and ready for }
\r
1522 { use. If not, then EMM is not present. }
\r
1523 {----------------------------------------------------}
\r
1524 If Int_67_Device_Name <> Emm_Device_Name
\r
1525 then Emm_Installed := False;
\r
1526 end; { with Regs do }
\r
1527 end; { Function Emm_Installed }
\r
1535 Writing Programs That Use Expanded Memory 21
\r
1541 {------------------------------------------------------------}
\r
1542 { This function returns the total number of EMM pages }
\r
1543 { present in the system, and the number of EMM pages that }
\r
1544 { are available. }
\r
1545 {------------------------------------------------------------}
\r
1546 Function EMM_Pages_Available
\r
1547 (Var Total_EMM_Pages, Pages_Available: Integer): Integer;
\r
1554 {----------------------------------------------------}
\r
1555 { Get the number of currently unallocated pages and }
\r
1556 { the total number of pages in the system from EMM. }
\r
1557 { Load pseudo-registers prior to invoking EMM. }
\r
1558 { AH = get unallocated page count function }
\r
1559 {----------------------------------------------------}
\r
1560 AH := GET_UNALLOCATED_PAGE_COUNT;
\r
1561 Intr (EMM_INT, Regs);
\r
1562 {----------------------------------------------------}
\r
1563 { Unload the pseudo-registers after invoking EMM. }
\r
1564 { BX = currently unallocated pages }
\r
1565 { DX = total pages in the system }
\r
1567 {----------------------------------------------------}
\r
1568 Pages_Available := BX;
\r
1569 Total_EMM_Pages := DX;
\r
1570 EMM_Pages_Available := AH;
\r
1572 end; { Function EMM_Pages_Available }
\r
1575 {------------------------------------------------------------}
\r
1576 { This function requests the specified number of pages }
\r
1578 {------------------------------------------------------------}
\r
1579 Function Allocate_Expanded_Memory_Pages
\r
1580 (Pages_Needed: Integer; Var Handle: Integer): Integer;
\r
1594 Writing Programs That Use Expanded Memory 22
\r
1603 {----------------------------------------------------}
\r
1604 { Allocate the specified number of pages from EMM. }
\r
1605 { Load pseudo-registers prior to invoking EMM. }
\r
1606 { AH = allocate pages function. }
\r
1607 { BX = number of pages to allocate. }
\r
1608 {----------------------------------------------------}
\r
1609 AH := ALLOCATE_PAGES;
\r
1610 BX := Pages_Needed;
\r
1611 Intr (EMM_INT, Regs);
\r
1612 {----------------------------------------------------}
\r
1613 { Unload the pseudo-registers after invoking EMM. }
\r
1614 { DX = EMM handle }
\r
1616 {----------------------------------------------------}
\r
1618 Allocate_Expanded_Memory_Pages := AH;
\r
1620 end; { Function Allocate_Expanded_Memory_Pages }
\r
1623 {------------------------------------------------------------}
\r
1624 { This function maps a logical page allocated by the }
\r
1625 { Allocate_Expanded_Memory_Pages function into one of the }
\r
1626 { four physical pages. }
\r
1627 {------------------------------------------------------------}
\r
1628 Function Map_Expanded_Memory_Pages
\r
1629 (Handle, Logical_Page, Physical_Page: Integer): Integer;
\r
1636 {----------------------------------------------------}
\r
1637 { Map a logical page at a physical page. }
\r
1638 { Load pseudo-registers prior to invoking EMM. }
\r
1639 { AH = map page function }
\r
1641 { BX = logical page number }
\r
1642 { AL = physical page number }
\r
1643 {----------------------------------------------------}
\r
1646 BX := Logical_Page;
\r
1647 AL := Physical_Page;
\r
1648 Intr (EMM_INT, Regs);
\r
1653 Writing Programs That Use Expanded Memory 23
\r
1659 {----------------------------------------------------}
\r
1660 { Unload the pseudo-registers after invoking EMM. }
\r
1662 {----------------------------------------------------}
\r
1663 Map_Expanded_Memory_Pages := AH;
\r
1664 end; { with Regs do }
\r
1665 end; { Function Map_Expanded_Memory_Pages }
\r
1668 {------------------------------------------------------------}
\r
1669 { This function gets the physical address of the EMM page }
\r
1670 { frame we are using. The address returned is the segment }
\r
1671 { of the page frame. }
\r
1672 {------------------------------------------------------------}
\r
1673 Function Get_Page_Frame_Base_Address
\r
1674 (Var Page_Frame_Address: Integer): Integer;
\r
1681 {----------------------------------------------------}
\r
1682 { Get the page frame segment address from EMM. }
\r
1683 { Load pseudo-registers prior to invoking EMM. }
\r
1684 { AH = get page frame segment function }
\r
1685 {----------------------------------------------------}
\r
1686 AH := GET_PAGE_FRAME;
\r
1687 Intr (EMM_INT, Regs);
\r
1688 {----------------------------------------------------}
\r
1689 { Unload the pseudo-registers after invoking EMM. }
\r
1690 { BX = page frame segment address }
\r
1692 {----------------------------------------------------}
\r
1693 Page_Frame_Address := BX;
\r
1694 Get_Page_Frame_Base_Address := AH;
\r
1695 end; { with Regs do }
\r
1696 end; { Function Get_Page_Frame_Base_Address }
\r
1699 {------------------------------------------------------------}
\r
1700 { This function releases the EMM memory pages allocated to }
\r
1701 { us, back to the EMM memory pool. }
\r
1702 {------------------------------------------------------------}
\r
1703 Function Deallocate_Expanded_Memory_Pages
\r
1704 (Handle: Integer): Integer;
\r
1712 Writing Programs That Use Expanded Memory 24
\r
1721 {----------------------------------------------------}
\r
1722 { Deallocate the pages allocated to an EMM handle. }
\r
1723 { Load pseudo-registers prior to invoking EMM. }
\r
1724 { AH = deallocate pages function }
\r
1725 { DX = EMM handle }
\r
1726 {----------------------------------------------------}
\r
1727 AH := DEALLOCATE_PAGES;
\r
1729 Intr (EMM_INT, Regs);
\r
1730 {----------------------------------------------------}
\r
1731 { Unload the pseudo-registers after invoking EMM. }
\r
1733 {----------------------------------------------------}
\r
1734 Deallocate_Expanded_Memory_Pages := AH;
\r
1735 end; { with Regs do }
\r
1736 end; { Function Deallocate_Expanded_Memory_Pages }
\r
1739 {------------------------------------------------------------}
\r
1740 { This function returns the version number of the EMM as }
\r
1741 { a three-character string. }
\r
1742 {------------------------------------------------------------}
\r
1743 Function Get_Version_Number (Var Version_String: ST3): Integer;
\r
1746 Integer_Part, Fractional_Part: Char;
\r
1751 {----------------------------------------------------}
\r
1752 { Get the version of EMM. }
\r
1753 { Load pseudo-registers prior to invoking EMM. }
\r
1754 { AH = get EMM version function }
\r
1755 {----------------------------------------------------}
\r
1756 AH := GET_VERSION;
\r
1757 Intr (EMM_INT, Regs);
\r
1771 Writing Programs That Use Expanded Memory 25
\r
1777 {----------------------------------------------------}
\r
1778 { If the version number returned was OK, then }
\r
1779 { convert it to a three-character string. }
\r
1780 {----------------------------------------------------}
\r
1781 If AH=STATUS_OK then
\r
1783 {------------------------------------------------}
\r
1784 { The upper four bits of AH are the integer }
\r
1785 { portion of the version number, the lower four }
\r
1786 { bits are the fractional portion. Convert the }
\r
1787 { integer value to ASCII by adding 48. }
\r
1788 {------------------------------------------------}
\r
1789 Integer_Part := Char (AL shr 4 + 48);
\r
1790 Fractional_Part := Char (AL and $F + 48);
\r
1791 Version_String := Integer_Part + '.' +
\r
1793 end; { If AH=STATUS_OK }
\r
1794 {----------------------------------------------------}
\r
1795 { Unload the pseudo-registers after invoking EMM. }
\r
1797 {----------------------------------------------------}
\r
1798 Get_Version_Number := AH;
\r
1799 end; { with Regs do }
\r
1800 end; { Function Get_Version_Number }
\r
1803 {------------------------------------------------------------}
\r
1804 { This procedure prints an error message passed by the }
\r
1805 { caller, prints the error code passed by the caller in hex, }
\r
1806 { and then terminates the program with an error level of 1. }
\r
1807 {------------------------------------------------------------}
\r
1808 Procedure Error (Error_Message: ST80; Error_Number: Integer);
\r
1810 Writeln (Error_Message);
\r
1811 Writeln (' Error_Number = ', Hex_String (Error_Number));
\r
1812 Writeln ('EMM test program aborting.');
\r
1814 end; { Procedure Error }
\r
1817 {--------------------------------------------------------------}
\r
1818 { This program is an example of the basic EMM functions that }
\r
1819 { you need in order to use EMM memory with Turbo Pascal. }
\r
1820 {--------------------------------------------------------------}
\r
1823 Window (5,2,77,22);
\r
1830 Writing Programs That Use Expanded Memory 26
\r
1836 {------------------------------------------------------------}
\r
1837 { Determine if the Expanded Memory Manager is installed. If }
\r
1838 { not, then terminate 'main' with an ErrorLevel code of 1. }
\r
1839 {------------------------------------------------------------}
\r
1840 If not (Emm_Installed) then
\r
1842 Writeln ('The LIM EMM is not installed.');
\r
1847 { Get the version number and display it }
\r
1848 Error_Code := Get_Version_Number (Version_Number);
\r
1849 If Error_Code <> STATUS_OK then
\r
1850 Error ('Error getting EMM version number.', Error_Code)
\r
1852 Writeln ('LIM Expanded Memory Manager, version ',
\r
1853 Version_Number, ' is ready for use.');
\r
1857 {------------------------------------------------------------}
\r
1858 { Determine if there are enough expanded memory pages for }
\r
1859 { this application. }
\r
1860 {------------------------------------------------------------}
\r
1861 Pages_Needed := APPLICATION_PAGE_COUNT;
\r
1862 Error_Code := EMM_Pages_Available (Total_EMM_Pages,
\r
1863 Available_EMM_Pages);
\r
1864 If Error_Code <> STATUS_OK then
\r
1865 Error ('Error determining number of EMM pages available.',
\r
1867 Writeln ('There are a total of ', Total_EMM_Pages,
\r
1868 ' expanded memory pages present in this system.');
\r
1869 Writeln (' ', Available_EMM_Pages,
\r
1870 ' of those pages are available for use.');
\r
1873 {------------------------------------------------------------}
\r
1874 { If there is an insufficient number of pages for the }
\r
1875 { application, then report the error and terminate the EMM }
\r
1876 { example program. }
\r
1877 {------------------------------------------------------------}
\r
1878 If Pages_Needed > Available_EMM_Pages then
\r
1880 Str (Pages_Needed, Pages_Number_String);
\r
1881 Error ('We need ' + Pages_Number_String +
\r
1882 ' EMM pages. There are not that many available.',
\r
1884 end; { Pages_Needed > Available_EMM_Pages }
\r
1889 Writing Programs That Use Expanded Memory 27
\r
1895 {------------------------------------------------------------}
\r
1896 { Allocate expanded memory pages for our use. }
\r
1897 {------------------------------------------------------------}
\r
1899 Allocate_Expanded_Memory_Pages (Pages_Needed, Emm_Handle);
\r
1900 Str (Pages_Needed, Pages_Number_String);
\r
1901 If Error_Code <> STATUS_OK then
\r
1902 Error ('EMM test program failed trying to allocate '
\r
1903 + Pages_Number_String
\r
1904 + ' pages for usage.', Error_Code);
\r
1905 Writeln (APPLICATION_PAGE_COUNT,
\r
1906 ' EMM page(s) allocated for the EMM test program.');
\r
1909 {------------------------------------------------------------}
\r
1910 { Map in the required logical pages to the physical pages }
\r
1911 { given to us, in this case just one page. }
\r
1912 {------------------------------------------------------------}
\r
1913 Logical_Page := 0;
\r
1914 Physical_Page := 0;
\r
1915 Error_Code := Map_Expanded_Memory_Pages (Emm_Handle,
\r
1918 If Error_Code <> STATUS_OK then
\r
1919 Error ('EMM test program failed trying to map '
\r
1920 + 'logical pages into physical pages.',
\r
1923 Writeln ('Logical Page ',
\r
1925 ' successfully mapped into Physical Page ',
\r
1929 {------------------------------------------------------------}
\r
1930 { Get the expanded memory page frame address. }
\r
1931 {------------------------------------------------------------}
\r
1932 Error_Code := Get_Page_Frame_Base_Address
\r
1933 (Page_Frame_Base_Address);
\r
1934 If Error_Code <> STATUS_OK then
\r
1935 Error ('EMM test program unable to get the base Page'
\r
1936 + ' Frame Address.',
\r
1938 Writeln ('The base address of the EMM page frame is = '
\r
1939 + Hex_String (Page_Frame_Base_Address));
\r
1948 Writing Programs That Use Expanded Memory 28
\r
1954 {------------------------------------------------------------}
\r
1955 { Write a test pattern to expanded memory. }
\r
1956 {------------------------------------------------------------}
\r
1957 For Offset := 0 to 16382 do
\r
1959 Mem[Page_Frame_Base_Address:Offset] := Offset mod 256;
\r
1962 {------------------------------------------------------------}
\r
1963 { Make sure that what is in EMM memory is what was just }
\r
1965 {------------------------------------------------------------}
\r
1966 Writeln ('Testing EMM memory.');
\r
1970 while (Offset <= 16382) and (Verify = True) do
\r
1972 If Mem[Page_Frame_Base_Address:Offset] <> Offset mod 256
\r
1973 then Verify := False;
\r
1974 Offset := Succ (Offset);
\r
1975 end; { while (Offset <= 16382) and (Verify = True) }
\r
1977 {------------------------------------------------------------}
\r
1978 { If what is read does not match what was written, }
\r
1979 { an error occurred. }
\r
1980 {------------------------------------------------------------}
\r
1981 If not Verify then
\r
1982 Error ('What was written to EMM memory was not found during'
\r
1983 + ' memory verification test.',
\r
1985 Writeln ('EMM memory test successful.');
\r
1988 {------------------------------------------------------------}
\r
1989 { Return the expanded memory pages given to us back to the }
\r
1990 { EMM memory pool before terminating our test program. }
\r
1991 {------------------------------------------------------------}
\r
1992 Error_Code := Deallocate_Expanded_Memory_Pages (Emm_Handle);
\r
1993 If Error_Code <> STATUS_OK then
\r
1994 Error ('EMM test program was unable to deallocate '
\r
1995 + 'the EMM pages in use.',
\r
1997 Writeln (APPLICATION_PAGE_COUNT,
\r
1998 ' pages(s) deallocated.');
\r
2000 Writeln ('EMM test program completed.');
\r
2007 Writing Programs That Use Expanded Memory 29
\r
2015 This program is written in Microsoft's macro assembler.
\r
2019 ASSUME CS:CODE, DS:CODE
\r
2026 check_emm_installed:
\r
2028 MOV AH,35h ; AH = DOS get interrupt vector
\r
2030 MOV AL,67h ; AL = EMM interrupt vector number
\r
2032 MOV DI,0Ah ; ES:DI points to where device
\r
2034 LEA SI,EMM_device_name ; DS:SI points to ASCII string
\r
2035 ; containing EMM device name
\r
2037 MOV CX,device_name_length ; set up loop counter for string op
\r
2038 CLD ; set up direction flag for forward
\r
2039 REPE CMPSB ; Compare the strings
\r
2040 JNE exit ; IF strings not equal THEN exit
\r
2042 check_enough_unallocated_pages:
\r
2044 MOV AH,41h ; AH = EMM get unallocated page
\r
2045 ; count function code
\r
2047 OR AH,AH ; Check EMM status
\r
2048 JNZ emm_error_handler ; IF error THEN goto error handler
\r
2050 allocate_expanded_memory_pages:
\r
2052 MOV AH,43h ; AH = EMM allocate pages
\r
2054 MOV BX,2 ; BX = number of pages needed
\r
2056 OR AH,AH ; Check EMM status
\r
2057 JNZ emm_error_handler ; IF error THEN goto error handler
\r
2059 MOV emm_handle,DX ; save EMM handle
\r
2061 map_expanded_memory_pages:
\r
2063 MOV AH,44h ; AH = EMM map pages function
\r
2064 MOV DX,emm_handle ; DX = application's handle
\r
2066 Writing Programs That Use Expanded Memory 30
\r
2074 MOV BX,0 ; BX = logical page 0
\r
2075 MOV AL,0 ; AL = physical page 0
\r
2077 OR AH,AH ; Check EMM status
\r
2078 JNZ emm_error_handler ; If error THEN goto error handler
\r
2080 get_page_frame_address:
\r
2082 MOV AH,41h ; AH = EMM get page frame base
\r
2083 ; address function
\r
2085 OR AH,AH ; Check EMM status
\r
2086 JNZ emm_error_handler ; IF error THEN goto error handler
\r
2087 MOV pf_addr,BX ; ELSE save pf_addr
\r
2089 write_to_expanded_memory: ; Write zeros to memory mapped at
\r
2092 MOV ES,AX ; ES points to physical page 0
\r
2093 MOV DI,0 ; DI indexes into physical page 0
\r
2094 MOV AL,0 ; Initialize AL for string STOSB
\r
2095 MOV CX,4000h ; Initialize loop counter to length
\r
2096 ; of expanded memory page size
\r
2097 CLD ; set up direction flag for forward
\r
2102 MOV AH,45h ; AH = EMM deallocate pages
\r
2105 INT 67h ; return handle's pages to EMM
\r
2106 OR AH,AH ; Check EMM status
\r
2107 JNZ emm_error_handler ; IF error THEN goto error handler
\r
2111 MOV AH,4Ch ; AH = DOS exit function
\r
2112 INT 21h ; return to DOS
\r
2115 EMM_device_name DB 'EMMXXXX0' ; ASCII EMM device name string
\r
2117 device_name_length EQU 8
\r
2125 Writing Programs That Use Expanded Memory 31
\r
2133 This program is an example of how to exchange a 256K-byte
\r
2134 block of data from conventional memory to expanded memory.
\r
2138 ASSUME CS:CODE, DS:CODE
\r
2142 xchg_packet_set_up:
\r
2144 ;DS:SI = xchg_packet
\r
2146 MOV AX,SEG xchg_packet
\r
2148 MOV SI,OFFSET xchg_packet
\r
2150 ;Moving 256K of data from conventional memory to expanded memory
\r
2152 MOV WORD PTR [SI].region_length[0],0
\r
2153 MOV WORD PTR [SI].region_length[2],4
\r
2154 MOV [SI].src_mem_type,0
\r
2155 MOV [SI].dest_mem_type,1
\r
2157 ;starting at segment: 4000h, offset: 0
\r
2159 MOV [SI].src_init_seg_page,4000h
\r
2160 MOV [SI].src_init_offset,0
\r
2162 ;Move data into expanded memory logical page 0, offset 0.
\r
2164 MOV [SI].dest_init_seg_page,0
\r
2165 MOV [SI].dest_init_offset,0
\r
2167 ;Initialize for future compatibility
\r
2169 MOV [SI].src_handle,0
\r
2171 ;Need handle for expanded memory destination.
\r
2174 MOV [SI].dest_handle,DX
\r
2176 ;AX = EMM Exchange Memory function
\r
2181 JNZ emm_error_handler
\r
2184 Writing Programs That Use Expanded Memory 32
\r
2191 region_length DD ?
\r
2194 src_init_offset DW ?
\r
2195 src_init_seg_page DW ?
\r
2196 dest_mem_type DB ?
\r
2198 dest_init_offset DW ?
\r
2199 dest_init_seg_page DW ?
\r
2202 xchg_packet xchg_struct
\r
2243 Writing Programs That Use Expanded Memory 33
\r
2253 This chapter provides you with a standardized set of
\r
2254 expanded memory functions. Because they are standardized,
\r
2255 you avoid potential compatibility problems with other
\r
2256 expanded memory programs that also adhere to the memory
\r
2257 manager specification. Programs that deal directly with the
\r
2258 hardware or that don't adhere to this specification will be
\r
2261 Table 3-1 presents a sequential list of the EMM functions.
\r
2262 The remainder of this chapter provides detailed descriptions
\r
2266 Table 3-1. List of EMM Functions
\r
2267 ----------------------------------------------------------------
\r
2269 Number Function Name Hex Value Page
\r
2271 ----------------------------------------------------------------
\r
2273 1 Get Status 40h 37
\r
2275 2 Get Page Frame Address 41h 38
\r
2277 3 Get Unallocated Page Count 42h 40
\r
2279 4 Allocate Pages 43h 42
\r
2281 5 Map/Unmap Handle Page 44h 46
\r
2283 6 Deallocate Pages 45h 49
\r
2285 7 Get Version 46h 51
\r
2287 8 Save Page Map 47h 53
\r
2289 9 Restore Page Map 48h 55
\r
2291 10 Reserved 49h 57
\r
2293 11 Reserved 4Ah 58
\r
2295 12 Get Handle Count 4Bh 59
\r
2297 13 Get Handle Pages 4Ch 61
\r
2299 14 Get All Handle Pages 4Dh 63
\r
2308 Table 3-1. List of EMM Functions (continued)
\r
2309 ----------------------------------------------------------------
\r
2311 Number Function Name Hex Value Page
\r
2313 ----------------------------------------------------------------
\r
2315 15 Get Page Map 4E00h 65
\r
2316 Set Page Map 4E01h 67
\r
2317 Get & Set Page Map 4E02h 69
\r
2318 Get Size of Page Map Save Array 4E03h 71
\r
2320 16 Get Partial Page Map 4F00h 73
\r
2321 Set Partial Page Map 4F01h 76
\r
2322 Get Size of Partial Page Map
\r
2323 Save Array 4F02h 78
\r
2325 17 Map/Unmap Multiple Handle Pages
\r
2326 (Physical page number mode) 5000h 82
\r
2327 Map/Unmap Multiple Handle Pages
\r
2328 (Segment address mode) 5001h 85
\r
2330 18 Reallocate Pages 51h 88
\r
2332 19 Get Handle Attribute 5200h 92
\r
2333 Set Handle Attribute 5201h 94
\r
2334 Get Handle Attribute Capability 5202h 96
\r
2336 20 Get Handle Name 5300h 98
\r
2337 Set Handle Name 5301h 100
\r
2339 21 Get Handle Directory 5400h 102
\r
2340 Search for Named Handle 5401h 105
\r
2341 Get Total Handles 5402h 107
\r
2343 22 Alter Page Map & Jump
\r
2344 (Physical page number mode) 5500h 109
\r
2345 Alter Page Map & Jump
\r
2346 (Segment address mode) 5501h 109
\r
2348 23 Alter Page Map & Call
\r
2349 (Physical page number mode) 5600h 113
\r
2350 Alter Page Map & Call
\r
2351 (Segment address mode) 5601h 113
\r
2352 Get Page Map Stack Space Size 5602h 118
\r
2354 24 Move Memory Region 5700h 120
\r
2355 Exchange Memory Region 5701h 126
\r
2357 25 Get Mappable Physical Address Array 5800h 132
\r
2358 Get Mappable Physical Address Array
\r
2367 Table 3-1. List of EMM Functions (continued)
\r
2368 ----------------------------------------------------------------
\r
2370 Number Function Name Hex Value Page
\r
2372 ----------------------------------------------------------------
\r
2374 26 Get Hardware Configuration Array 5900h 138
\r
2375 Get Unallocated Raw Page Count 5901h 142
\r
2377 27 Allocate Standard Pages 5A00h 144
\r
2378 Allocate Raw Pages 5A01h 147
\r
2380 28 Get Alternate Map Register Set 5B00h 153
\r
2381 Set Alternate Map Register Set 5B01h 157
\r
2382 Get Alternate Map Save Array Size 5B02h 161
\r
2383 Allocate Alternate Map Register Set 5B03h 163
\r
2384 Deallocate Alternate Map Register Set 5B04h 166
\r
2385 Allocate DMA Register Set 5B05h 168
\r
2386 Enable DMA on Alternate Map
\r
2387 Register Set 5B06h 170
\r
2388 Disable DMA on Alternate Map
\r
2389 Register Set 5B07h 173
\r
2390 Deallocate DMA Register Set 5B08h 175
\r
2392 29 Prepare Expanded Memory Hardware
\r
2393 for Warmboot 5Ch 177
\r
2395 30 Enable OS/E Function Set 5D00h 179
\r
2396 Disable OS/E Function Set 5D01h 182
\r
2397 Return OS/E Access Key 5D02h 185
\r
2399 ----------------------------------------------------------------
\r
2426 Function 1. Get Status
\r
2432 The Get Status function returns a status code indicating
\r
2433 whether the memory manager is present and the hardware is
\r
2434 working correctly.
\r
2437 CALLING PARAMETERS
\r
2440 Contains the Get Status Function.
\r
2443 REGISTERS MODIFIED
\r
2450 AH = 0 SUCCESSFUL.
\r
2451 The manager is present in the system, and the hardware
\r
2452 is working correctly.
\r
2454 AH = 80h NON-RECOVERABLE.
\r
2455 The manager detected a malfunction in the memory manager
\r
2458 AH = 81h NON-RECOVERABLE.
\r
2459 The manager detected a malfunction in the expanded
\r
2462 AH = 84h NON-RECOVERABLE.
\r
2463 The function code passed to the memory manager is not
\r
2469 MOV AH,40h ; load function code
\r
2470 INT 67h ; call the memory manager
\r
2471 OR AH,AH ; check EMM status
\r
2472 JNZ emm_err_handler ; jump to error handler on error
\r
2485 Function 2. Get Page Frame Address
\r
2491 The Get Page Frame Address function returns the segment
\r
2492 address where the page frame is located.
\r
2495 CALLING PARAMETERS
\r
2498 Contains the Get Page Frame Address function.
\r
2503 These results are valid only if the status returned is zero.
\r
2505 BX = page frame segment address
\r
2506 Contains the segment address of the page frame.
\r
2509 REGISTERS MODIFIED
\r
2516 AH = 0 SUCCESSFUL.
\r
2517 The manager has returned the page frame address in the
\r
2520 AH = 80h NON-RECOVERABLE.
\r
2521 The manager detected a malfunction in the memory manager
\r
2524 AH = 81h NON-RECOVERABLE.
\r
2525 The manager detected a malfunction in the expanded
\r
2528 AH = 84h NON-RECOVERABLE.
\r
2529 The function code passed to the memory manager is not
\r
2544 Function 2. Get Page Frame Address
\r
2550 page_frame_segment DW ?
\r
2552 MOV AH,41h ; load function code
\r
2553 INT 67h ; call the memory manager
\r
2554 OR AH,AH ; check EMM status
\r
2555 JNZ emm_err_handler ; jump to error handler on error
\r
2556 MOV page_frame_segment,BX ; save page frame address
\r
2603 Function 3. Get Unallocated Page Count
\r
2609 The Get Unallocated Page Count function returns the number
\r
2610 of unallocated pages and the total number of expanded memory
\r
2614 CALLING PARAMETERS
\r
2617 Contains the Get Unallocated Page Count function.
\r
2622 These results are valid only if the status returned is zero.
\r
2624 BX = unallocated pages
\r
2625 The number of expanded memory pages that are currently
\r
2626 available for use (unallocated).
\r
2629 The total number of expanded memory pages.
\r
2632 REGISTERS MODIFIED
\r
2639 AH = 0 SUCCESSFUL.
\r
2640 The manager has returned the number of unallocated pages
\r
2641 and the number of total pages in expanded memory.
\r
2643 AH = 80h NON-RECOVERABLE.
\r
2644 The manager detected a malfunction in the memory manager
\r
2647 AH = 81h NON-RECOVERABLE.
\r
2648 The manager detected a malfunction in the expanded
\r
2651 AH = 84h NON-RECOVERABLE.
\r
2652 The function code passed to the memory manager is not
\r
2662 Function 3. Get Unallocated Page Count
\r
2668 un_alloc_pages DW ?
\r
2671 MOV AH,42h ; load function code
\r
2672 INT 67h ; call the memory manager
\r
2673 OR AH,AH ; check EMM status
\r
2674 JNZ emm_err_handler ; jump to error handler on error
\r
2675 MOV un_alloc_pages,BX ; save unallocated page count
\r
2676 MOV total_pages,DX ; save total page count
\r
2721 Function 4. Allocate Pages
\r
2725 The Allocate Pages function allocates the number of pages
\r
2726 requested and assigns a unique EMM handle to these pages.
\r
2727 The EMM handle owns these pages until the application
\r
2730 Handles which are assigned using this function will have
\r
2731 16K-byte pages, the size of a standard expanded memory page.
\r
2732 If the expanded memory board hardware isn't able to supply
\r
2733 16K-byte pages, it will emulate them by combining multiple
\r
2734 non-standard size pages to form a single 16K-byte page. All
\r
2735 application programs and functions that use the handles this
\r
2736 function returns will deal with 16K-byte pages.
\r
2738 The numeric value of the handles the EMM returns are in the
\r
2739 range of 1 to 254 decimal (0001h to 00FEh). The OS handle
\r
2740 (handle value 0) is never returned by the Allocate Pages
\r
2741 function. Also, the uppermost byte of the handle will be
\r
2742 zero and cannot be used by the application. A memory
\r
2743 manager should be able to supply up to 255 handles, includ-
\r
2744 ing the OS handle. An application can use Function 21 to
\r
2745 find out how many handles an EMM supports.
\r
2747 Allocating zero pages to a handle is not valid. If an
\r
2748 application needs to allocate 0 pages to a handle it should
\r
2749 use Function 27 (Allocate Standard Pages subfunction)
\r
2750 provided for this purpose.
\r
2752 Note............................................................
\r
2753 This note affects expanded memory manager implementors and
\r
2754 operating system developers only. Applications should not
\r
2755 use the following characteristics of the memory manager. An
\r
2756 application violating this rule will be incompatible with
\r
2757 future versions of Microsoft's operating systems and
\r
2760 To be compatible with this specification, an expanded memory
\r
2761 manager will provide a special handle which is available to
\r
2762 the operating system only. This handle will have a value of
\r
2763 0000h and will have a set of pages allocated to it when the
\r
2764 expanded memory manager driver installs. The pages that the
\r
2765 memory manager will automatically allocate to handle 0000h
\r
2766 are those that backfill conventional memory. Typically,
\r
2767 this backfill occurs between addresses 40000h (256K) and
\r
2768 9FFFFh (640K). However, the range can extend below and
\r
2769 above this limit if the hardware and memory manager have the
\r
2780 Function 4. Allocate Pages
\r
2784 An operating system won't have to invoke Function 4 to
\r
2785 obtain this handle because it can assume the handle already
\r
2786 exists and is available for use immediately after the
\r
2787 expanded memory device driver installs. When an operating
\r
2788 system wants to use this handle, it uses the special handle
\r
2789 value of 0000h. The operating system will be able to invoke
\r
2790 any EMM function using this special handle value. To
\r
2791 allocate pages to this handle, the operating system need
\r
2792 only invoke Function 18 (Reallocate Pages).
\r
2794 There are two special cases for this handle:
\r
2796 1. Function 4 (Allocate Pages). This function must never
\r
2797 return zero as a handle value. Applications must always
\r
2798 invoke Function 4 to allocate pages and obtain a handle
\r
2799 which identifies the pages which belong to it. Since
\r
2800 Function 4 never returns a handle value of zero, an
\r
2801 application will never gain access to this special
\r
2804 2. Function 6 (Deallocate Pages). If the operating system
\r
2805 uses it to deallocate the pages which are allocated to
\r
2806 this special handle, the pages the handle owns will be
\r
2807 returned to the manager for use. But the handle will
\r
2808 not be available for reassignment. The manager should
\r
2809 treat a deallocate pages function request for this
\r
2810 handle the same as a reallocate pages function request,
\r
2811 where the number of pages to reallocate to this handle
\r
2815 CALLING PARAMETERS
\r
2818 Contains the Allocate Pages function.
\r
2820 BX = num_of_pages_to_alloc
\r
2821 Contains the number of pages you want your program to
\r
2839 Function 4. Allocate Pages
\r
2845 These results are valid only if the status returned is zero.
\r
2848 Contains a unique EMM handle. Your program must use
\r
2849 this EMM handle (as a parameter) in any function that
\r
2850 requires it. You can use up to 255 handles. The
\r
2851 uppermost byte of the handle will be zero and cannot be
\r
2852 used by the application.
\r
2855 REGISTERS MODIFIED
\r
2862 AH = 0 SUCCESSFUL.
\r
2863 The manager has allocated the requested pages to the
\r
2864 assigned EMM handle.
\r
2866 AH = 80h NON-RECOVERABLE.
\r
2867 The manager detected a malfunction in the memory manager
\r
2870 AH = 81h NON-RECOVERABLE.
\r
2871 The manager detected a malfunction in the expanded
\r
2874 AH = 84h NON-RECOVERABLE.
\r
2875 The function code passed to the memory manager is not
\r
2878 AH = 85h RECOVERABLE.
\r
2879 All EMM handles are being used.
\r
2881 AH = 87h RECOVERABLE.
\r
2882 There aren't enough expanded memory pages present in the
\r
2883 system to satisfy your program's request.
\r
2885 AH = 88h RECOVERABLE.
\r
2886 There aren't enough unallocated pages to satisfy your
\r
2887 program's request.
\r
2889 AH = 89h RECOVERABLE.
\r
2890 Your program attempted to allocate zero pages.
\r
2898 Function 4. Allocate Pages
\r
2904 num_of_pages_to_alloc DW ?
\r
2907 MOV BX,num_of_pages_to_alloc ; load number of pages
\r
2908 MOV AH,43h ; load function code
\r
2909 INT 67h ; call the memory manager
\r
2910 OR AH,AH ; check EMM status
\r
2911 JNZ emm_err_handler ; jump to error handler on error
\r
2912 MOV emm_handle,DX ; save EMM handle
\r
2957 Function 5. Map/Unmap Handle Pages
\r
2963 The Map/Unmap Handle Page function maps a logical page at a
\r
2964 specific physical page anywhere in the mappable regions of
\r
2965 system memory. The lowest valued physical page numbers are
\r
2966 associated with regions of memory outside the conventional
\r
2967 memory range. Use Function 25 (Get Mappable Physical
\r
2968 Address Array) to determine which physical pages within a
\r
2969 system are mappable and determine the segment addresses
\r
2970 which correspond to a specific physical page number.
\r
2971 Function 25 provides a cross reference between physical page
\r
2972 numbers and segment addresses.
\r
2974 This function can also unmap physical pages, making them
\r
2975 inaccessible for reading or writing. You unmap a physical
\r
2976 page by setting its associated logical page to FFFFh.
\r
2978 You might unmap an entire set of mapped pages, for example,
\r
2979 before loading and executing a program. Doing so ensures
\r
2980 the loaded program, if it accesses expanded memory, won't
\r
2981 access the pages your program has mapped. However, you must
\r
2982 save the mapped context before you unmap the physical pages.
\r
2983 This enables you to restore it later so you can access the
\r
2984 memory you mapped there. To save the mapping context, use
\r
2985 Function 8, 15, or 16. To restore the mapping context, use
\r
2986 Function 9, 15, or 16.
\r
2988 The handle determines what type of pages are being mapped.
\r
2989 Logical pages allocated by Function 4 and Function 27
\r
2990 (Allocate Standard Pages subfunction) are referred to as
\r
2991 pages and are 16K bytes long. Logical pages allocated by
\r
2992 Function 27 (Allocate Raw Pages subfunction) are referred to
\r
2993 as raw pages and might not be the same size as logical
\r
2997 CALLING PARAMETERS
\r
3000 Contains the Map Handle Page function.
\r
3002 AL = physical_page_number
\r
3003 Contains the number of the physical page into which the
\r
3004 logical page number is to be mapped. Physical pages are
\r
3005 numbered zero-relative.
\r
3016 Function 5. Map/Unmap Handle Pages
\r
3020 BX = logical_page_number
\r
3021 Contains the number of the logical page to be mapped at
\r
3022 the physical page within the page frame. Logical pages
\r
3023 are numbered zero-relative. The logical page must be in
\r
3024 the range zero through (number of pages allocated to the
\r
3025 EMM handle - 1). However, if BX contains logical page
\r
3026 number FFFFh, the physical page specified in AL will be
\r
3027 unmapped (be made inaccessible for reading or writing).
\r
3030 Contains the EMM handle your program received from
\r
3031 Function 4 (Allocate Pages).
\r
3034 REGISTERS MODIFIED
\r
3041 AH = 0 SUCCESSFUL.
\r
3042 The manager has mapped the page. The page is ready to
\r
3045 AH = 80h NON-RECOVERABLE.
\r
3046 The manager detected a malfunction in the memory manager
\r
3049 AH = 81h NON-RECOVERABLE.
\r
3050 The manager detected a malfunction in the expanded
\r
3053 AH = 83h NON-RECOVERABLE.
\r
3054 The memory manager couldn't find the EMM handle your
\r
3055 program specified.
\r
3057 AH = 84h NON-RECOVERABLE.
\r
3058 The function code passed to the memory manager isn't
\r
3061 AH = 8Ah RECOVERABLE.
\r
3062 The logical page is out of the range of logical pages
\r
3063 which are allocated to the EMM handle. This status is
\r
3064 also returned if a program attempts to map a logical
\r
3065 page when no logical pages are allocated to the handle.
\r
3075 Function 5. Map/Unmap Handle Pages
\r
3079 AH = 8Bh RECOVERABLE.
\r
3080 The physical page number is out of the range of allow-
\r
3081 able physical pages. The program can recover by
\r
3082 attempting to map into memory at a physical page which
\r
3083 is within the range of allowable physical pages.
\r
3089 logical_page_number DW ?
\r
3090 physical_page_number DB ?
\r
3092 MOV DX,emm_handle ; load EMM handle
\r
3093 MOV BX,logical_page_number ; load logical page number
\r
3094 MOV AL,physical_page_number ; load physical page number
\r
3095 MOV AH,44h ; load function code
\r
3096 INT 67h ; call the memory manager
\r
3097 OR AH,AH ; check EMM status
\r
3098 JNZ emm_err_handler ; jump to error handler on error
\r
3134 Function 6. Deallocate Pages
\r
3140 Deallocate Pages deallocates the logical pages currently
\r
3141 allocated to an EMM handle. Only after the application
\r
3142 deallocates these pages can other applications use them.
\r
3143 When a handle is deallocated, its name is set to all ASCII
\r
3144 nulls (binary zeros).
\r
3146 Note............................................................
\r
3147 A program must perform this function before it exits to DOS.
\r
3148 If it doesn't, no other programs can use these pages or the
\r
3149 EMM handle. This means that a program using expanded memory
\r
3150 should trap critical errors and control-break if there is a
\r
3151 chance that the program will have allocated pages when
\r
3152 either of these events occur.
\r
3155 CALLING PARAMETERS
\r
3158 Contains the Deallocate Pages function.
\r
3161 Contains the EMM handle returned by Function 4 (Allocate
\r
3165 REGISTERS MODIFIED
\r
3172 AH = 0 SUCCESSFUL.
\r
3173 The manager has deallocated the pages previously allo-
\r
3174 cated to the EMM handle.
\r
3176 AH = 80h NON-RECOVERABLE.
\r
3177 The manager detected a malfunction in the memory manager
\r
3180 AH = 81h NON-RECOVERABLE.
\r
3181 The manager detected a malfunction in the expanded
\r
3184 AH = 83h NON-RECOVERABLE.
\r
3185 The manager couldn't find the specified EMM handle.
\r
3193 Function 6. Deallocate Pages
\r
3197 AH = 84h NON-RECOVERABLE.
\r
3198 The function code passed to the memory manager is not
\r
3201 AH = 86h RECOVERABLE.
\r
3202 The memory manager detected a save or restore page
\r
3203 mapping context error (Function 8 or 9). There is a
\r
3204 page mapping register state in the save area for the
\r
3205 specified EMM handle. Save Page Map (Function 8) placed
\r
3206 it there and a subsequent Restore Page Map (Function 9)
\r
3207 has not removed it.
\r
3209 If you have saved the mapping context, you must restore
\r
3210 it before you deallocate the EMM handle's pages.
\r
3217 MOV DX,emm_handle ; load EMM handle
\r
3218 MOV AH,45h ; load function code
\r
3219 INT 67h ; call the memory manager
\r
3220 OR AH,AH ; check EMM status
\r
3221 JNZ emm_err_handler ; jump to error handler on error
\r
3252 Function 7. Get Version
\r
3258 The Get Version function returns the version number of the
\r
3259 memory manager software.
\r
3262 CALLING PARAMETERS
\r
3265 Contains the Get Version function.
\r
3270 These results are valid only if the status returned is zero.
\r
3272 AL = version number
\r
3273 Contains the memory manager's version number in binary
\r
3274 coded decimal (BCD) format. The upper four bits contain
\r
3275 the integer digit of the version number. The lower four
\r
3276 bits contain the fractional digit of version number.
\r
3277 For example, version 4.0 is represented like this:
\r
3283 When checking for a version number, an application
\r
3284 should check for a version number or greater. Vendors
\r
3285 may use the fractional digit to indicate enhancements or
\r
3286 corrections to their memory managers. Therefore, to
\r
3287 allow for future versions of memory managers, an
\r
3288 application shouldn't depend on an exact version number.
\r
3291 REGISTERS MODIFIED
\r
3298 AH = 0 SUCCESSFUL.
\r
3299 The manager is present in the system and the hardware is
\r
3300 working correctly.
\r
3311 Function 7. Get Version
\r
3315 AH = 80h NON-RECOVERABLE.
\r
3316 The manager detected a malfunction in the memory manager
\r
3319 AH = 81h NON-RECOVERABLE.
\r
3320 The manager detected a malfunction in the expanded
\r
3323 AH = 84h NON-RECOVERABLE.
\r
3324 The function code passed to the memory manager is not
\r
3332 MOV AH,46h ; load function code
\r
3333 INT 67h ; call the memory manager
\r
3334 OR AH,AH ; check EMM status
\r
3335 JNZ emm_err_handler ; jump to error handler on error
\r
3336 MOV emm_version,AL ; save version number
\r
3370 Function 8. Save Page Map
\r
3376 Save Page Map saves the contents of the page mapping
\r
3377 registers on all expanded memory boards in an internal save
\r
3378 area. The function is typically used to save the memory
\r
3379 mapping context of the EMM handle that was active when a
\r
3380 software or hardware interrupt occurred. (See Function 9,
\r
3381 Restore Page Map, for the restore operation.)
\r
3383 If you're writing a resident program, an interrupt service
\r
3384 routine, or a device driver that uses expanded memory, you
\r
3385 must save the state of the mapping hardware. You must save
\r
3386 this state because application software using expanded
\r
3387 memory may be running when your program is invoked by a
\r
3388 hardware interrupt, a software interrupt, or DOS.
\r
3390 The Save Page Map function requires the EMM handle that was
\r
3391 assigned to your resident program, interrupt service
\r
3392 routine, or device driver at the time it was initialized.
\r
3393 This is not the EMM handle that the application software was
\r
3394 using when your software interrupted it.
\r
3396 The Save Page Map function saves the state of the map
\r
3397 registers for only the 64K-byte page frame defined in
\r
3398 versions 3.x of this specification. Since all applications
\r
3399 written to LIM versions 3.x require saving the map register
\r
3400 state of only this 64K-byte page frame, saving the entire
\r
3401 mapping state for a large number of mappable pages would be
\r
3402 inefficient use of memory. Applications that use a mappable
\r
3403 memory region outside the LIM 3.x page frame should use
\r
3404 Function 15 or 16 to save and restore the state of the map
\r
3408 CALLING PARAMETERS
\r
3411 Contains the Save Page Map function.
\r
3414 Contains the EMM handle assigned to the interrupt
\r
3415 service routine that's servicing the software or
\r
3416 hardware interrupt. The interrupt service routine needs
\r
3417 to save the state of the page mapping hardware before
\r
3418 mapping any pages.
\r
3429 Function 8. Save Page Map
\r
3433 REGISTERS MODIFIED
\r
3440 AH = 0 SUCCESSFUL.
\r
3441 The manager has saved the state of the page mapping
\r
3444 AH = 80h NON-RECOVERABLE.
\r
3445 The manager detected a malfunction in the memory manager
\r
3448 AH = 81h NON-RECOVERABLE.
\r
3449 The manager detected a malfunction in the expanded
\r
3452 AH = 83h NON-RECOVERABLE.
\r
3453 The memory manager couldn't find the EMM handle your
\r
3454 program specified.
\r
3456 AH = 84h NON-RECOVERABLE.
\r
3457 The function code passed to the memory manager is not
\r
3460 AH = 8Ch NON-RECOVERABLE.
\r
3461 There is no room in the save area to store the state of
\r
3462 the page mapping registers. The state of the map
\r
3463 registers has not been saved.
\r
3465 AH = 8Dh CONDITIONALLY-RECOVERABLE.
\r
3466 The save area already contains the page mapping register
\r
3467 state for the EMM handle your program specified.
\r
3474 MOV DX,emm_handle ; load EMM handle
\r
3475 MOV AH,47h ; load function code
\r
3476 INT 67h ; call the memory manager
\r
3477 OR AH,AH ; check EMM status
\r
3478 JNZ emm_err_handler ; jump to error handler on error
\r
3488 Function 9. Restore Page Map
\r
3494 The Restore Page Map function restores the page mapping
\r
3495 register contents on the expanded memory boards for a
\r
3496 particular EMM handle. This function lets your program
\r
3497 restore the contents of the mapping registers its EMM handle
\r
3498 saved. (See Function 8, Save Page Map for the save opera-
\r
3501 If you're writing a resident program, an interrupt service
\r
3502 routine, or a device driver that uses expanded memory, you
\r
3503 must restore the mapping hardware to the state it was in
\r
3504 before your program took over. You must save this state
\r
3505 because application software using expanded memory might
\r
3506 have been running when your program was invoked.
\r
3508 The Restore Page Map function requires the EMM handle that
\r
3509 was assigned to your resident program, interrupt service
\r
3510 routine, or device driver at the time it was initialized.
\r
3511 This is not the EMM handle that the application software was
\r
3512 using when your software interrupted it.
\r
3514 The Restore Page Map function restores the state of the map
\r
3515 registers for only the 64K-byte page frame defined in
\r
3516 versions 3.x of this specification. Since all applications
\r
3517 written to LIM versions 3.x require restoring the map
\r
3518 register state of only this 64K-byte page frame, restoring
\r
3519 the entire mapping state for a large number of mappable
\r
3520 pages would be inefficient use of memory. Applications that
\r
3521 use a mappable memory region outside the LIM 3.x page frame
\r
3522 should use Function 15 or 16 to save and restore the state
\r
3523 of the map registers.
\r
3526 CALLING PARAMETERS
\r
3529 Contains the Restore Page Map function.
\r
3532 Contains the EMM handle assigned to the interrupt
\r
3533 service routine that's servicing the software or
\r
3534 hardware interrupt. The interrupt service routine needs
\r
3535 to restore the state of the page mapping hardware.
\r
3547 Function 9. Restore Page Map
\r
3551 REGISTERS MODIFIED
\r
3558 AH = 0 SUCCESSFUL.
\r
3559 The manager has restored the state of the page mapping
\r
3562 AH = 80h NON-RECOVERABLE.
\r
3563 The manager detected a malfunction in the memory manager
\r
3566 AH = 81h NON-RECOVERABLE.
\r
3567 The manager detected a malfunction in the expanded
\r
3570 AH = 83h NON-RECOVERABLE.
\r
3571 The memory manager couldn't find the EMM handle your
\r
3572 program specified.
\r
3574 AH = 84h NON-RECOVERABLE.
\r
3575 The function code passed to the memory manager is not
\r
3578 AH = 8Eh CONDITIONALLY-RECOVERABLE.
\r
3579 There is no page mapping register state in the save area
\r
3580 for the specified EMM handle. Your program didn't save
\r
3581 the contents of the page mapping hardware, so Restore
\r
3582 Page can't restore it.
\r
3589 MOV DX,emm_handle ; load EMM handle
\r
3590 MOV AH,48h ; load function code
\r
3591 INT 67h ; call the memory manager
\r
3592 OR AH,AH ; check EMM status
\r
3593 JNZ emm_err_handler ; jump to error handler on error
\r
3606 Function 10. Reserved
\r
3610 In earlier versions of the Lotus/Intel/Microsoft Expanded
\r
3611 Memory Specification, Function 10 returned the page mapping
\r
3612 register I/O array. This function is now reserved and new
\r
3613 programs should not use it.
\r
3615 Existing programs that use this function may still work
\r
3616 correctly if the hardware is capable of supporting them.
\r
3617 However, programs that use Functions 16 through 30 in
\r
3618 Version 4.0 of this specification must not use Functions 10
\r
3619 and 11. These functions won't work correctly if your
\r
3620 program attempts to mix the use of the new functions
\r
3621 (Functions 16 through 30) and Functions 10 and 11. Func-
\r
3622 tions 10 and 11 are specific to the hardware on Intel
\r
3623 expanded memory boards and will not work correctly on all
\r
3624 vendors' expanded memory boards.
\r
3665 Function 11. Reserved
\r
3669 In earlier versions of the Lotus/Intel/Microsoft Expanded
\r
3670 Memory Specification, Function 11 returned a page transla-
\r
3671 tion array. This function is now reserved and new programs
\r
3672 should not use it.
\r
3674 Existing programs that use this function may still work
\r
3675 correctly if the hardware is capable of supporting them.
\r
3676 However, programs that use Functions 16 through 30 in
\r
3677 Version 4.0 of this specification must not use Functions 10
\r
3678 and 11. These functions won't work correctly if your
\r
3679 program attempts to mix the use of the new functions
\r
3680 (Functions 16 through 30) and Functions 10 and 11. Func-
\r
3681 tions 10 and 11 are specific to the hardware on Intel
\r
3682 expanded memory boards and will not work correctly on all
\r
3683 vendors' expanded memory boards.
\r
3724 Function 12. Get Handle Count
\r
3730 The Get Handle Count function returns the number of open EMM
\r
3731 handles (including the operating system handle 0) in the
\r
3735 CALLING PARAMETERS
\r
3738 Contains the Get Handle Count function.
\r
3743 These results are valid only if the status returned is zero.
\r
3745 BX = total_open_emm_handles
\r
3746 Contains the number of open EMM handles [including the
\r
3747 operating system handle (0)]. This number will not
\r
3751 REGISTERS MODIFIED
\r
3758 AH = 0 SUCCESSFUL.
\r
3759 The manager has returned the number of active EMM
\r
3762 AH = 80h NON-RECOVERABLE.
\r
3763 The manager detected a malfunction in the memory manager
\r
3766 AH = 81h NON-RECOVERABLE.
\r
3767 The manager detected a malfunction in the expanded
\r
3770 AH = 84h NON-RECOVERABLE.
\r
3771 The function code passed to the memory manager is not
\r
3783 Function 12. Get Handle Count
\r
3789 total_open_emm_handles DW ?
\r
3791 MOV AH,4Bh ; load function code
\r
3792 INT 67h ; call the memory manger
\r
3793 OR AH,AH ; check EMM status
\r
3794 JNZ emm_err_handler ; jump to error handler on
\r
3796 MOV total_open_emm_handles,BX ; save total active handle
\r
3842 Function 13. Get Handle Pages
\r
3848 The Get Handle Pages function returns the number of pages
\r
3849 allocated to a specific EMM handle.
\r
3852 CALLING PARAMETERS
\r
3855 Contains the Get Handle Pages function.
\r
3858 Contains the EMM handle.
\r
3863 These results are valid only if the status returned is zero.
\r
3865 BX = num_pages_alloc_to_emm_handle
\r
3866 Contains the number of logical pages allocated to the
\r
3867 specified EMM handle. This number never exceeds 2048
\r
3868 because the memory manager allows a maximum of 2048
\r
3869 pages (32M bytes) of expanded memory.
\r
3872 REGISTERS MODIFIED
\r
3879 AH = 0 SUCCESSFUL.
\r
3880 The manager has returned the number of pages allocated
\r
3881 to the EMM handle.
\r
3883 AH = 80h NON-RECOVERABLE.
\r
3884 The manager detected a malfunction in the memory manager
\r
3887 AH = 81h NON-RECOVERABLE.
\r
3888 The manager detected a malfunction in the expanded
\r
3891 AH = 83h NON-RECOVERABLE.
\r
3892 The memory manager couldn't find the EMM handle your
\r
3893 program specified.
\r
3901 Function 13. Get Handle Pages
\r
3905 AH = 84h NON-RECOVERABLE.
\r
3906 The function code passed to the memory manager is not
\r
3913 pages_alloc_to_handle DW ?
\r
3915 MOV DX,emm_handle ; load EMM handle
\r
3916 MOV AH,4Ch ; load function code
\r
3917 INT 67h ; call the memory manager
\r
3918 OR AH,AH ; check EMM status
\r
3919 JNZ emm_err_handler ; jump to error handler on
\r
3921 MOV pages_alloc_to_handle,BX ; save number of pages
\r
3922 ; allocated to specified
\r
3960 Function 14. Get All Handle Pages
\r
3966 The Get All Handle Pages function returns an array of the
\r
3967 open EMM handles and the number of pages allocated to each
\r
3971 CALLING PARAMETERS
\r
3974 Contains the Get All Handle Pages function.
\r
3976 handle_page_struct STRUC
\r
3978 pages_alloc_to_handle DW ?
\r
3979 handle_page_struct ENDS
\r
3981 ES:DI = pointer to handle_page
\r
3982 Contains a pointer to an array of structures where a
\r
3983 copy of all open EMM handles and the number of pages
\r
3984 allocated to each will be stored. Each structure has
\r
3985 these two members:
\r
3988 The first member is a word which contains the value
\r
3989 of the open EMM handle. The values of the handles
\r
3990 this function returns will be in the range of 0 to
\r
3991 255 decimal (0000h to 00FFh). The uppermost byte of
\r
3992 the handle is always zero.
\r
3994 .pages_alloc_to_handle
\r
3995 The second member is a word which contains the
\r
3996 number of pages allocated to the open EMM handle.
\r
4001 These results are valid only if the status returned is zero.
\r
4003 BX = total_open_emm_handles
\r
4004 Contains the number of open EMM handles (including the
\r
4005 operating system handle [0]). The number cannot be zero
\r
4006 because the operating system handle is always active and
\r
4007 cannot be deallocated. This number will not exceed 255.
\r
4019 Function 14. Get All Handle Pages
\r
4023 REGISTERS MODIFIED
\r
4030 AH = 0 SUCCESSFUL.
\r
4031 The manager has returned the array.
\r
4033 AH = 80h NON-RECOVERABLE.
\r
4034 The manager detected a malfunction in the memory manager
\r
4037 AH = 81h NON-RECOVERABLE.
\r
4038 The manager detected a malfunction in the expanded
\r
4041 AH = 84h NON-RECOVERABLE.
\r
4042 The function code passed to the memory manager is not
\r
4048 handle_page handle_page_struct 255 DUP (?)
\r
4049 total_open_handles DW ?
\r
4051 MOV AX,SEG handle_page
\r
4053 LEA DI,handle_page ; ES:DI points to handle_page
\r
4054 MOV AH,4Dh ; load function code
\r
4055 INT 67h ; call the memory manager
\r
4056 OR AH,AH ; check the EMM status
\r
4057 JNZ emm_err_handler ; jump to error handler on error
\r
4058 MOV total_open_handles,BX ; save total open handle count
\r
4078 Function 15. Get/Set Page Map
\r
4079 Get Page Map subfunction
\r
4085 The Get Page Map subfunction saves the mapping context for
\r
4086 all mappable memory regions (conventional and expanded) by
\r
4087 copying the contents of the mapping registers from each
\r
4088 expanded memory board to a destination array. The applica-
\r
4089 tion must pass a pointer to the destination array. This
\r
4090 subfunction doesn't require an EMM handle.
\r
4092 Use this function instead of Functions 8 and 9 if you need
\r
4093 to save or restore the mapping context but don't want (or
\r
4094 have) to use a handle.
\r
4097 CALLING PARAMETERS
\r
4100 Contains the Get Page Map subfunction.
\r
4102 ES:DI = dest_page_map
\r
4103 Contains a pointer to the destination array address in
\r
4104 segment:offset format. Use the Get Size of Page Map
\r
4105 Save Array subfunction to determine the size of the
\r
4111 These results are valid only if the status returned is zero.
\r
4114 The array contains the state of all the mapping regis-
\r
4115 ters on all boards in the system. It also contains any
\r
4116 additional information necessary to restore the boards
\r
4117 to their original state when the program invokes a Set
\r
4121 REGISTERS MODIFIED
\r
4128 AH = 0 SUCCESSFUL.
\r
4129 The manager has returned the array.
\r
4137 Function 15. Get/Set Page Map
\r
4138 Get Page Map subfunction
\r
4142 AH = 80h NON-RECOVERABLE.
\r
4143 The manager detected a malfunction in the memory manager
\r
4146 AH = 81h NON-RECOVERABLE.
\r
4147 The manager detected a malfunction in the expanded
\r
4150 AH = 84h NON-RECOVERABLE.
\r
4151 The function code passed to the memory manager is not
\r
4154 AH = 8Fh NON-RECOVERABLE.
\r
4155 The subfunction parameter is invalid.
\r
4160 dest_page_map DB ? DUP (?)
\r
4162 MOV AX,SEG dest_page_map
\r
4164 LEA DI,dest_page_map ; ES:DI points to dest_page_map
\r
4165 MOV AX,4E00h ; load function code
\r
4166 INT 67h ; call the memory manager
\r
4167 OR AH,AH ; check EMM status
\r
4168 JNZ emm_err_handler ; jump to error handler on error
\r
4196 Function 15. Get/Set Page Map
\r
4197 Set Page Map subfunction
\r
4203 The Set Page Map subfunction restores the mapping context
\r
4204 for all mappable memory regions (conventional and expanded)
\r
4205 by copying the contents of a source array into the mapping
\r
4206 registers on each expanded memory board in the system. The
\r
4207 application must pass a pointer to the source array. This
\r
4208 subfunction doesn't require an EMM handle.
\r
4210 Use this function instead of Functions 8 and 9 if you need
\r
4211 to save or restore the mapping context but don't want (or
\r
4212 have) to use a handle.
\r
4215 CALLING PARAMETERS
\r
4218 Contains the Set Page Map subfunction.
\r
4220 DS:SI = source_page_map
\r
4221 Contains a pointer to the source array address in
\r
4222 segment:offset format. The application must point to an
\r
4223 array which contains the mapping register state. Use
\r
4224 the Get Size of Page Map Save Array subfunction to
\r
4225 determine the size of the desired array.
\r
4228 REGISTERS MODIFIED
\r
4235 AH = 0 SUCCESSFUL.
\r
4236 The manager has passed the array.
\r
4238 AH = 80h NON-RECOVERABLE.
\r
4239 The manager detected a malfunction in the memory manager
\r
4242 AH = 81h NON-RECOVERABLE.
\r
4243 The manager detected a malfunction in the expanded
\r
4255 Function 15. Get/Set Page Map
\r
4256 Set Page Map subfunction
\r
4260 AH = 84h NON-RECOVERABLE.
\r
4261 The function code passed to the memory manager is not
\r
4264 AH = 8Fh NON-RECOVERABLE.
\r
4265 The subfunction parameter is invalid.
\r
4267 AH = A3h NON-RECOVERABLE.
\r
4268 The contents of the source array have been corrupted, or
\r
4269 the pointer passed to the subfunction is invalid.
\r
4274 source_page_map DB ? DUP (?)
\r
4276 MOV AX,SEG source_page_map
\r
4278 LEA SI,source_page_map ; DS:SI points to source_page_map
\r
4279 MOV AX,4E01h ; load function code
\r
4280 INT 67h ; call the memory manager
\r
4281 OR AH,AH ; check EMM status
\r
4282 JNZ emm_err_handler ; jump to error handler on error
\r
4314 Function 15. Get/Set Page Map
\r
4315 Get & Set Page Map subfunction
\r
4321 The Get & Set Page Map subfunction simultaneously saves a
\r
4322 current mapping context and restores a previous mapping
\r
4323 context for all mappable memory regions (both conventional
\r
4324 and expanded). It first copies the contents of the mapping
\r
4325 registers from each expanded memory board in the system into
\r
4326 a destination array. (The application must pass a pointer
\r
4327 to the destination array.) Then, the subfunction copies the
\r
4328 contents of a source array into the mapping registers on
\r
4329 each of the expanded memory boards. (The application must
\r
4330 pass a pointer to the source array.)
\r
4332 Use this function instead of Functions 8 and 9 if you need
\r
4333 to save or restore the mapping context but don't want (or
\r
4334 have) to use a handle.
\r
4337 CALLING PARAMETERS
\r
4340 Contains the Get & Set Page Map subfunction.
\r
4342 ES:DI = dest_page_map
\r
4343 Contains a pointer to the destination array address in
\r
4344 segment:offset format. The current contents of the map
\r
4345 registers will be saved in this array.
\r
4347 DS:SI = source_page_map
\r
4348 Contains a pointer to the source array address in
\r
4349 segment:offset format. The contents of this array will
\r
4350 be copied into the map registers. The application must
\r
4351 point to an array which contains the mapping register
\r
4352 state. This address is required only for the Set or Get
\r
4353 and Set subfunctions.
\r
4358 These results are valid only if the status returned is zero.
\r
4361 The array contains the mapping state. It also contains
\r
4362 any additional information necessary to restore the
\r
4363 original state when the program invokes a Set subfunc-
\r
4373 Function 15. Get/Set Page Map
\r
4374 Get & Set Page Map subfunction
\r
4378 REGISTERS MODIFIED
\r
4385 AH = 0 SUCCESSFUL.
\r
4386 The manager has returned and passed both arrays.
\r
4388 AH = 80h NON-RECOVERABLE.
\r
4389 The manager detected a malfunction in the memory manager
\r
4392 AH = 81h NON-RECOVERABLE.
\r
4393 The manager detected a malfunction in the expanded
\r
4396 AH = 84h NON-RECOVERABLE.
\r
4397 The function code passed to the memory manager is not
\r
4400 AH = 8Fh NON-RECOVERABLE.
\r
4401 The subfunction parameter is invalid.
\r
4403 AH = A3h NON-RECOVERABLE.
\r
4404 The contents of the source array have been corrupted, or
\r
4405 the pointer passed to the subfunction is invalid.
\r
4410 dest_page_map DB ? DUP (?)
\r
4412 source_page_map DB ? DUP (?)
\r
4414 MOV AX,SEG dest_page_map
\r
4416 MOV AX,SEG source_page_map
\r
4418 LEA DI,dest_page_map ; ES:DI points to dest_page_map
\r
4419 LEA SI,source_page_map ; DS:SI points to source_page_map
\r
4420 MOV AX,4E02h ; load function code
\r
4421 INT 67h ; call the memory manager
\r
4422 OR AH,AH ; check EMM status
\r
4423 JNZ emm_err_handler ; jump to error handler on error
\r
4432 Function 15. Get/Set Page Map
\r
4433 Get Size of Page Map Save Array subfunction
\r
4439 The Get Size of Page Map Save Array subfunction returns the
\r
4440 storage requirements for the array passed by the other three
\r
4441 subfunctions. This subfunction doesn't require an EMM
\r
4445 CALLING PARAMETERS
\r
4448 Contains the Get Size of Page Map Save Array subfunc-
\r
4449 tion. The size of this array depends on how the
\r
4450 expanded memory system is configured and how the
\r
4451 expanded memory manager is implemented. Therefore, the
\r
4452 size must be determined after the memory manager is
\r
4458 These results are valid only if the status returned is zero.
\r
4460 AL = size_of_array
\r
4461 Contains the number of bytes that will be transferred to
\r
4462 the memory area an application supplies whenever a
\r
4463 program requests the Get, Set, or Get and Set subfunc-
\r
4467 REGISTERS MODIFIED
\r
4474 AH = 0 SUCCESSFUL.
\r
4475 The manager has returned the array size.
\r
4477 AH = 80h NON-RECOVERABLE.
\r
4478 The manager detected a malfunction in the memory manager
\r
4481 AH = 81h NON-RECOVERABLE.
\r
4482 The manager detected a malfunction in the expanded
\r
4491 Function 15. Get/Set Page Map
\r
4492 Get Size of Page Map Save Array subfunction
\r
4496 AH = 84h NON-RECOVERABLE.
\r
4497 The function code passed to the memory manager is not
\r
4500 AH = 8Fh NON-RECOVERABLE.
\r
4501 The subfunction parameter is invalid.
\r
4506 size_of_array DB ?
\r
4508 MOV AX,4E03h ; load function code
\r
4509 INT 67h ; call the memory manager
\r
4510 OR AH,AH ; check EMM status
\r
4511 JNZ emm_err_handler ; jump to error handler on error
\r
4512 MOV size_of_array,AL ; save array size
\r
4550 Function 16. Get/Set Partial Page Map
\r
4551 Get Partial Page Map subfunction
\r
4557 The Get Partial Page Map subfunction saves a partial mapping
\r
4558 context for specific mappable memory regions in a system.
\r
4559 Because this function saves only a subset of the entire
\r
4560 mapping context, it uses much less memory for the save area
\r
4561 and may be potentially faster than Function 15. The
\r
4562 subfunction does this by copying the contents of selected
\r
4563 mapping registers from each expanded memory board to a
\r
4564 destination array.
\r
4566 The application must pass a pair of pointers. The first
\r
4567 points to a structure which specifies which mappable
\r
4568 segments to save; the second points to the destination
\r
4571 Use this function instead of Functions 8 and 9 if you need
\r
4572 to save or restore the mapping context but don't want (or
\r
4573 have) to use a handle.
\r
4576 CALLING PARAMETERS
\r
4579 Contains the Get Partial Page Map subfunction.
\r
4581 partial_page_map_struct STRUC
\r
4582 mappable_segment_count DW ?
\r
4583 mappable_segment DW (?) DUP (?)
\r
4584 partial_page_map_struct ENDS
\r
4586 DS:SI = partial_page_map
\r
4587 Contains a pointer to a structure which specifies only
\r
4588 those mappable memory regions which are to have their
\r
4589 mapping context saved. The structure members are
\r
4592 .mappable_segment_count
\r
4593 The first member is a word which specifies the
\r
4594 number of members in the word array which immediate-
\r
4595 ly follows it. This number should not exceed the
\r
4596 number of mappable segments in the system.
\r
4609 Function 16. Get/Set Partial Page Map
\r
4610 Get Partial Page Map subfunction
\r
4615 The second member is a word array which contains the
\r
4616 segment addresses of the mappable memory regions
\r
4617 whose mapping contexts are to be saved. The segment
\r
4618 address must be a mappable segment. Use Function 25
\r
4619 to determine which segments are mappable.
\r
4621 ES:DI = dest_array
\r
4622 Contains a pointer to the destination array address in
\r
4623 segment:offset format. To determine the size of the
\r
4624 required array, see the Get Size of Partial Page Map
\r
4625 Save Array subfunction.
\r
4630 These results are valid only if the status returned is zero.
\r
4633 The array contains the partial mapping context and any
\r
4634 additional information necessary to restore this context
\r
4635 to its original state when the program invokes a Set
\r
4639 REGISTERS MODIFIED
\r
4646 AH = 0 SUCCESSFUL.
\r
4647 The manager has saved the partial map context.
\r
4649 AH = 80h NON-RECOVERABLE.
\r
4650 The manager detected a malfunction in the memory manager
\r
4653 AH = 81h NON-RECOVERABLE.
\r
4654 The manager detected a malfunction in the expanded
\r
4657 AH = 84h NON-RECOVERABLE.
\r
4658 The function code passed to the memory manager is not
\r
4668 Function 16. Get/Set Partial Page Map
\r
4669 Get Partial Page Map subfunction
\r
4673 AH = 8Bh NON-RECOVERABLE.
\r
4674 One of the specified segments is not a mappable segment.
\r
4676 AH = 8Fh NON-RECOVERABLE.
\r
4677 The subfunction parameter is invalid.
\r
4679 AH = A3h NON-RECOVERABLE.
\r
4680 The contents of the partial page map structure have been
\r
4681 corrupted, the pointer passed to the subfunction is
\r
4682 invalid, or the mappable_segment_count exceeds the
\r
4683 number of mappable segments in the system.
\r
4688 partial_page_map partial_page_map_struct <>
\r
4690 dest_array DB ? DUP (?)
\r
4692 MOV AX,SEG partial_page_map
\r
4694 LEA SI,partial_page_map ; DS:SI points to partial_page_map
\r
4695 MOV AX,SEG dest_array
\r
4697 LEA DI,dest_array ; ES:DI points to dest_array
\r
4698 MOV AX,4F00h ; load function code
\r
4699 INT 67h ; call the memory manager
\r
4700 OR AH,AH ; check EMM status
\r
4701 JNZ emm_err_handler ; jump to error handler on error
\r
4727 Function 16. Get/Set Partial Page Map
\r
4728 Set Partial Page Map subfunction
\r
4734 The Set Partial Page Map subfunction provides a mechanism
\r
4735 for restoring the mapping context for a partial mapping
\r
4736 context for specific mappable memory regions in a system.
\r
4737 Because this function restores only a subset of the entire
\r
4738 mapping context and not the entire systems mapping context,
\r
4739 it uses much less memory for the save area and is potential-
\r
4740 ly faster than Function 15. The subfunction does this by
\r
4741 copying the contents of the source array to selected mapping
\r
4742 registers on each expanded memory board. The application
\r
4743 passes a pointer to the source array.
\r
4745 Use this function instead of Functions 8 and 9 if you need
\r
4746 to save or restore the mapping context but don't want (or
\r
4747 have) to use a handle.
\r
4750 CALLING PARAMETERS
\r
4753 Contains the Set Partial Page Map subfunction
\r
4755 source_array DB ? DUP (?)
\r
4757 DS:SI = source_array
\r
4758 Contains a pointer to the source array in segment:offset
\r
4759 format. The application must point to an array which
\r
4760 contains the partial mapping register state. To deter-
\r
4761 mine the size of the required array, see the Get Size of
\r
4762 Partial Page Map Save Array subfunction.
\r
4765 REGISTERS MODIFIED
\r
4772 AH = 0 SUCCESSFUL.
\r
4773 The manager has restored the partial mapping context.
\r
4775 AH = 80h NON-RECOVERABLE.
\r
4776 The manager detected a malfunction in the memory manager
\r
4786 Function 16. Get/Set Partial Page Map
\r
4787 Set Partial Page Map subfunction
\r
4791 AH = 81h NON-RECOVERABLE.
\r
4792 The manager detected a malfunction in the expanded
\r
4795 AH = 84h NON-RECOVERABLE.
\r
4796 The function code passed to the memory manager is not
\r
4799 AH = 8Fh NON-RECOVERABLE.
\r
4800 The subfunction parameter is invalid.
\r
4802 AH = A3h NON-RECOVERABLE.
\r
4803 The contents of the source array have been corrupted, or
\r
4804 the pointer passed to the subfunction is invalid.
\r
4809 MOV AX,SEG source_array
\r
4811 LEA SI,source_array ; DS:SI points to source_array
\r
4812 MOV AX,4F01h ; load function code
\r
4813 INT 67h ; call the memory manager
\r
4814 OR AH,AH ; check EMM status
\r
4815 JNZ emm_err_handler ; jump to error handler on error
\r
4845 Function 16. Get/Set Partial Page Map
\r
4846 Get Size of Partial Page Map Save Array subfunction
\r
4852 The Get Size of Partial Page Map Save Array subfunction
\r
4853 returns the storage requirements for the array passed by the
\r
4854 other two subfunctions. This subfunction doesn't require an
\r
4858 CALLING PARAMETERS
\r
4861 Contains the Get Size of Partial Page Map Save Array
\r
4862 subfunction. The size of this array depends on the
\r
4863 expanded memory system configuration and the implementa-
\r
4864 tion of the expanded memory manager. Therefore, it will
\r
4865 vary between hardware configurations and implementations
\r
4866 and must be determined after a specific memory manager
\r
4869 BX = number of pages in the partial array
\r
4870 Contains the number of pages in the partial map to be
\r
4871 saved by the Get/Set Partial Page Map subfunctions.
\r
4872 This number should be the same as the mappable_seg-
\r
4873 ment_count in the Get Partial Page Map subfunction.
\r
4878 These results are valid only if the status returned is zero.
\r
4880 AL = size_of_partial_save_array
\r
4881 Contains the number of bytes that will be transferred to
\r
4882 the memory areas supplied by an application whenever a
\r
4883 program requests the Get or Set subfunction.
\r
4886 REGISTERS MODIFIED
\r
4893 AH = 0 SUCCESSFUL.
\r
4894 The manager has returned the array size.
\r
4904 Function 16. Get/Set Partial Page Map
\r
4905 Get Size of Partial Page Map Save Array subfunction
\r
4909 AH = 80h NON-RECOVERABLE.
\r
4910 The manager detected a malfunction in the memory manager
\r
4913 AH = 81h NON-RECOVERABLE.
\r
4914 The manager detected a malfunction in the expanded
\r
4917 AH = 84h NON-RECOVERABLE.
\r
4918 The function code passed to the memory manager is not
\r
4921 AH = 8Bh NON-RECOVERABLE.
\r
4922 The number of pages in the partial array is outside the
\r
4923 range of physical pages in the system.
\r
4925 AH = 8Fh NON-RECOVERABLE.
\r
4926 The subfunction parameter is invalid.
\r
4931 number_of_pages_to_map DW ?
\r
4932 size_of_partial_save_array DB ?
\r
4934 MOV BX,number_of_pages_to_map
\r
4935 MOV AX,4F02h ; load function code
\r
4936 INT 67h ; call the memory manager
\r
4937 OR AH,AH ; check EMM status
\r
4938 JNZ emm_err_handler ; jump to error handler on
\r
4940 MOV size_of_partial_save_array,AL ; save array size
\r
4963 Function 17. Map/Unmap Multiple Handle Pages
\r
4969 This function can, in a single invocation, map (or unmap)
\r
4970 logical pages into as many physical pages as the system
\r
4971 supports. Consequently, it has less execution overhead than
\r
4972 mapping pages one at a time. For applications which do a
\r
4973 lot of page mapping, this is the preferred mapping method.
\r
4976 Mapping Multiple Pages
\r
4978 The handle passed to this function determines what type of
\r
4979 logical pages are being mapped. Logical pages that Function
\r
4980 4 and Function 27 (Allocate Standard Pages subfunction)
\r
4981 allocate are referred to as pages and are 16K bytes.
\r
4982 Logical pages that Function 27 (Allocate Raw Pages subfunc-
\r
4983 tion) allocates are referred to as raw pages and might not
\r
4984 be the same size as the pages Function 4 and Function 27
\r
4985 (Allocate Standard Pages subfunction) allocate.
\r
4988 Unmapping Multiple Pages
\r
4990 This function can make specific physical pages unavailable
\r
4991 for reading or writing. A logical page which is unmapped
\r
4992 from a specific physical page cannot be read or written from
\r
4993 that physical page. The logical page which is unavailable
\r
4994 (unmapped) can be made available again by mapping it, or a
\r
4995 new logical page, at the physical page that was unmapped.
\r
4996 Unmapping a physical page is accomplished by setting the
\r
4997 logical page it is associated with to FFFFh.
\r
4999 You might unmap an entire set of mapped pages, for example,
\r
5000 before loading and executing a program. This ensures that
\r
5001 the loaded program won't be able to access the pages your
\r
5002 program has mapped. However, you must save the mapping
\r
5003 context before you unmap the physical pages. This enables
\r
5004 you to restore it later so that you may access the memory
\r
5005 you had mapped there. You can save the mapping context with
\r
5006 Functions 8, 15, or 16. You can restore the mapping context
\r
5007 with Functions 9, 15, or 16.
\r
5010 Mapping and Unmapping Multiple Pages Simultaneously
\r
5012 Both mapping and unmapping pages can be done in the same
\r
5022 Function 17. Map/Unmap Multiple Handle Pages
\r
5026 Mapping or unmapping no pages is not considered an error.
\r
5027 If a request to map or unmap zero pages is made, nothing is
\r
5028 done and no error is returned.
\r
5031 Alternate Mapping and Unmapping Methods
\r
5033 You can map or unmap pages using two methods. Both methods
\r
5034 produce identical results.
\r
5036 1. The first method specifies both a logical page and a
\r
5037 physical page at which the logical page is to be mapped.
\r
5038 This method is an extension of Function 5 (Map Handle
\r
5041 2. The second method specifies both a logical page and a
\r
5042 corresponding segment address at which the logical page
\r
5043 is to be mapped. While this is functionally the same as
\r
5044 the first method, it may be easier to use the actual
\r
5045 segment address of a physical page than to use a number
\r
5046 which only represents its location. The memory manager
\r
5047 verifies whether the specified segment address falls on
\r
5048 the boundary of a mappable physical page. The manager
\r
5049 then translates the segment address passed to it into
\r
5050 the necessary internal representation to map the pages.
\r
5081 Function 17. Map/Unmap Multiple Handle Pages
\r
5082 Logical Page/Physical Page Method
\r
5085 CALLING PARAMETERS
\r
5088 Contains the Map/Unmap Multiple Handle Pages subfunction
\r
5089 using the logical page/physical page method.
\r
5091 log_to_phys_map_struct STRUC
\r
5092 log_page_number DW ?
\r
5093 phys_page_number DW ?
\r
5094 log_to_phys_map_struct ENDS
\r
5097 Contains the EMM handle.
\r
5099 CX = log_to_phys_map_len
\r
5100 Contains the number of entries in the array. For
\r
5101 example, if the array contained four pages to map or
\r
5102 unmap, then CX would contain 4. The number in CX should
\r
5103 not exceed the number of mappable pages in the system.
\r
5105 DS:SI = pointer to log_to_phys_map array
\r
5106 Contains a pointer to an array of structures that
\r
5107 contains the information necessary to map the desired
\r
5108 pages. The array is made up of the following two
\r
5112 The first member is a word which contains the number
\r
5113 of the logical page which is to be mapped. Logical
\r
5114 pages are numbered zero-relative, so the number for
\r
5115 a logical page can only range from zero to (maximum
\r
5116 number of logical pages allocated to the handle -
\r
5119 If the logical page number is set to FFFFh, the
\r
5120 physical page associated with it is unmapped rather
\r
5121 than mapped. Unmapping a physical page makes it
\r
5122 inaccessible for reading or writing.
\r
5125 The second member is a word which contains the
\r
5126 number of the physical page at which the logical
\r
5127 page is to be mapped. Physical pages are numbered
\r
5128 zero-relative, so the number for a physical page can
\r
5129 only range from zero to (maximum number of physical
\r
5130 pages supported in the system - 1).
\r
5140 Function 17. Map/Unmap Multiple Handle Pages
\r
5141 Logical Page/Physical Page Method
\r
5145 REGISTERS MODIFIED
\r
5152 AH = 0 SUCCESSFUL.
\r
5153 The logical pages have been mapped, or unmapped, at the
\r
5154 specified physical pages.
\r
5156 AH = 80h NON-RECOVERABLE.
\r
5157 The manager has detected a malfunction in the memory
\r
5160 AH = 81h NON-RECOVERABLE.
\r
5161 The manager has detected a malfunction in the expanded
\r
5164 AH = 83h NON-RECOVERABLE.
\r
5165 The manager couldn't find the specified EMM handle. The
\r
5166 manager doesn't currently have any information pertain-
\r
5167 ing to the specified EMM handle. The program has
\r
5168 probably corrupted its EMM handle.
\r
5170 AH = 84h NON-RECOVERABLE.
\r
5171 The function code passed to the manager is not defined.
\r
5173 AH = 8Ah RECOVERABLE.
\r
5174 One or more of the mapped logical pages is out of the
\r
5175 range of logical pages allocated to the EMM handle. The
\r
5176 program can recover by attempting to map a logical page
\r
5177 which is within the bounds for the specified EMM handle.
\r
5178 When this error occurs, the only pages mapped were the
\r
5179 ones valid up to the point that the error occurred.
\r
5181 AH = 8Bh RECOVERABLE.
\r
5182 One or more of the physical pages is out of the range of
\r
5183 mappable physical pages, or the log_to_phys_map_len
\r
5184 exceeds the number of mappable pages in the system. The
\r
5185 program can recover from this condition by attempting to
\r
5186 map into memory at the physical page which is in the
\r
5187 range of the physical page numbers supported by the
\r
5188 system. When this error occurs, the only pages mapped
\r
5189 were the ones valid up to the point that the error
\r
5199 Function 17. Map/Unmap Multiple Handle Pages
\r
5200 Logical Page/Physical Page Method
\r
5204 AH = 8Fh NON-RECOVERABLE.
\r
5205 The subfunction parameter is invalid.
\r
5210 log_to_phys_map log_to_phys_map_struct ? DUP (?)
\r
5214 MOV AX,SEG log_to_phys_map
\r
5216 LEA SI,log_to_phys_map ; DS:SI points to
\r
5218 MOV CX,LENGTH log_to_phys_map ; set length field
\r
5220 MOV AX,5000h ; load function code
\r
5221 INT 67h ; call the memory manager
\r
5222 OR AH,AH ; check EMM status
\r
5223 JNZ emm_err_handler ; jump to error handler on
\r
5258 Function 17. Map/Unmap Multiple Handle Pages
\r
5259 Logical Page/Segment Address Method
\r
5262 CALLING PARAMETERS
\r
5265 Contains the Map/Unmap Multiple Handle Pages subfunction
\r
5266 using the logical page/segment address method.
\r
5268 log_to_seg_map_struct STRUC
\r
5269 log_page_number DW ?
\r
5270 mappable_segment_address DW ?
\r
5271 log_to_seg_map_struct ENDS
\r
5274 Contains the EMM handle.
\r
5276 CX = log_to_segment_map_len
\r
5277 Contains the number of entries in the array. For
\r
5278 example, if the array contained four pages to map or
\r
5279 unmap, then CX would contain four.
\r
5281 DS:SI = pointer to log_to_segment_map array
\r
5282 Contains a pointer to an array of structures that
\r
5283 contains the information necessary to map the desired
\r
5284 pages. The array is made up of the following elements:
\r
5287 The first member is a word which contains the number
\r
5288 of the logical pages to be mapped. Logical pages
\r
5289 are numbered zero-relative, so the number for a
\r
5290 logical page can range from zero to (maximum number
\r
5291 of logical pages allocated to the handle - 1).
\r
5293 If the logical page number is set to FFFFh, the
\r
5294 physical page associated with it is unmapped rather
\r
5295 than mapped. Unmapping a physical page makes it
\r
5296 inaccessible for reading or writing.
\r
5298 .mappable_segment_address
\r
5299 The second member is a word which contains the
\r
5300 segment address at which the logical page is to be
\r
5301 mapped. This segment address must correspond
\r
5302 exactly to a mappable segment address. The mappable
\r
5303 segment addresses are available with Function 25
\r
5304 (Get Mappable Physical Address Array).
\r
5307 REGISTERS MODIFIED
\r
5317 Function 17. Map/Unmap Multiple Handle Pages
\r
5318 Logical Page/Segment Address Method
\r
5324 AH = 0 SUCCESSFUL.
\r
5325 The logical pages have been mapped (or unmapped) at the
\r
5326 specified physical pages.
\r
5328 AH = 80h NON-RECOVERABLE.
\r
5329 The manager has detected a malfunction in the memory
\r
5332 AH = 81h NON-RECOVERABLE.
\r
5333 The manager has detected a malfunction in the expanded
\r
5336 AH = 83h NON-RECOVERABLE.
\r
5337 The manager could not find the specified EMM handle.
\r
5338 The manager doesn't currently have any information
\r
5339 pertaining to the specified EMM handle. The program has
\r
5340 probably corrupted its EMM handle.
\r
5342 AH = 84h NON-RECOVERABLE.
\r
5343 The function code passed to the manager is not defined.
\r
5345 AH = 8Ah RECOVERABLE.
\r
5346 One or more of the logical pages to be mapped is out of
\r
5347 the range of logical pages allocated to the EMM handle.
\r
5348 The program can recover from this condition by mapping a
\r
5349 logical page which is within the bounds for the speci-
\r
5350 fied EMM handle. When this error occurs, the only pages
\r
5351 mapped or unmapped were the ones valid up to the point
\r
5352 that the error occurred.
\r
5354 AH = 8Bh RECOVERABLE.
\r
5355 One or more of the mappable segment addresses specified
\r
5356 is not mappable, the segment address doesn't fall
\r
5357 exactly on a mappable address boundary, or the log_to_-
\r
5358 segment_map_len exceeds the number of mappable segments
\r
5359 in the system. The program can recover from this
\r
5360 condition by mapping into memory on an exact mappable
\r
5361 segment address. When this error occurs, the only pages
\r
5362 mapped were the ones valid up to the point that the
\r
5365 AH = 8Fh NON-RECOVERABLE.
\r
5366 The subfunction parameter is invalid.
\r
5376 Function 17. Map/Unmap Multiple Handle Pages
\r
5377 Logical Page/Segment Address Method
\r
5383 log_to_seg_map log_to_seg_map_struct 4 DUP (?)
\r
5387 MOV AX,SEG log_to_seg_map
\r
5389 LEA SI,log_to_seg_map ; DS:SI points to
\r
5391 MOV CX,LENGTH log_to_seg_map
\r
5393 MOV AX,5001h ; load function code
\r
5394 INT 67h ; call the memory manager
\r
5395 OR AH,AH ; check EMM status
\r
5396 JNZ emm_err_handler ; jump to error handler on
\r
5435 Function 18. Reallocate Pages
\r
5441 This function allows an application program to increase or
\r
5442 decrease (reallocate) the number of logical pages allocated
\r
5443 to an EMM handle. There are four reallocation cases of
\r
5446 1. A reallocation count of zero. The handle assigned to
\r
5447 the application remains assigned and is still available
\r
5448 for use by the application. The memory manager won't
\r
5449 reassign the handle to any other application. However,
\r
5450 the handle will have any currently allocated pages
\r
5451 returned to the memory manager. The application must
\r
5452 invoke the Deallocate Pages function (Function 6) before
\r
5453 returning to DOS, or the handle will remain assigned and
\r
5454 no other application will be able to use it.
\r
5456 2. A reallocation count equal to the current allocation
\r
5457 count. This is not treated as an error, and a success-
\r
5458 ful status is returned.
\r
5460 3. A reallocation count greater than the current allocation
\r
5461 count. The memory manager will attempt to add new pages
\r
5462 to those pages already allocated to the specified EMM
\r
5463 handle. The number of new pages added is the difference
\r
5464 between the reallocation count and the current alloca-
\r
5465 tion count. The sequence of logical pages allocated to
\r
5466 the EMM handle remains continuous after this operation.
\r
5467 The newly allocated pages have logical page numbers
\r
5468 which begin where the previously allocated pages ended,
\r
5469 and continue in ascending sequence.
\r
5471 4. A reallocation count less than the current allocation
\r
5472 count. The memory manager will attempt to subtract some
\r
5473 of the currently allocated pages and return them to the
\r
5474 memory manager. The number of old pages subtracted is
\r
5475 the difference between the current allocation count and
\r
5476 the re-allocation count. The pages are subtracted from
\r
5477 the end of the sequence of pages currently allocated to
\r
5478 the specified EMM handle. The sequence of logical pages
\r
5479 allocated to the EMM handle remains continuous after
\r
5494 Function 18. Reallocate Pages
\r
5498 The handle determines what type of logical pages are being
\r
5499 reallocated. Logical pages which were originally allocated with
\r
5500 Function 4 or Function 27 (Allocate Standard Pages subfunction)
\r
5501 are called pages and are 16K bytes long. Logical pages which
\r
5502 were allocated with Function 27 (Allocate Raw Pages subfunction)
\r
5503 are called raw pages and might not be the same size as pages
\r
5504 allocated with Function 4.
\r
5507 CALLING PARAMETERS
\r
5510 Contains the Reallocate Handle Pages function.
\r
5513 Contains the EMM handle.
\r
5515 BX = reallocation_count
\r
5516 Contains the total number of pages this handle should
\r
5517 have allocated to it after this function is invoked.
\r
5522 BX = number of pages allocated to handle after reallocation
\r
5523 Contains the number of pages now allocated to the EMM
\r
5524 handle after the pages have been added or subtracted.
\r
5525 If the status returned is not zero, the value in BX is
\r
5526 equal to the number of pages allocated to the handle
\r
5527 prior to the invocation of this function. This informa-
\r
5528 tion can be used to verify that the request generated
\r
5529 the expected results.
\r
5532 REGISTERS MODIFIED
\r
5539 AH = 0 SUCCESSFUL.
\r
5540 The pages specified have been added to or subtracted
\r
5541 from the handle specified.
\r
5543 AH = 80h NON-RECOVERABLE.
\r
5544 The manager has detected a malfunction in the memory
\r
5553 Function 18. Reallocate Pages
\r
5557 AH = 81h NON-RECOVERABLE.
\r
5558 The manager has detected a malfunction in the expanded
\r
5561 AH = 83h NON-RECOVERABLE.
\r
5562 The manager could not find the specified EMM handle.
\r
5563 The manager doesn't have any information pertaining to
\r
5564 the specified EMM handle. The program may have cor-
\r
5565 rupted its EMM handle.
\r
5567 AH = 84h NON-RECOVERABLE.
\r
5568 The function code passed to the manager is not defined.
\r
5570 AH = 87h RECOVERABLE.
\r
5571 The number of pages that are available in the system is
\r
5572 insufficient for the new allocation request. The
\r
5573 program can recover from this condition by specifying
\r
5574 fewer pages be allocated to the EMM handle.
\r
5576 AH = 88h RECOVERABLE.
\r
5577 The number of unallocated pages is insufficient for the
\r
5578 new allocation request. The program can recover from
\r
5579 this condition by either requesting again when addition-
\r
5580 al pages are available or specifying fewer pages.
\r
5586 realloc_count DW ?
\r
5587 current_alloc_page_count DW ?
\r
5589 MOV DX,emm_handle ; specify EMM handle
\r
5590 MOV BX,realloc_count ; specify count
\r
5591 MOV AH,51h ; load function code
\r
5592 INT 67h ; call the memory manager
\r
5593 OR AH,AH ; check EMM status
\r
5594 JNZ emm_err_handler ; jump to error handler on
\r
5596 MOV current_alloc_page_count,BX
\r
5612 Function 19. Get/Set Handle Attribute
\r
5616 Design Considerations
\r
5618 This function is an option which will probably not be
\r
5619 available in a typical expanded memory manager, system, or
\r
5620 memory board. Most personal computer systems disable memory
\r
5621 refresh signals for a considerable period during a warm
\r
5622 boot. This can corrupt some of the data in memory boards,
\r
5623 even though there is no problem with the design of the
\r
5624 memory board, its operation, or the memory chips. This
\r
5625 memory refresh deficiency is present in the software design
\r
5626 of the ROM BIOS in most personal computer systems.
\r
5628 The majority of memory board designs, chip types, or
\r
5629 personal computer systems won't be able to support the non-
\r
5630 volatility feature. The reason that this ROM BIOS deficien-
\r
5631 cy is not evident in the conventional or extended memory
\r
5632 area is that the ROM BIOS always initializes this area
\r
5633 during a warm boot. Memory data integrity is not a problem
\r
5634 with the conventional or extended memory region, because it
\r
5635 isn't physically possible to have data retained there across
\r
5636 a warm boot event -- the ROM BIOS sets it to zero.
\r
5638 Consequently, expanded memory board manufacturers should not
\r
5639 supply this function unless their board can guarantee the
\r
5640 integrity of data stored in the board's memory during a warm
\r
5641 boot. Generally, this means the memory board has an
\r
5642 independent memory refresh controller which does not depend
\r
5643 on the system board's memory refresh.
\r
5645 If the expanded memory manager, system, or memory board
\r
5646 cannot support this feature, it should return the not
\r
5647 supported status described in the function.
\r
5671 Function 19. Get/Set Handle Attribute
\r
5672 Get Handle Attribute subfunction
\r
5678 This subfunction returns the attribute associated with a
\r
5679 handle. The attributes are volatile or non-volatile.
\r
5680 Handles with non-volatile attributes enable the memory
\r
5681 manager to save the contents of a handle's pages between
\r
5682 warm boots. However, this function may be disabled with a
\r
5683 user option or may not be supported by the memory board or
\r
5686 If the handle's attribute has been set to non-volatile, the
\r
5687 handle, its name (if it is assigned one), and the contents
\r
5688 of the pages allocated to the handle are all maintained
\r
5689 after a warm boot.
\r
5692 CALLING PARAMETERS
\r
5695 Contains the Get Handle Attribute subfunction.
\r
5698 Contains the EMM handle.
\r
5703 These results are valid only if the status returned is zero.
\r
5705 AL = handle attribute
\r
5706 Contains the EMM handle's attribute. The only at-
\r
5707 tributes a handle may have are volatile or non-volatile.
\r
5708 A value of zero indicates the handle is volatile. A
\r
5709 value of one indicates that the handle is non-volatile.
\r
5712 REGISTERS MODIFIED
\r
5719 AH = 0 SUCCESSFUL.
\r
5720 The handle's attribute has been obtained.
\r
5730 Function 19. Get/Set Handle Attribute
\r
5731 Get Handle Attribute subfunction
\r
5735 AH = 80h NON-RECOVERABLE.
\r
5736 The manager has detected a malfunction in the memory
\r
5739 AH = 81h NON-RECOVERABLE.
\r
5740 The manager has detected a malfunction in the expanded
\r
5743 AH = 83h NON-RECOVERABLE.
\r
5744 The manager couldn't find the specified EMM handle. The
\r
5745 manager doesn't have any information pertaining to the
\r
5746 specified EMM handle. The program may have corrupted
\r
5749 AH = 84h NON-RECOVERABLE.
\r
5750 The function code passed to the manager is not defined.
\r
5752 AH = 8Fh NON-RECOVERABLE.
\r
5753 The subfunction parameter is invalid.
\r
5755 AH = 91h NON-RECOVERABLE.
\r
5756 This feature is not supported.
\r
5762 handle_attrib DB ?
\r
5764 MOV DX,emm_handle ; specify EMM handle
\r
5765 MOV AX,5200h ; load function code
\r
5766 INT 67h ; call the memory manager
\r
5767 OR AH,AH ; check EMM status
\r
5768 JNZ emm_err_handler ; jump to error handler on error
\r
5769 MOV handle_attrib,AL ; save handle attribute
\r
5789 Function 19. Get/Set Handle Attribute
\r
5790 Set Handle Attribute subfunction
\r
5796 This subfunction can be used to modify the attribute which a
\r
5797 handle has associated with it. The attributes which a
\r
5798 handle may have are volatile or non-volatile. The non-
\r
5799 volatile attribute enables the EMM to save the contents of a
\r
5800 handle's pages between warm boots. However, this function
\r
5801 may be disabled with a user option or may not be supported
\r
5802 by the memory board or system hardware.
\r
5804 If the handle's attribute has been set to non-volatile, the
\r
5805 handle, its name (if it is assigned one), and the contents
\r
5806 of the pages allocated to the handle are all maintained
\r
5807 after a warm boot.
\r
5810 CALLING PARAMETERS
\r
5813 Contains the Set Handle Attribute function.
\r
5816 Contains the EMM handle.
\r
5818 BL = new handle attribute
\r
5819 Contains the handle's new attribute. A value of zero
\r
5820 indicates that the handle should be made volatile. A
\r
5821 value of one indicates that the handle should be made
\r
5824 A volatile handle attribute instructs the memory manager
\r
5825 to deallocate both the handle and the pages allocated to
\r
5826 it after a warm boot. If all handles have the volatile
\r
5827 attribute (the default attribute) at warm boot, the
\r
5828 handle directory will be empty and all of expanded
\r
5829 memory will be initialized to zero immediately after a
\r
5833 REGISTERS MODIFIED
\r
5848 Function 19. Get/Set Handle Attribute
\r
5849 Set Handle Attribute subfunction
\r
5855 AH = 0 SUCCESSFUL.
\r
5856 The handle's attribute has been modified.
\r
5858 AH = 80h NON-RECOVERABLE.
\r
5859 The manager has detected a malfunction in the memory
\r
5862 AH = 81h NON-RECOVERABLE.
\r
5863 The manager has detected a malfunction in the expanded
\r
5866 AH = 83h NON-RECOVERABLE.
\r
5867 The manager could not find the specified EMM handle.
\r
5868 The manager doesn't have any information pertaining to
\r
5869 the specified EMM handle. The program may have cor-
\r
5870 rupted its EMM handle.
\r
5872 AH = 84h NON-RECOVERABLE.
\r
5873 The function code passed to the manager is not defined.
\r
5875 AH = 8Fh NON-RECOVERABLE.
\r
5876 The subfunction parameter is invalid.
\r
5878 AH = 90h NON-RECOVERABLE.
\r
5879 The attribute type is undefined.
\r
5881 AH = 91h NON-RECOVERABLE.
\r
5882 This feature is not supported.
\r
5888 new_handle_attrib DB ?
\r
5890 MOV DX,emm_handle ; specify EMM handle
\r
5891 MOV BL,new_handle_attrib ; specify the set attribute
\r
5892 MOV AX,5201h ; load function code
\r
5893 INT 67h ; call the memory manager
\r
5894 OR AH,AH ; check EMM status
\r
5895 JNZ emm_err_handler ; jump to error handler on error
\r
5907 Function 19. Get/Set Handle Attribute
\r
5908 Get Attribute Capability subfunction
\r
5914 This subfunction can be used to determine whether the memory
\r
5915 manager can support the non-volatile attribute.
\r
5918 CALLING PARAMETERS
\r
5921 Contains the Get Attribute Capability subfunction.
\r
5926 These results are valid only if the status returned is zero.
\r
5928 AL = attribute capability
\r
5929 Contains the attribute capability. A value of zero
\r
5930 indicates that the memory manager and hardware supports
\r
5931 only volatile handles. A value of one indicates that
\r
5932 the memory manager/hardware supports both volatile and
\r
5933 non-volatile handles.
\r
5936 REGISTERS MODIFIED
\r
5943 AH = 0 SUCCESSFUL.
\r
5944 The attribute capability has been returned.
\r
5946 AH = 80h NON-RECOVERABLE.
\r
5947 The manager has detected a malfunction in the memory
\r
5950 AH = 81h NON-RECOVERABLE.
\r
5951 The manager has detected a malfunction in the expanded
\r
5954 AH = 84h NON-RECOVERABLE.
\r
5955 The function code passed to the manager is not defined.
\r
5957 AH = 8Fh NON-RECOVERABLE.
\r
5958 The subfunction parameter is invalid.
\r
5966 Function 19. Get/Set Handle Attribute
\r
5967 Get Attribute Capability subfunction
\r
5973 attrib_capability DB ?
\r
5975 MOV AX,5202h ; load function code
\r
5976 INT 67h ; call the memory manager
\r
5977 OR AH,AH ; check EMM status
\r
5978 JNZ emm_err_handler ; jump to error handler on error
\r
5979 MOV attrib_capability,AL ; save attribute capability
\r
6025 Function 20. Get/Set Handle Name
\r
6026 Get Handle Name subfunction
\r
6032 This subfunction gets the eight character name currently
\r
6033 assigned to a handle. There is no restriction on the
\r
6034 characters which may be used in the handle name (that is,
\r
6035 anything from 00h through FFh).
\r
6037 The handle name is initialized to ASCII nulls (binary zeros)
\r
6038 three times: when the memory manager is installed, when a
\r
6039 handle is allocated, and when a handle is deallocated. A
\r
6040 handle with a name which is all ASCII nulls, by definition,
\r
6041 has no name. When a handle is assigned a name, at least one
\r
6042 character in the name must be a non-null character in order
\r
6043 to distinguish it from a handle without a name.
\r
6046 CALLING PARAMETERS
\r
6049 Contains the Get Handle Name function.
\r
6051 DX = handle number
\r
6052 Contains the EMM handle.
\r
6054 ES:DI = pointer to handle_name array
\r
6055 Contains a pointer to an eight-byte array into which the
\r
6056 name currently assigned to the handle will be copied.
\r
6061 These results are valid only if the status returned is zero.
\r
6064 Contains the name associated with the specified handle.
\r
6067 REGISTERS MODIFIED
\r
6074 AH = 0 SUCCESSFUL.
\r
6075 The handle name has been returned.
\r
6084 Function 20. Get/Set Handle Name
\r
6085 Get Handle Name subfunction
\r
6089 AH = 80h NON-RECOVERABLE.
\r
6090 The manager has detected a malfunction in the memory
\r
6093 AH = 81h NON-RECOVERABLE.
\r
6094 The manager has detected a malfunction in the expanded
\r
6097 AH = 83h NON-RECOVERABLE.
\r
6098 The manager couldn't find the specified EMM handle. The
\r
6099 manager doesn't have any information on the specified
\r
6100 EMM handle. The program may have corrupted its EMM
\r
6103 AH = 84h NON-RECOVERABLE.
\r
6104 The function code passed to the manager is not defined.
\r
6106 AH = 8Fh NON-RECOVERABLE.
\r
6107 The subfunction parameter is invalid.
\r
6112 handle_name DB 8 DUP (?)
\r
6115 MOV AX,SEG handle_name
\r
6117 LEA DI,handle_name ; ES:DI points to handle_name
\r
6118 MOV DX,emm_handle ; specify EMM handle
\r
6119 MOV AX,5300h ; load function code
\r
6120 INT 67h ; call the memory manager
\r
6121 OR AH,AH ; check EMM status
\r
6122 JNZ emm_err_handler ; jump to error handler on error
\r
6143 Function 20. Get/Set Handle Name
\r
6144 Set Handle Name subfunction
\r
6150 This subfunction assigns an eight character name to a
\r
6151 handle. There is no restriction on the characters which may
\r
6152 be used in the handle name. The full range of values may be
\r
6153 assigned to each character in a name (that is, 00h through
\r
6156 At installation, all handles have their name initialized to
\r
6157 ASCII nulls (binary zeros). A handle with a name consisting
\r
6158 of all ASCII nulls has no name. When a handle is assigned a
\r
6159 name, at least one character in the name must be a non-null
\r
6160 character in order to distinguish it from a handle without a
\r
6161 name. No two handles may have the same name.
\r
6163 A handle can be renamed at any time by setting the handle's
\r
6164 name to a new value. A handle can have its name removed by
\r
6165 setting the handle's name to all ASCII nulls. When a handle
\r
6166 is deallocated, its name is removed (set to ASCII nulls).
\r
6169 CALLING PARAMETERS
\r
6172 Contains the Set Handle Name function.
\r
6174 DX = handle number
\r
6175 Contains the EMM handle.
\r
6177 DS:SI = pointer to handle_name
\r
6178 Contains a pointer to a byte array which contains the
\r
6179 name that is to be assigned to the handle. The handle
\r
6180 name must be padded with nulls if the name is less than
\r
6181 eight characters long.
\r
6184 REGISTERS MODIFIED
\r
6191 AH = 0 SUCCESSFUL.
\r
6192 The handle name has been assigned.
\r
6202 Function 20. Get/Set Handle Name
\r
6203 Set Handle Name subfunction
\r
6207 AH = 80h NON-RECOVERABLE.
\r
6208 The manager has detected a malfunction in the memory
\r
6211 AH = 81h NON-RECOVERABLE.
\r
6212 The manager has detected a malfunction in the expanded
\r
6215 AH = 83h NON-RECOVERABLE.
\r
6216 The manager couldn't find the specified EMM handle. The
\r
6217 manager doesn't currently have any information pertain-
\r
6218 ing to the specified EMM handle. The program may have
\r
6219 corrupted its EMM handle.
\r
6221 AH = 84h NON-RECOVERABLE.
\r
6222 The function code passed to the manager is not defined.
\r
6224 AH = 8Fh NON-RECOVERABLE.
\r
6225 The subfunction parameter is invalid.
\r
6227 AH = A1h RECOVERABLE.
\r
6228 A handle with this name already exists. The specified
\r
6229 handle was not assigned a name.
\r
6234 handle_name DB 'AARDVARK'
\r
6237 MOV AX,SEG handle_name
\r
6239 LEA SI,handle_name ; DS:SI points to handle_name
\r
6240 MOV DX,emm_handle ; specify EMM handle
\r
6241 MOV AX,5301h ; load function code
\r
6242 INT 67h ; call the memory manager
\r
6243 OR AH,AH ; check EMM status
\r
6244 JNZ emm_err_handler ; jump to error handler on error
\r
6261 Function 21. Get Handle Directory
\r
6262 Get Handle Directory subfunction
\r
6268 This function returns an array which contains all active
\r
6269 handles and the names associated with each. Handles which
\r
6270 have not been assigned names have a default name of all
\r
6271 ASCII nulls (binary zeros). When a handle is first allo-
\r
6272 cated, or when all the pages belonging to a handle are
\r
6273 deallocated (that is, an open handle is closed), its default
\r
6274 name is set to ASCII nulls. It takes a subsequent assign-
\r
6275 ment of a name for a handle to have a name after it has been
\r
6276 opened. The full range of values may be assigned to each
\r
6277 character in a name (that is, 00h through FFh).
\r
6279 The number of bytes required by the array is:
\r
6281 10 bytes * total number of handles
\r
6283 The maximum size of this array is:
\r
6285 (10 bytes/entry) * 255 entries = 2550 bytes.
\r
6288 CALLING PARAMETERS
\r
6291 Contains the Get Handle Directory function.
\r
6293 handle_dir_struct STRUC
\r
6295 handle_name DB 8 DUP (?)
\r
6296 handle_dir_struct ENDS
\r
6298 ES:DI = pointer to handle_dir
\r
6299 Contains a pointer to an area of memory into which the
\r
6300 memory manager will copy the handle directory. The
\r
6301 handle directory is an array of structures. There are
\r
6302 as many entries in the array as there are open EMM
\r
6303 handles. The structure consists of the following
\r
6307 The first member is a word which contains the value
\r
6308 of the open EMM handle.
\r
6320 Function 21. Get Handle Directory
\r
6321 Get Handle Directory subfunction
\r
6326 The second member is an 8 byte array which contains
\r
6327 the ASCII name associated with the EMM handle. If
\r
6328 there is no name currently associated with the
\r
6329 handle, it has a value of all zeros (ASCII nulls).
\r
6334 These results are valid only if the status returned is zero.
\r
6337 Contains the handle values and handle names associated
\r
6338 with each handle value.
\r
6340 AL = number of entries in the handle_dir array
\r
6341 Contains the number of entries in the handle directory
\r
6342 array. This is also the same as the number of open
\r
6343 handles. For example, if only one handle is active, AL
\r
6344 will contain a one.
\r
6347 REGISTERS MODIFIED
\r
6354 AH = 0 SUCCESSFUL.
\r
6355 The handle directory has been returned.
\r
6357 AH = 80h NON-RECOVERABLE.
\r
6358 The manager has detected a malfunction in the memory
\r
6361 AH = 81h NON-RECOVERABLE.
\r
6362 The manager has detected a malfunction in the expanded
\r
6365 AH = 84h NON-RECOVERABLE.
\r
6366 The function code passed to the manager is not defined.
\r
6368 AH = 8Fh NON-RECOVERABLE.
\r
6369 The subfunction parameter is invalid.
\r
6379 Function 21. Get Handle Directory
\r
6380 Get Handle Directory subfunction
\r
6386 handle_dir handle_dir_struct 255 DUP (?)
\r
6388 num_entries_in_handle_dir DB ?
\r
6390 MOV AX,SEG handle_dir
\r
6392 LEA DI,handle_dir ; ES:DI points to handle_dir
\r
6393 MOV AX,5400h ; load function code
\r
6394 INT 67h ; call the memory manager
\r
6395 OR AH,AH ; check EMM status
\r
6396 JNZ emm_err_handler ; jump to error handler on
\r
6398 MOV num_entries_in_handle_dir,AL ; save number of entries
\r
6438 Function 21. Get Handle Directory
\r
6439 Search For Named Handle subfunction
\r
6445 This subfunction searches the handle name directory for a
\r
6446 handle with a particular name. If the named handle is
\r
6447 found, this subfunction returns the handle number associated
\r
6448 with the name. At the time of installation, all handles
\r
6449 have their names initialized to ASCII nulls. A handle with
\r
6450 a name which is all ASCII nulls has, by definition, no name.
\r
6451 When a handle is assigned a name, at least one character in
\r
6452 the name must be a non-null character in order to distin-
\r
6453 guish it from a handle without a name.
\r
6456 CALLING PARAMETERS
\r
6459 Contains the Search for Named Handle subfunction.
\r
6461 DS:SI = handle_name
\r
6462 Contains a pointer to an 8-byte string that contains the
\r
6463 name of the handle being searched for.
\r
6468 These results are valid only if the status returned is zero.
\r
6470 DX = value of named handle
\r
6471 The value of the handle which matches the handle name
\r
6475 REGISTERS MODIFIED
\r
6482 AH = 0 SUCCESSFUL.
\r
6483 The handle value for the named handle has been found.
\r
6485 AH = 80h NON-RECOVERABLE.
\r
6486 The manager has detected a malfunction in the memory
\r
6497 Function 21. Get Handle Directory
\r
6498 Search For Named Handle subfunction
\r
6502 AH = 81h NON-RECOVERABLE.
\r
6503 The manager has detected a malfunction in the expanded
\r
6506 AH = 84h NON-RECOVERABLE.
\r
6507 The function code passed to the manager is not defined.
\r
6509 AH = 8Fh NON-RECOVERABLE.
\r
6510 The subfunction parameter is invalid.
\r
6512 AH = A0h NON-RECOVERABLE.
\r
6513 No corresponding handle could be found for the handle
\r
6516 AH = A1h NON-RECOVERABLE.
\r
6517 A handle found had no name (all ASCII nulls).
\r
6522 named_handle DB 'AARDVARK'
\r
6523 named_handle_value DW ?
\r
6525 MOV AX,SEG named_handle
\r
6527 LEA SI,named_handle ; DS:SI points to named_handle
\r
6528 MOV AX,5401h ; load function code
\r
6529 INT 67h ; call the memory manager
\r
6530 OR AH,AH ; check EMM status
\r
6531 JNZ emm_err_handler ; jump to error handler on error
\r
6532 MOV named_handle_value,DX ; save value of named handle
\r
6556 Function 21. Get Handle Directory
\r
6557 Get Total Handles subfunction
\r
6563 This subfunction returns the total number of handles that
\r
6564 the memory manager supports, including the operating system
\r
6565 handle (handle value 0).
\r
6568 CALLING PARAMETERS
\r
6571 Contains the Get Total Handles subfunction.
\r
6576 These results are valid only if the status returned is zero.
\r
6578 BX = total_handles
\r
6579 The value returned represents the maximum number of
\r
6580 handles which a program may request the memory manager
\r
6581 to allocate memory to. The value returned includes the
\r
6582 operating system handle (handle value 0).
\r
6585 REGISTERS MODIFIED
\r
6592 AH = 0 SUCCESSFUL.
\r
6593 The total number of handles supported has been returned.
\r
6595 AH = 80h NON-RECOVERABLE.
\r
6596 The manager has detected a malfunction in the memory
\r
6599 AH = 81h NON-RECOVERABLE.
\r
6600 The manager has detected a malfunction in the expanded
\r
6603 AH = 84h NON-RECOVERABLE.
\r
6604 The function code passed to the manager is not defined.
\r
6606 AH = 8Fh NON-RECOVERABLE.
\r
6607 The subfunction parameter is invalid.
\r
6615 Function 21. Get Handle Directory
\r
6616 Get Total Handles subfunction
\r
6622 total_handles DW ?
\r
6624 MOV AX,5402h ; load function code
\r
6625 INT 67h ; call the memory manager
\r
6626 OR AH,AH ; check EMM status
\r
6627 JNZ emm_err_handler ; jump to error handler on error
\r
6628 MOV total_handles,BX ; save total handle count
\r
6674 Function 22. Alter Page Map & Jump
\r
6680 This function alters the memory mapping context and trans-
\r
6681 fers control to the specified address. It is analogous to
\r
6682 the FAR JUMP in the 8086 family architecture. The memory
\r
6683 mapping context which existed before the invocation of this
\r
6686 Mapping no pages and jumping is not considered an error. If
\r
6687 a request to map zero pages and jump is made, control is
\r
6688 transferred to the target address, and this function
\r
6689 performs a far jump.
\r
6692 CALLING PARAMETERS
\r
6695 Contains the Alter Page Map & Jump function.
\r
6697 log_phys_map_struct STRUC
\r
6698 log_page_number DW ?
\r
6699 phys_page_number_seg DW ?
\r
6700 log_phys_map_struct ENDS
\r
6702 map_and_jump_struct STRUC
\r
6703 target_address DD ?
\r
6704 log_phys_map_len DB ?
\r
6705 log_phys_map_ptr DD ?
\r
6706 map_and_jump_struct ENDS
\r
6708 AL = physical page number/segment selector
\r
6709 Contains a code which indicates whether the value
\r
6712 .log_phys_map.phys_page_number_seg
\r
6714 members are physical page numbers or are the segment
\r
6715 address representation of the physical page numbers. A
\r
6716 zero in AL indicates that the values are physical page
\r
6717 numbers. A one in AL indicates that the values in these
\r
6718 members are the segment address representations of the
\r
6719 physical page numbers.
\r
6721 DX = handle number
\r
6722 Contains the EMM handle.
\r
6733 Function 22. Alter Page Map & Jump
\r
6737 DS:SI = pointer to map_and_jump structure
\r
6738 Contains a pointer to a structure that contains the
\r
6739 information necessary to map the desired physical pages
\r
6740 and jump to the target address. The structure consists
\r
6741 of the following elements:
\r
6744 The first member is a far pointer which contains the
\r
6745 target address to which control is to be trans-
\r
6746 ferred. The address is represented in segment:of-
\r
6747 fset format. The offset portion of the address is
\r
6748 stored in the low portion of the double word.
\r
6751 The second member is a byte which contains the
\r
6752 number of entries in the array of structures which
\r
6753 immediately follows it. The array is as long as the
\r
6754 application developer needs in order to map the
\r
6755 desired logical pages into physical pages. The
\r
6756 number of entries cannot exceed the number of
\r
6757 mappable pages in the system.
\r
6760 The third member is a pointer to an array of struc-
\r
6761 tures which contain the logical page numbers and
\r
6762 physical pages or segment address at which they are
\r
6763 to be mapped. Each entry in the array of structures
\r
6764 contains the following two elements:
\r
6767 The first member of this structure is a word which
\r
6768 contains the number of the logical page to be
\r
6771 .phys_page_number_seg
\r
6772 The second member of this structure is a word which
\r
6773 contains either the physical page number or the
\r
6774 segment address representation of the physical page
\r
6775 number at which the previous logical page number is
\r
6776 to be mapped. The value passed in AL determines the
\r
6777 type of representation.
\r
6780 REGISTERS MODIFIED
\r
6792 Function 22. Alter Page Map & Jump
\r
6796 Note............................................................
\r
6797 Values in registers which don't contain required parameters
\r
6798 maintain the values across the jump. The values in regis-
\r
6799 ters (with the exception of AX) and the flag state at the
\r
6800 beginning of the function are still in the registers and
\r
6801 flags when the target address is reached.
\r
6806 AH = 0 SUCCESSFUL.
\r
6807 Control has been transferred to the target address.
\r
6809 AH = 80h NON-RECOVERABLE.
\r
6810 The manager has detected a malfunction in the memory
\r
6813 AH = 81h NON-RECOVERABLE.
\r
6814 The manager has detected a malfunction in the expanded
\r
6817 AH = 83h NON-RECOVERABLE.
\r
6818 The manager could not find the specified EMM handle.
\r
6819 The manager does not currently have any information
\r
6820 pertaining to the specified EMM handle. The program may
\r
6821 have corrupted its EMM handle.
\r
6823 AH = 84h NON-RECOVERABLE.
\r
6824 The function code passed to the manager is not defined.
\r
6826 AH = 8Ah RECOVERABLE.
\r
6827 One or more of the logical pages to map into a cor-
\r
6828 responding physical page is out of the range of logical
\r
6829 pages which are allocated to the EMM handle. The
\r
6830 program can recover from this condition by mapping a
\r
6831 logical page which is within the bounds for the EMM
\r
6834 AH = 8Bh RECOVERABLE.
\r
6835 One or more of the physical pages is out of the range of
\r
6836 allowable physical pages, or the log_phys_map_len
\r
6837 exceeds the number of mappable pages in the system.
\r
6838 Physical page numbers are numbered zero-relative. The
\r
6839 program can recover from this condition by mapping into
\r
6840 memory at a physical page which is in the range of
\r
6841 supported physical pages.
\r
6851 Function 22. Alter Page Map & Jump
\r
6855 AH = 8Fh NON-RECOVERABLE.
\r
6856 The subfunction parameter is invalid.
\r
6861 log_phys_map log_phys_map_struct (?) DUP (?)
\r
6863 map_and_jump map_and_jump_struct (?)
\r
6866 phys_page_or_seg_mode DB ?
\r
6868 MOV AX,SEG map_and_jump
\r
6870 LEA SI,map_and_jump ; DS:SI points to
\r
6873 MOV AH,55h ; load function code
\r
6874 MOV AL,phys_page_or_seg_mode ; specify physical page
\r
6876 INT 67h ; call memory manager
\r
6877 OR AH,AH ; check EMM status
\r
6878 JNZ emm_err_handler ; jump to error handler on
\r
6910 Function 23. Alter Page Map & Call
\r
6911 Alter Page Map & Call subfunction
\r
6917 This subfunction saves the current memory mapping context,
\r
6918 alters the specified memory mapping context, and transfers
\r
6919 control to the specified address. It is analogous to the
\r
6920 FAR CALL in the 8086 family architecture. Just as a return
\r
6921 from a FAR CALL restores the original value in the code
\r
6922 segment register, this subfunction restores the state of the
\r
6923 specified mapping context after the return.
\r
6925 There is no explicit expanded memory subfunction which
\r
6926 emulates a return from a FAR CALL. However, this facility
\r
6927 is implicitly available through the standard return from a
\r
6928 FAR CALL. The following paragraphs describe how this works:
\r
6930 After this function is invoked, unless an error is detected,
\r
6931 the memory manager will transfer control to the address
\r
6932 specified. If an error occurs, the memory manager returns
\r
6933 immediately with the error code in the AH register.
\r
6934 Otherwise, the memory manager pushes on the stack informa-
\r
6935 tion which enables it to restore the mapping context after
\r
6938 When the called procedure wants to return to the calling
\r
6939 procedure, it simply issues a standard FAR RETURN. The
\r
6940 memory manager traps this return, restores the specified
\r
6941 mapping context, and returns to the calling procedure. The
\r
6942 memory manager also returns a status from a successful
\r
6943 return just as it does for all functions.
\r
6945 Developers using this subfunction must make allowances for
\r
6946 the additional stack space this subfunction will use.
\r
6949 CALLING PARAMETERS
\r
6952 Contains the Alter Page Map & Call function.
\r
6954 log_phys_map_struct STRUC
\r
6955 log_page_number DW ?
\r
6956 phys_page_number_seg DW ?
\r
6957 log_phys_map_struct ENDS
\r
6969 Function 23. Alter Page Map & Call
\r
6970 Alter Page Map & Call subfunction
\r
6974 map_and_call_struct STRUC
\r
6975 target_address DD ?
\r
6976 new_page_map_len DB ?
\r
6977 new_page_map_ptr DD ?
\r
6978 old_page_map_len DB ?
\r
6979 old_page_map_ptr DD ?
\r
6980 reserved DW 4 DUP (?)
\r
6981 map_and_call_struct ENDS
\r
6983 AL = physical page number/segment selector
\r
6984 Contains a code which indicates whether the value
\r
6987 .new_page_map.phys_page_number_seg
\r
6988 .old_page_map.phys_page_number_seg
\r
6990 members are physical page numbers or are the segment
\r
6991 address representation of the physical page numbers. A
\r
6992 value of zero in AL indicates that the values in these
\r
6993 members are physical page numbers. A value of one in AL
\r
6994 indicates that the values in these members are the
\r
6995 segment address representations of the physical page
\r
6998 DX = handle number
\r
6999 Contains the EMM handle.
\r
7001 DS:SI = pointer to map_and_call structure
\r
7002 Contains a pointer to a structure which contains the
\r
7003 information necessary to map the desired physical pages
\r
7004 and call the target address. The structure members are
\r
7008 The first member is a far pointer which contains the
\r
7009 target address to which control is to be trans-
\r
7010 ferred. The address is represented in segment:of-
\r
7011 fset format. The offset portion of the address is
\r
7012 stored in the low portion of the pointer. The
\r
7013 application must supply this value.
\r
7016 The second member is a byte which contains the
\r
7017 number of entries in the new mapping context to
\r
7018 which new_page_map_ptr points. This number cannot
\r
7019 exceed the number of mappable pages in the system.
\r
7028 Function 23. Alter Page Map & Call
\r
7029 Alter Page Map & Call subfunction
\r
7034 The third member is a far pointer that points to an
\r
7035 array of structures which contains a list of the
\r
7036 logical page numbers and the physical page num-
\r
7037 bers/segments at which they are to be mapped im-
\r
7038 mediately after the call. The contents of the new
\r
7039 array of structures are described at the end of the
\r
7040 map_and_call structure.
\r
7043 The fourth member is a byte which contains the
\r
7044 number of entries in the old mapping context to
\r
7045 which old_page_map_ptr points. This number cannot
\r
7046 exceed the number of mappable pages in the system.
\r
7049 The fifth member is a far pointer that points to an
\r
7050 array of structures which contains a list of the
\r
7051 logical page numbers and the physical page num-
\r
7052 bers/segments at which they are to be mapped im-
\r
7053 mediately after the return. The contents of the old
\r
7054 array of structures are described at the end of the
\r
7055 map_and_call structure.
\r
7058 The sixth member is reserved for use by the memory
\r
7061 Each entry in the old and new array of structures contains
\r
7065 The first member of this structure is a word which
\r
7066 contains a logical page number which is to be mapped
\r
7067 at the succeeding physical page number/segment
\r
7068 immediately after the CALL (in the case of the new
\r
7069 array of structures) or after the RETURN (in the
\r
7070 case of the old array of structures).
\r
7072 .phys_page_number_seg
\r
7073 The second member of this structure is a word which
\r
7074 contains either the physical page number or the
\r
7075 segment address representation of the physical page
\r
7076 number/segment at which the preceding logical page
\r
7077 is to be mapped immediately after the CALL (in the
\r
7078 case of the new array of structures) or after the
\r
7079 RETURN (in the case of the old array of structures).
\r
7087 Function 23. Alter Page Map & Call
\r
7088 Alter Page Map & Call subfunction
\r
7092 REGISTERS MODIFIED
\r
7096 Note............................................................
\r
7097 Values in registers which don't contain required parameters
\r
7098 maintain the values across the call. The values in regis-
\r
7099 ters (with the exception of AX) and the flag state at the
\r
7100 beginning of the function are still in the registers and
\r
7101 flags when the target address is reached.
\r
7106 AH = 0 SUCCESSFUL.
\r
7107 Control has been transferred to the target address.
\r
7109 AH = 80h NON-RECOVERABLE.
\r
7110 The manager has detected a malfunction in the memory
\r
7113 AH = 81h NON-RECOVERABLE.
\r
7114 The manager has detected a malfunction in the expanded
\r
7117 AH = 83h NON-RECOVERABLE.
\r
7118 The manager couldn't find the specified EMM handle. The
\r
7119 manager doesn't have any information pertaining to the
\r
7120 specified EMM handle. The program may have corrupted
\r
7123 AH = 84h NON-RECOVERABLE.
\r
7124 The function code passed to the manager is not defined.
\r
7126 AH = 8Ah RECOVERABLE.
\r
7127 One or more of the logical pages to map into a cor-
\r
7128 responding physical page is out of the range of logical
\r
7129 pages which are allocated to the EMM handle. The
\r
7130 program can recover from this condition by mapping a
\r
7131 logical page which is within the bounds for the EMM
\r
7146 Function 23. Alter Page Map & Call
\r
7147 Alter Page Map & Call subfunction
\r
7151 AH = 8Bh RECOVERABLE.
\r
7152 One or more of the physical pages is out of the range of
\r
7153 allowable physical pages, or you've specified more
\r
7154 physical pages than exist in the system. Physical page
\r
7155 numbers are numbered zero-relative. The program can
\r
7156 recover from this condition by mapping a physical page
\r
7157 which is in the range from zero to three.
\r
7159 AH = 8Fh NON-RECOVERABLE.
\r
7160 The subfunction parameter is invalid.
\r
7165 new_page_map log_phys_map_struct (?) DUP (?)
\r
7167 old_page_map log_phys_map_struct (?) DUP (?)
\r
7169 map_and_call map_and_call_struct (?)
\r
7172 phys_page_or_seg_mode DB ?
\r
7174 MOV AX,SEG map_and_call
\r
7176 LEA SI,map_and_call ; DS:SI points to
\r
7178 MOV DX,emm_handle ; specify EMM handle
\r
7179 MOV AH,56h ; load function code
\r
7180 MOV AL,phys_page_or_seg_mode ; specify physical page
\r
7182 INT 67h ; control is actually
\r
7183 ; transferred to the called
\r
7184 ; procedure at this point
\r
7185 OR AH,AH ; check EMM status
\r
7186 JNZ emm_err_handler ; jump to error handler on
\r
7205 Function 23. Alter Page Map & Call
\r
7206 Get Page Map Stack Space Size subfunction
\r
7212 Since the Alter Page Map & Call function pushes additional
\r
7213 information onto the stack, this subfunction returns the
\r
7214 number of bytes of stack space the function requires.
\r
7217 CALLING PARAMETERS
\r
7220 Contains the Get Page Map Stack Space Size subfunction.
\r
7225 These results are valid only if the status returned is zero.
\r
7227 BX = stack space required
\r
7228 Contains the number of bytes which the Alter Page Map &
\r
7229 Call function will require. In other words, BX contains
\r
7230 the number (including the return address) which has to
\r
7231 be added to the stack pointer to remove all elements
\r
7235 REGISTERS MODIFIED
\r
7242 AH = 0 SUCCESSFUL.
\r
7243 The size of the array has been returned.
\r
7245 AH = 80h NON-RECOVERABLE.
\r
7246 The manager has detected a malfunction in the memory
\r
7249 AH = 81h NON-RECOVERABLE.
\r
7250 The manager has detected a malfunction in the expanded
\r
7253 AH = 84h NON-RECOVERABLE.
\r
7254 The function code passed to the manager is not defined.
\r
7264 Function 23. Alter Page Map & Call
\r
7265 Get Page Map Stack Space Size subfunction
\r
7269 AH = 8Fh NON-RECOVERABLE.
\r
7270 The subfunction parameter is invalid.
\r
7275 stack_space_reqd DW ?
\r
7277 MOV AX,5602h ; load function code
\r
7278 INT 67h ; call the memory manager
\r
7279 OR AH,AH ; check EMM status
\r
7280 JNZ emm_err_handler ; jump to error handler on error
\r
7281 MOV stack_space_reqd,BX ; save required stack size count
\r
7323 Function 24. Move/Exchange Memory Region
\r
7324 Move Memory Region subfunction
\r
7330 This subfunction copies a region of memory in the following
\r
7331 memory source/destination combinations.
\r
7333 o conventional memory to conventional memory
\r
7335 o conventional memory to expanded memory
\r
7337 o expanded memory to conventional memory
\r
7339 o expanded memory to expanded memory
\r
7341 You do not have to save and restore the expanded memory
\r
7342 mapping context to perform these move operations. The
\r
7343 current mapping context is maintained throughout this
\r
7346 The length of the region is limited by the amount of
\r
7347 expanded memory allocated to the handles specified.
\r
7348 However, in most practical applications, the region length
\r
7349 will be considerably smaller. A region length of zero is
\r
7350 not an error, and no move will be performed.
\r
7352 A region length which exceeds 16K bytes is not an error. In
\r
7353 this case the function assumes that a group of logical pages
\r
7354 is the target for the move. The logical page specified
\r
7355 represents the first logical page in which the move will
\r
7356 take place. If the region length exceeds 16K bytes, or if
\r
7357 the region is less than 16K bytes but spans logical pages,
\r
7358 there must be sufficient logical pages remaining after the
\r
7359 first logical page for the entire region to fit.
\r
7361 If your application needs to save a region of conventional
\r
7362 memory in expanded memory, you can move it without having to
\r
7363 perform a save or restore of the current mapping context.
\r
7364 The memory manager maintains the context. A move of up to
\r
7365 1M bytes may be performed, although practical lengths are
\r
7366 substantially less than this value.
\r
7368 If the source and destination handles are identical, the
\r
7369 source and destination regions are tested for overlap before
\r
7370 the move. If they overlap, the move direction is chosen so
\r
7371 that the destination region receives an intact copy of the
\r
7372 source region. A status will be returned indicating that
\r
7373 this overlap has occurred.
\r
7382 Function 24. Move/Exchange Memory Region
\r
7383 Move Memory Region subfunction
\r
7387 CALLING PARAMETERS
\r
7390 Contains the Move Memory Region function.
\r
7392 move_source_dest_struct STRUC
\r
7393 region_length DD ?
\r
7394 source_memory_type DB ?
\r
7395 source_handle DW ?
\r
7396 source_initial_offset DW ?
\r
7397 source_initial_seg_page DW ?
\r
7398 dest_memory_type DB ?
\r
7400 dest_initial_offset DW ?
\r
7401 dest_initial_seg_page DW ?
\r
7402 move_source_dest_struct ENDS
\r
7404 DS:SI = pointer to move_source_dest structure
\r
7405 Contains a pointer to a data structure which contains
\r
7406 the source and destination information for the move.
\r
7407 The structure members are described here:
\r
7410 The first member is a double word which specifies
\r
7411 the length of the memory region (in bytes) to be
\r
7414 .source_memory_type
\r
7415 The second member is a byte which specifies the type
\r
7416 of memory where the source region resides. A value
\r
7417 of zero indicates that the source region resides in
\r
7418 conventional memory (excluding the page frame seg-
\r
7419 ment). A value of one indicates that the source
\r
7420 region resides in expanded memory.
\r
7423 If the source region resides in expanded memory, the
\r
7424 third member is a word which specifies the handle
\r
7425 number associated with the source memory region. If
\r
7426 the source region resides in conventional memory,
\r
7427 this variable has no meaning and should be set to
\r
7428 zero for future compatibility.
\r
7430 .source_initial_offset
\r
7431 The fourth member is a word which specifies the
\r
7432 offset within the source region from which to begin
\r
7441 Function 24. Move/Exchange Memory Region
\r
7442 Move Memory Region subfunction
\r
7446 If the source region resides in expanded memory, the
\r
7447 source_initial_offset is relative to the beginning
\r
7448 of the 16K logical page. Because the offset is
\r
7449 relative to the beginning of a 16K expanded memory
\r
7450 page, it may only take on values between 0000h and
\r
7453 If the source region resides in conventional memory,
\r
7454 the source_initial_offset is a word which specifies
\r
7455 the offset, relative to the beginning of the source
\r
7456 segment, from which to begin the move. Because the
\r
7457 offset is relative to the beginning of a 64K-byte
\r
7458 conventional memory segment, it may take on values
\r
7459 between 0000h and FFFFh.
\r
7461 .source_initial_seg_page
\r
7462 The fifth member is a word which specifies the
\r
7463 initial segment or logical page number within the
\r
7464 source region from which to begin the move.
\r
7466 If the source region resides in expanded memory, the
\r
7467 value specifies the logical page within the source
\r
7468 region from which to begin the move.
\r
7470 If the source region resides in conventional memory,
\r
7471 the source_initial_seg_page specifies the initial
\r
7472 segment address within conventional memory from
\r
7473 which to begin the move.
\r
7476 The sixth member is a byte which specifies the type
\r
7477 of memory where the destination region resides. A
\r
7478 value of zero indicates conventional memory; a value
\r
7479 of one indicates expanded memory.
\r
7482 If the destination region resides in expanded
\r
7483 memory, the seventh member is a word which specifies
\r
7484 the handle number associated with the destination
\r
7485 memory region. If the destination region resides in
\r
7486 conventional memory, this variable has no meaning
\r
7487 and should be set to zero for future compatibility.
\r
7489 .dest_initial_offset
\r
7490 The eighth member is a word which specifies the
\r
7491 offset within the destination region from which to
\r
7500 Function 24. Move/Exchange Memory Region
\r
7501 Move Memory Region subfunction
\r
7505 If the destination region resides in expanded
\r
7506 memory, the dest_initial_offset is relative to the
\r
7507 beginning of the 16K-byte logical page. Because the
\r
7508 offset is relative to the beginning of a 16K-byte
\r
7509 expanded memory page, it may only take on values
\r
7510 between 0000h and 3FFFh.
\r
7512 If the destination region resides in conventional
\r
7513 memory, the dest_initial_offset is a word which
\r
7514 specifies the offset, relative to the beginning of
\r
7515 the destination segment, to begin the move. Because
\r
7516 the offset is relative to the beginning of a 64K
\r
7517 conventional memory segment, it may take on values
\r
7518 between 0000h and FFFFh.
\r
7520 .dest_initial_seg_page
\r
7521 The ninth member is a word which specifies the
\r
7522 initial segment or logical page number within the
\r
7523 destination region from which to begin the move.
\r
7525 If the destination region resides in expanded memory
\r
7526 then the value specifies the logical page within the
\r
7527 destination region from which to begin the move.
\r
7529 If the destination region resides in conventional
\r
7530 memory, the dest_initial_seg_page specifies the
\r
7531 initial segment address within conventional memory
\r
7532 from which to begin the move.
\r
7535 REGISTERS MODIFIED
\r
7542 AH = 0 SUCCESSFUL.
\r
7543 The memory regions have been moved.
\r
7545 AH = 80h NON-RECOVERABLE.
\r
7546 The manager has detected a malfunction in the memory
\r
7549 AH = 81h NON-RECOVERABLE.
\r
7550 The manager has detected a malfunction in the expanded
\r
7559 Function 24. Move/Exchange Memory Region
\r
7560 Move Memory Region subfunction
\r
7564 AH = 83h NON-RECOVERABLE.
\r
7565 The manager couldn't find either the source or destina-
\r
7566 tion EMM handles. The memory manager doesn't have any
\r
7567 information on the handles specified. The program may
\r
7568 have corrupted its EMM handles.
\r
7570 AH = 84h NON-RECOVERABLE.
\r
7571 The function code passed to the manager is not defined.
\r
7573 AH = 8Ah NON-RECOVERABLE.
\r
7574 One or more of the logical pages is out of the range of
\r
7575 logical pages allocated to the source/destination
\r
7578 AH = 8Fh NON-RECOVERABLE.
\r
7579 The subfunction parameter is invalid.
\r
7581 AH = 92h SUCCESSFUL.
\r
7582 The source and destination expanded memory regions have
\r
7583 the same handle and overlap. This is valid for a move.
\r
7584 The move has been completed and the destination region
\r
7585 has a full copy of the source region. However, at least
\r
7586 a portion of the source region has been overwritten by
\r
7587 the move. Note that the source and destination expanded
\r
7588 memory regions with different handles will never physi-
\r
7589 cally overlap because the different handles specify
\r
7590 totally different regions of expanded memory.
\r
7592 AH = 93h CONDITIONALLY-RECOVERABLE.
\r
7593 The length of the source or destination expanded memory
\r
7594 region specified exceeds the length of the expanded
\r
7595 memory region allocated either the source or destination
\r
7596 handle. Insufficient pages are allocated to this handle
\r
7597 to move a region of the size specified. The program can
\r
7598 recover from this condition by allocating additional
\r
7599 pages to the destination or source handle and attempting
\r
7600 to execute the function again. However, if the applica-
\r
7601 tion program allocated as much expanded memory as it
\r
7602 thought it needed, this may be a program error and is
\r
7605 AH = 94h NON-RECOVERABLE.
\r
7606 The conventional memory region and expanded memory
\r
7607 region overlap. This is invalid, the conventional
\r
7608 memory region cannot overlap the expanded memory region.
\r
7618 Function 24. Move/Exchange Memory Region
\r
7619 Move Memory Region subfunction
\r
7623 AH = 95h NON-RECOVERABLE.
\r
7624 The offset within the logical page exceeds the length of
\r
7625 the logical page. The initial source or destination
\r
7626 offsets within an expanded memory region must be between
\r
7627 0000h and 3FFFh (16383 or (length of a logical page
\r
7630 AH = 96h NON-RECOVERABLE.
\r
7631 Region length exceeds 1M bytes.
\r
7633 AH = 98h NON-RECOVERABLE.
\r
7634 The memory source and destination types are undefined.
\r
7636 AH = A2h NON-RECOVERABLE.
\r
7637 An attempt was made to wrap around the 1M-byte address
\r
7638 space of conventional memory during the move. The
\r
7639 combination of source/destination starting address and
\r
7640 length of the region to be moved exceeds 1M bytes. No
\r
7646 move_source_dest move_source_dest_struct (?)
\r
7648 MOV AX,SEG move_source_dest
\r
7650 LEA SI,move_source_dest ; DS:SI points to move_source_dest
\r
7651 MOV AX,5700h ; load function code
\r
7652 INT 67h ; call the memory manager
\r
7653 OR AH,AH ; check EMM status
\r
7654 JNZ emm_err_handler ; jump to error handler on error
\r
7677 Function 24. Move/Exchange Memory Region
\r
7678 Exchange Memory Region subfunction
\r
7684 This subfunction exchanges (using a string move) a region of
\r
7685 memory in any of the following memory source/destination
\r
7688 o conventional memory to conventional memory
\r
7690 o conventional memory to expanded memory
\r
7692 o expanded memory to conventional memory
\r
7694 o expanded memory to expanded memory
\r
7696 The term expanded memory region refers only to the area of
\r
7697 memory above 640K bytes (9FFFFh). If a system provides
\r
7698 mappable conventional memory, this function treats the
\r
7699 mappable conventional memory regions as ordinary convention-
\r
7700 al memory. The contents of the source region and the
\r
7701 destination region are exchanged.
\r
7703 The exchange operation can be performed without having to
\r
7704 save and restore the expanded memory mapping context. The
\r
7705 current mapping context is maintained throughout this
\r
7706 operation. The length of the region is limited to the
\r
7707 amount of expanded memory allocated to the specified EMM
\r
7708 handles. A length of zero is not an error; however, no
\r
7709 exchange will be performed. A region length which exceeds
\r
7710 16K bytes is not an error. In this case the function
\r
7711 assumes that a group of logical pages is the target for the
\r
7712 exchange. The logical page specified represents the first
\r
7713 logical page in which the exchange will take place. If the
\r
7714 region length exceeds 16K bytes, or if the region is less
\r
7715 than 16K bytes but spans logical pages, there must be
\r
7716 sufficient logical pages remaining after the first logical
\r
7717 page for the entire region to fit.
\r
7719 If your application needs to exchange a region of conven-
\r
7720 tional memory with expanded memory, you can simply exchange
\r
7721 it with the region of interest without having to perform a
\r
7722 save or restore of the current mapping context. An exchange
\r
7723 of up to 1M bytes may be performed, although practical
\r
7724 lengths are obviously below that value. Checking is done
\r
7725 before starting the exchange to prevent the possibility of
\r
7726 overlap during the exchange operation. Overlapping source
\r
7727 and destination regions for an exchange are invalid, and the
\r
7728 exchange will not take place.
\r
7736 Function 24. Move/Exchange Memory Region
\r
7737 Exchange Memory Region subfunction
\r
7741 CALLING PARAMETERS
\r
7744 Contains the Exchange Memory Region function.
\r
7746 xchg_source_dest_struct STRUC
\r
7747 region_length DD ?
\r
7748 source_memory_type DB ?
\r
7749 source_handle DW ?
\r
7750 source_initial_offset DW ?
\r
7751 source_initial_seg_page DW ?
\r
7752 dest_memory_type DB ?
\r
7754 dest_initial_offset DW ?
\r
7755 dest_initial_seg_page DW ?
\r
7756 xchg_source_dest_struct ENDS
\r
7758 DS:SI = pointer to xchg_source_dest structure
\r
7759 Contains a pointer to the data structure which contains
\r
7760 the source and destination information for the exchange.
\r
7761 The structure members are described here:
\r
7764 The first member is a double word which specifies
\r
7765 the length of the memory region to be exchanged.
\r
7767 .source_memory_type
\r
7768 The second member is a byte which specifies the type
\r
7769 of memory where the source region resides. A value
\r
7770 of zero indicates that the source region resides in
\r
7771 conventional memory. A value of one indicates that
\r
7772 the source region resides in expanded memory.
\r
7775 If the source region resides in expanded memory, the
\r
7776 third member is a word which specifies the handle
\r
7777 number associated with the source memory region. If
\r
7778 the source region resides in conventional memory,
\r
7779 this variable has no meaning and should be set to
\r
7780 zero for future compatibility.
\r
7782 .source_initial_offset
\r
7783 The fourth member is a word which specifies the
\r
7784 offset within the source region from which to begin
\r
7795 Function 24. Move/Exchange Memory Region
\r
7796 Exchange Memory Region subfunction
\r
7800 If the source region resides in expanded memory, the
\r
7801 source_initial_offset is relative to the beginning
\r
7802 of the 16K logical page. Because the offset is
\r
7803 relative to the beginning of a 16K expanded memory
\r
7804 page, it may only take on values between 0000h and
\r
7807 If the source region resides in conventional memory,
\r
7808 the source_initial_offset is a word which specifies
\r
7809 the offset, relative to the beginning of the source
\r
7810 segment, from which to begin the exchange at.
\r
7811 Because the offset is relative to the beginning of a
\r
7812 64K-byte conventional memory segment, it may take on
\r
7813 values between 0000h and FFFFh.
\r
7815 .source_initial_seg_page
\r
7816 The fifth member is a word which specifies the
\r
7817 initial segment or logical page number within the
\r
7818 source region from which to begin the exchange.
\r
7820 If the source region resides in expanded memory then
\r
7821 the value specifies the logical page within the
\r
7822 source region from which to begin the exchange.
\r
7824 If the source region resides in conventional memory,
\r
7825 the source_initial_seg_page specifies the initial
\r
7826 segment address within conventional memory from
\r
7827 which to begin the exchange.
\r
7830 The sixth member is a byte which specifies the type
\r
7831 of memory where the destination region resides. A
\r
7832 value of zero indicates that the destination region
\r
7833 resides in conventional memory (excluding the page
\r
7834 frame segment). A value of one indicates that the
\r
7835 destination region resides in expanded memory.
\r
7838 If the destination region resides in expanded
\r
7839 memory, the seventh member is a word which specifies
\r
7840 the handle number associated with the destination
\r
7841 memory region. If the destination region resides in
\r
7842 conventional memory, this variable has no meaning
\r
7843 and should be set to zero for future compatibility.
\r
7854 Function 24. Move/Exchange Memory Region
\r
7855 Exchange Memory Region subfunction
\r
7859 .dest_initial_offset
\r
7860 The eighth member is a word which specifies the
\r
7861 offset within the destination region from which to
\r
7862 begin the exchange.
\r
7864 If the destination region resides in expanded
\r
7865 memory, the dest_initial_offset is relative to the
\r
7866 beginning of the 16K-byte logical page. Because the
\r
7867 offset is relative to the beginning of a 16K-byte
\r
7868 expanded memory page, it may only take on values
\r
7869 between 0000h and 3FFFh.
\r
7871 If the destination region resides in conventional
\r
7872 memory, the dest_initial_offset is a word which
\r
7873 specifies the offset, relative to the beginning of
\r
7874 the destination segment, to begin the exchange at.
\r
7875 Because the offset is relative to the beginning of a
\r
7876 64K conventional memory segment, it may take on
\r
7877 values between 0000h and FFFFh.
\r
7879 .dest_initial_seg_page
\r
7880 The ninth member is a word which specifies the
\r
7881 initial segment or logical page number within the
\r
7882 destination region from which to begin the exchange.
\r
7884 If the destination region resides in expanded memory
\r
7885 then the value specifies the logical page within the
\r
7886 destination region from which to begin the exchange.
\r
7888 If the destination region resides in conventional
\r
7889 memory, the dest_initial_seg_page specifies the
\r
7890 initial segment address within conventional memory
\r
7891 from which to begin the exchange.
\r
7895 REGISTERS MODIFIED
\r
7902 AH = 0 SUCCESSFUL.
\r
7903 The memory regions have been exchanged.
\r
7913 Function 24. Move/Exchange Memory Region
\r
7914 Exchange Memory Region subfunction
\r
7918 AH = 80h NON-RECOVERABLE.
\r
7919 The manager has detected a malfunction in the memory
\r
7922 AH = 81h NON-RECOVERABLE.
\r
7923 The manager has detected a malfunction in the expanded
\r
7926 AH = 83h NON-RECOVERABLE.
\r
7927 The manager could not find either the source or destina-
\r
7928 tion EMM handles. The memory manager does not currently
\r
7929 have any information pertaining to the handles speci-
\r
7930 fied. The program may have corrupted its EMM handles.
\r
7932 AH = 84h NON-RECOVERABLE.
\r
7933 The function code passed to the manager is not defined.
\r
7935 AH = 8Ah NON-RECOVERABLE.
\r
7936 One or more of the logical pages is out of the range of
\r
7937 logical pages allocated to the source/destination
\r
7940 AH = 8Fh NON-RECOVERABLE.
\r
7941 The subfunction parameter is invalid.
\r
7943 AH = 93h CONDITIONALLY-RECOVERABLE.
\r
7944 The length of the source or destination expanded memory
\r
7945 region specified, exceeds the length of the expanded
\r
7946 memory region allocated to the source or destination
\r
7947 specified EMM handle. There are insufficient pages
\r
7948 allocated to this handle to exchange a region of the
\r
7949 size specified. The program can recover from this
\r
7950 condition by attempting to allocate additional pages to
\r
7951 the destination or source handle and attempting to
\r
7952 execute the function again. However, if the application
\r
7953 program was allocated as much expanded memory as it
\r
7954 thought it needed, this may be a program error and is
\r
7955 therefore not recoverable.
\r
7957 AH = 94h NON-RECOVERABLE.
\r
7958 The conventional memory region and expanded memory
\r
7959 region overlap. This is invalid, the conventional
\r
7960 memory region cannot overlap the expanded memory region.
\r
7972 Function 24. Move/Exchange Memory Region
\r
7973 Exchange Memory Region subfunction
\r
7977 AH = 95h NON-RECOVERABLE.
\r
7978 The offset within the logical page exceeds the length of
\r
7979 the logical page. The initial source or destination
\r
7980 offsets within an expanded memory region must be between
\r
7981 0000h and 3FFFh (16383 or (length of a logical page
\r
7984 AH = 96h NON-RECOVERABLE.
\r
7985 Region length exceeds 1M-byte limit.
\r
7987 AH = 97h NON-RECOVERABLE.
\r
7988 The source and destination expanded memory regions have
\r
7989 the same handle and overlap. This is invalid, the
\r
7990 source and destination expanded memory regions cannot
\r
7991 have the same handle and overlap when they are being
\r
7992 exchanged. Note that the source and destination
\r
7993 expanded memory regions which have different handles
\r
7994 will never physically overlap because the different
\r
7995 handles specify totally different regions of expanded
\r
7998 AH = 98h NON-RECOVERABLE.
\r
7999 The memory source and destination types are undefined.
\r
8001 AH = A2h NON-RECOVERABLE.
\r
8002 An attempt was made to wrap around the 1M-byte address
\r
8003 space of conventional memory during the exchange. The
\r
8004 combination of source/destination starting address and
\r
8005 length of the region to be exchanged exceeds 1M bytes.
\r
8006 No data was exchanged.
\r
8011 xchg_source_dest xchg_source_dest_struct (?)
\r
8013 MOV AX,SEG xchg_source_dest
\r
8015 LEA SI,xchg_source_dest ; DS:SI points to xchg_source_dest
\r
8016 MOV AX,5701h ; load function code
\r
8017 INT 67h ; call the memory manager
\r
8018 OR AH,AH ; check EMM status
\r
8019 JNZ emm_err_handler ; jump to error handler on error
\r
8031 Function 25. Get Mappable Physical Address Array
\r
8032 Get Mappable Physical Address Array subfunction
\r
8038 This subfunction returns an array containing the segment
\r
8039 address and physical page number for each mappable physical
\r
8040 page in a system. The contents of this array provide a
\r
8041 cross reference between physical page numbers and the actual
\r
8042 segment addresses for each mappable page in the system. The
\r
8043 array is sorted in ascending segment order. This does not
\r
8044 mean that the physical page numbers associated with the
\r
8045 segment addresses are also in ascending order.
\r
8048 CALLING PARAMETERS
\r
8051 Contains the Get Mappable Physical Address Array
\r
8054 mappable_phys_page_struct STRUC
\r
8055 phys_page_segment DW ?
\r
8056 phys_page_number DW ?
\r
8057 mappable_phys_page_struct ENDS
\r
8059 ES:DI = mappable_phys_page
\r
8060 Contains a pointer to an application-supplied memory
\r
8061 area where the memory manager will copy the physical
\r
8062 address array. Each entry in the array is a structure
\r
8063 containing two members:
\r
8065 .phys_page_segment
\r
8066 The first member is a word which contains the
\r
8067 segment address of the mappable physical page
\r
8068 associated with the physical page number following
\r
8069 it. The array entries are sorted in ascending
\r
8070 segment address order.
\r
8073 The second member is a word which contains the
\r
8074 physical page number which corresponds to the
\r
8075 previous segment address. The physical page numbers
\r
8076 are not necessarily in ascending order.
\r
8090 Function 25. Get Mappable Physical Address Array
\r
8091 Get Mappable Physical Address Array subfunction
\r
8097 An expanded memory board has its page frame starting
\r
8098 at address C0000h and has no mappable conventional
\r
8099 memory. For this configuration, physical page 0
\r
8100 corresponds to segment address C000h, physical page
\r
8101 1 corresponds to segment address C400h, etc. The
\r
8102 array would contain the following data (in this
\r
8113 An expanded memory board has a large page frame
\r
8114 starting at address C0000h and has mappable conven-
\r
8115 tional memory from 90000h through 9FFFFh. For this
\r
8116 configuration, physical page 0 corresponds to
\r
8117 segment address C000h, physical page 1 corresponds
\r
8118 to segment address C400h, etc. The array would
\r
8119 contain the following data in the order specified.
\r
8120 Note that the expanded memory region always has the
\r
8121 lowest numerically valued physical page numbers.
\r
8149 Function 25. Get Mappable Physical Address Array
\r
8150 Get Mappable Physical Address Array subfunction
\r
8156 These results are valid only if the status returned is zero.
\r
8158 CX = number of entries in the mappable_phys_page
\r
8159 Multiply this number by (SIZE mappable_phys_page_struct)
\r
8160 to determine the number of bytes the physical page
\r
8161 address array requires.
\r
8164 REGISTERS MODIFIED
\r
8171 AH = 0 SUCCESSFUL.
\r
8172 The hardware configuration array has been returned.
\r
8174 AH = 80h NON-RECOVERABLE.
\r
8175 The manager has detected a malfunction in the memory
\r
8178 AH = 81h NON-RECOVERABLE.
\r
8179 The manager has detected a malfunction in the expanded
\r
8182 AH = 84h NON-RECOVERABLE.
\r
8183 The function code passed to the manager is not defined.
\r
8185 AH = 8Fh NON-RECOVERABLE.
\r
8186 The subfunction parameter is invalid.
\r
8208 Function 25. Get Mappable Physical Address Array
\r
8209 Get Mappable Physical Address Array subfunction
\r
8215 mappable_phys_page mappable_phys_page_struct (?)
\r
8217 mappable_page_entry_count DW ?
\r
8219 MOV AX,SEG mappable_phys_page
\r
8221 LEA DI,mappable_phys_page ; ES:DI points to
\r
8222 ; mappable_phys_page
\r
8223 MOV AX,5800h ; load function code
\r
8224 INT 67h ; call the memory
\r
8226 OR AH,AH ; check EMM status
\r
8227 JNZ emm_err_handler ; jump to error handler
\r
8229 MOV mappable_page_entry_count,CX ; save mappable
\r
8230 ; page entry count
\r
8267 Function 25. Get Mappable Physical Address Array
\r
8268 Get Mappable Physical Address Array Entries subfunction
\r
8274 This subfunction gets the number of entries which will be
\r
8275 required for the array the first subfunction returns.
\r
8278 CALLING PARAMETERS
\r
8281 Contains the Get Physical Page Address Array Entries
\r
8282 subfunction. This subfunction returns a word which
\r
8283 represents the number of entries in the array returned
\r
8284 by the previous subfunction. This number also repre-
\r
8285 sents the number of mappable physical pages in a system.
\r
8290 These results are valid only if the status returned is zero.
\r
8292 CX = number of entries in the mappable_phys_page
\r
8293 Multiply this number by (SIZE mappable_phys_page_struct)
\r
8294 to determine the number of bytes the physical page
\r
8295 address array will require.
\r
8298 REGISTERS MODIFIED
\r
8305 AH = 0 SUCCESSFUL.
\r
8306 The number of mappable physical pages has been returned.
\r
8308 AH = 80h NON-RECOVERABLE.
\r
8309 The manager has detected a malfunction in the memory
\r
8312 AH = 81h NON-RECOVERABLE.
\r
8313 The manager has detected a malfunction in the expanded
\r
8316 AH = 84h NON-RECOVERABLE.
\r
8317 The function code passed to the manager is not defined.
\r
8326 Function 25. Get Mappable Physical Address Array
\r
8327 Get Mappable Physical Address Array Entries subfunction
\r
8331 AH = 8Fh NON-RECOVERABLE.
\r
8332 The subfunction parameter is invalid.
\r
8337 mappable_page_entry_count DW ?
\r
8339 MOV AX,5801h ; load function code
\r
8340 INT 67h ; call memory manager
\r
8341 OR AH,AH ; check EMM status
\r
8342 JNZ emm_err_handler ; jump to error handler
\r
8344 MOV mappable_page_entry_count,CX ; save mappable
\r
8345 ; page entry count
\r
8385 Function 26. Get Expanded Memory Hardware Information
\r
8386 Get Hardware Configuration Array subfunction
\r
8390 Note............................................................
\r
8391 This function is for use by operating systems only. This
\r
8392 function can be disabled at any time by the operating
\r
8393 system. Refer to Function 30 for a description of how an
\r
8394 operating system does this.
\r
8399 This subfunction returns an array containing expanded memory
\r
8400 hardware configuration information for use by an operating
\r
8401 system/environment.
\r
8404 CALLING PARAMETERS
\r
8407 Contains the Get Hardware Configuration Array subfunc-
\r
8410 hardware_info_struct STRUC
\r
8411 raw_page_size DW ?
\r
8412 alternate_register_sets DW ?
\r
8413 context_save_area_size DW ?
\r
8414 DMA_register_sets DW ?
\r
8415 DMA_channel_operation DW ?
\r
8416 hardware_info_struct ENDS
\r
8418 ES:DI = hardware_info
\r
8419 Contains a pointer to a memory area that the operating
\r
8420 system supplies where the memory manager will copy
\r
8421 expanded memory hardware information. The structure
\r
8422 contains these five members:
\r
8425 The first member is a word which contains the size
\r
8426 of a raw mappable physical page in paragraphs (16
\r
8427 bytes). LIM standard pages are always 16K bytes.
\r
8428 However, other implementations of expanded memory
\r
8429 boards do not necessarily comply with this standard
\r
8430 and can emulate a 16K-byte page by mapping in
\r
8431 multiple smaller pages. This member specifies the
\r
8432 size of a mappable physical page viewed from the
\r
8433 hardware implementation level.
\r
8444 Function 26. Get Expanded Memory Hardware Information
\r
8445 Get Hardware Configuration Array subfunction
\r
8449 .alternate_register_sets
\r
8450 The second member is a word which specifies the
\r
8451 number of alternate mapping register sets. The
\r
8452 additional mapping register sets are termed alter-
\r
8453 nate mapping register sets in this document.
\r
8455 All expanded memory boards have at least one set of
\r
8456 hardware registers to perform the logical to
\r
8457 physical page mapping. Some expanded memory boards
\r
8458 have more than one set of these mapping registers.
\r
8459 This member specifies how many of these alternate
\r
8460 mapping register sets exist (beyond the one set that
\r
8461 all expanded memory boards have) on the expanded
\r
8462 memory boards in the system. If an expanded memory
\r
8463 card has only one set of mapping registers (that is,
\r
8464 no alternate mapping register sets) this member has
\r
8467 .context_save_area_size
\r
8468 The third member is a word which contains the
\r
8469 storage requirements for the array required to save
\r
8470 a mapping context. The value returned in this
\r
8471 member is exactly the same as that returned by
\r
8472 Function 15 (Get Size of Page Map Save Array
\r
8475 .DMA_register_sets
\r
8476 The fourth member is a word which contains the
\r
8477 number of register sets that can be assigned to DMA
\r
8478 channels. These DMA register sets, although similar
\r
8479 in use to alternate register sets, are for DMA
\r
8480 mapping and not task mapping.
\r
8482 If the expanded memory hardware does not support DMA
\r
8483 register sets, care must be taken when DMA is taking
\r
8486 In a multitasking operating system, when one task is
\r
8487 waiting for DMA to complete, it is useful to be able
\r
8488 to switch to another task. However, if the DMA is
\r
8489 taking place in memory that the second task will
\r
8490 need to remap, remapping would be disastrous.
\r
8503 Function 26. Get Expanded Memory Hardware Information
\r
8504 Get Hardware Configuration Array subfunction
\r
8508 If the expanded memory hardware can detect when DMA
\r
8509 is occurring, the OS/E should allow task switches
\r
8510 and remapping during DMA. If no special support for
\r
8511 DMA is available, no remapping should be done when
\r
8512 DMA is in progress.
\r
8514 .DMA_channel_operation
\r
8515 The fifth member is a word which specifies a special
\r
8516 case for the DMA register sets. A value of zero
\r
8517 specifies that the DMA register sets behave as
\r
8518 described in Function 28. A value of one specifies
\r
8519 that the expanded memory hardware has only one DMA
\r
8520 register set. In addition, if any channel is mapped
\r
8521 through this register set, then all channels are
\r
8522 mapped through it. For LIM standard boards, this
\r
8528 These results are valid only if the status returned is zero.
\r
8531 Contains the expanded memory hardware-specific informa-
\r
8532 tion described above.
\r
8535 REGISTERS MODIFIED
\r
8542 AH = 0 SUCCESSFUL.
\r
8543 The hardware configuration array has been returned.
\r
8545 AH = 80h NON-RECOVERABLE.
\r
8546 The manager has detected a malfunction in the memory
\r
8549 AH = 81h NON-RECOVERABLE.
\r
8550 The manager has detected a malfunction in the expanded
\r
8553 AH = 84h NON-RECOVERABLE.
\r
8554 The function code passed to the manager is not defined.
\r
8562 Function 26. Get Expanded Memory Hardware Information
\r
8563 Get Hardware Configuration Array subfunction
\r
8567 AH = 8Fh NON-RECOVERABLE.
\r
8568 The subfunction parameter is invalid.
\r
8570 AH = A4h NON-RECOVERABLE.
\r
8571 Access to this function has been denied by the operating
\r
8572 system. The function cannot be used at this time.
\r
8577 hardware_info hardware_info_struct (?)
\r
8579 MOV AX,SEG hardware_info
\r
8581 LEA DI,hardware_info ; ES:DI points to hardware_info
\r
8582 MOV AX,5900h ; load function code
\r
8583 INT 67h ; call the memory manager
\r
8584 OR AH,AH ; check EMM status
\r
8585 JNZ emm_err_handler ; jump to error handler on error
\r
8621 Function 26. Get Expanded Memory Hardware Information
\r
8622 Get Unallocated Raw Page Count subfunction
\r
8628 The Get Unallocated Raw Page Count subfunction returns the
\r
8629 number of unallocated non-standard length mappable pages as
\r
8630 well as the total number of non-standard length mappable
\r
8631 pages in expanded memory to the operating system.
\r
8633 One variety of expanded memory board has a page size which
\r
8634 is a sub-multiple of 16K bytes. An expanded memory page
\r
8635 which is a sub-multiple of 16K is termed a raw page. An
\r
8636 operating system may deal with mappable physical page sizes
\r
8637 which are sub-multiples of 16K bytes.
\r
8639 If the expanded memory board supplies pages in exact
\r
8640 multiples of 16K bytes, the number of pages this function
\r
8641 returns is identical to the number Function 3 (Get Unallo-
\r
8642 cated Page Count) returns. In this case, there is no
\r
8643 difference between a page and a raw page.
\r
8646 CALLING PARAMETERS
\r
8649 Contains the Get Unallocated Raw Page Count subfunction.
\r
8654 These results are valid only if the status returned is zero.
\r
8656 BX = unallocated raw pages
\r
8657 The number of raw pages that are currently available for
\r
8660 DX = total raw pages
\r
8661 The total number of raw pages in expanded memory.
\r
8664 REGISTERS MODIFIED
\r
8680 Function 26. Get Expanded Memory Hardware Information
\r
8681 Get Unallocated Raw Page Count subfunction
\r
8687 AH = 0 SUCCESSFUL.
\r
8688 The manager has returned the number of unallocated raw
\r
8689 pages and the number of total raw pages in expanded
\r
8692 AH = 80h NON-RECOVERABLE.
\r
8693 The manager detected a malfunction in the memory manager
\r
8696 AH = 81h NON-RECOVERABLE.
\r
8697 The manager detected a malfunction in the expanded
\r
8700 AH = 84h NON-RECOVERABLE.
\r
8701 The function code passed to the memory manager is not
\r
8704 AH = 8Fh NON-RECOVERABLE.
\r
8705 The subfunction parameter is invalid.
\r
8710 unalloc_raw_pages DW ?
\r
8711 total_raw_pages DW ?
\r
8713 MOV AX,5901h ; load function code
\r
8714 INT 67h ; call the memory manager
\r
8715 OR AH,AH ; check EMM status
\r
8716 JNZ emm_err_handler ; jump to error handler on error
\r
8717 MOV unalloc_raw_pages,BX ; save unallocated raw page count
\r
8718 MOV total_raw_pages,DX ; save total raw page count
\r
8739 Function 27. Allocate Standard/Raw Pages
\r
8740 Allocate Standard Pages subfunction
\r
8746 The Allocate Standard Pages subfunction allocates the number
\r
8747 of standard size (16K bytes) pages that the operating system
\r
8748 requests and assigns a unique EMM handle to these pages.
\r
8749 The EMM handle owns these pages until the operating system
\r
8750 deallocates them. This subfunction allows you to allocate
\r
8751 zero pages to a handle, unlike Function 4 (Allocate Pages).
\r
8753 Note............................................................
\r
8754 This note affects expanded memory manager implementors and
\r
8755 operating system developers only. Applications should not
\r
8756 use the following characteristic of the memory manager. An
\r
8757 application violating this rule will be incompatible with
\r
8758 future versions of Microsoft's operating systems and
\r
8761 To be compatible with this specification, an expanded memory
\r
8762 manager will provide a special handle which is available to
\r
8763 the operating system only. This handle will have a value of
\r
8764 0000h and will have a set of pages allocated to it when the
\r
8765 expanded memory manager driver installs. The pages that the
\r
8766 memory manager will automatically allocate to handle 0000h
\r
8767 are those that backfill conventional memory. Typically,
\r
8768 this backfill occurs between addresses 40000h (256K) and
\r
8769 9FFFFh (640K). However, the range can extend below and
\r
8770 above this limit if the hardware and memory manager have the
\r
8773 An operating system won't have to invoke Function 27 to
\r
8774 obtain this handle because it can assume the handle already
\r
8775 exists and is available for use immediately after the
\r
8776 expanded memory device driver installs. When an operating
\r
8777 system wants to use this handle, it uses the special handle
\r
8778 value of 0000h. The operating system will be able to invoke
\r
8779 any EMM function using this special handle value. To
\r
8780 allocate pages to this handle, the operating system need
\r
8781 only invoke Function 18 (Reallocate Pages).
\r
8783 There are two special cases for this handle:
\r
8785 1. Function 27 (Allocate Standard Pages subfunction). This
\r
8786 function must never return zero as a handle value.
\r
8787 Applications must always invoke Function 27 to allocate
\r
8788 pages and obtain a handle which identifies the pages
\r
8789 which belong to it. Since Function 27 never returns a
\r
8798 Function 27. Allocate Standard/Raw Pages
\r
8799 Allocate Standard Pages subfunction
\r
8803 handle value of zero, an application will never gain
\r
8804 access to this special handle.
\r
8806 2. Function 6 (Deallocate Pages). If the operating system
\r
8807 uses it to deallocate the pages which are allocated to
\r
8808 this handle, the pages the handle owns will be returned
\r
8809 to the manager for use. But the handle will not be
\r
8810 available for reassignment. The manager should treat a
\r
8811 deallocate pages function request for this handle the
\r
8812 same as a reallocate pages function request, where the
\r
8813 number of pages to reallocate to this handle is zero.
\r
8816 CALLING PARAMETERS
\r
8819 Contains the Allocate Standard Pages subfunction.
\r
8821 BX = num_of_standard_pages_to_alloc
\r
8822 Contains the number of standard pages the operating
\r
8823 system wants to allocate.
\r
8828 These results are valid only if the status returned is zero.
\r
8831 Contains a unique EMM handle. The operating system must
\r
8832 use this EMM handle as a parameter in any function that
\r
8833 requires it. Up to 255 handles may be obtained. (Both
\r
8834 Function 27 and Function 4 must share the same 255
\r
8837 For all functions using this handle, the length of the
\r
8838 physical and logical pages allocated to it are standard
\r
8839 length (that is, 16K bytes).
\r
8842 REGISTERS MODIFIED
\r
8857 Function 27. Allocate Standard/Raw Pages
\r
8858 Allocate Standard Pages subfunction
\r
8864 AH = 0 SUCCESSFUL.
\r
8865 The manager has allocated the pages to an assigned EMM
\r
8868 AH = 80h NON-RECOVERABLE.
\r
8869 The manager detected a malfunction in the memory manager
\r
8872 AH = 81h NON-RECOVERABLE.
\r
8873 The manager detected a malfunction in the expanded
\r
8876 AH = 84h NON-RECOVERABLE.
\r
8877 The function code passed to the memory manager is not
\r
8880 AH = 85h RECOVERABLE.
\r
8881 All EMM handles are being used.
\r
8883 AH = 87h RECOVERABLE.
\r
8884 There aren't enough expanded memory pages present in the
\r
8885 system to satisfy the operating system's request.
\r
8887 AH = 88h RECOVERABLE.
\r
8888 There aren't enough unallocated pages to satisfy the
\r
8889 operating system's request.
\r
8891 AH = 8Fh NON-RECOVERABLE.
\r
8892 The subfunction parameter is invalid.
\r
8897 num_of_standard_pages_to_alloc DW ?
\r
8900 MOV BX,num_of_standard_pages_to_alloc
\r
8901 MOV AX,5A00h ; load function code
\r
8902 INT 67h ; call the memory manager
\r
8903 OR AH,AH ; check EMM status
\r
8904 JNZ emm_err_handler ; jump to error handler on
\r
8906 MOV emm_handle,DX ; save handle
\r
8916 Function 27. Allocate Standard/Raw Pages
\r
8917 Allocate Raw Pages subfunction
\r
8923 The Allocate Raw Pages function allocates the number of non-
\r
8924 standard size pages that the operating system requests and
\r
8925 assigns a unique EMM handle to these pages. The EMM handle
\r
8926 owns these pages until the operating system deallocates
\r
8927 them. This function allows you to allocate zero pages to a
\r
8928 handle, unlike Function 4 (Allocate Pages).
\r
8930 A hardware vendor may design an expanded memory board that
\r
8931 has a page size which is a sub-multiple of 16K bytes. A
\r
8932 physical page which is a sub-multiple of 16K is termed a raw
\r
8933 page. The operating system may deal with page sizes which
\r
8934 are sub-multiples of 16K bytes. The memory manager must
\r
8935 treat any function using a handle with raw pages allocated
\r
8936 to it by Function 27 (Allocate Raw Pages subfunction)
\r
8937 differently than it does a handle that has normal 16K-byte
\r
8938 pages allocated to it.
\r
8940 Handles which are assigned using Function 4 (Allocate Pages)
\r
8941 or Function 27 (Allocate Standard Pages subfunction) must
\r
8942 have pages which are 16K bytes -- this is the length of a
\r
8943 standard expanded memory page. If the expanded memory board
\r
8944 hardware is not able to supply 16K-byte pages, the memory
\r
8945 manager must emulate pages which are 16K bytes combining
\r
8946 multiple non-standard size pages to form a single 16K-byte
\r
8949 Handles which are assigned using Function 27 (Allocate Raw
\r
8950 Pages subfunction) are called raw handles. All logical
\r
8951 pages allocated to a raw handle may have a non-standard
\r
8952 length (that is, not 16K bytes). However, once the operat-
\r
8953 ing system has allocated a number of raw pages to a handle,
\r
8954 it is the responsibility of the memory manager to recognize
\r
8955 that raw handle as one that has non-standard size pages
\r
8956 allocated to it. The memory manager must identify these
\r
8957 handles and treat all functions which use handles which have
\r
8958 non-standard page lengths differently. The logical page
\r
8959 length becomes the length of the non-standard size page for
\r
8960 any raw handle that Function 27 assigns.
\r
8962 Note............................................................
\r
8963 This note affects expanded memory manager implementors and
\r
8964 operating system developers only. Applications should not
\r
8965 use the following characteristic of the memory manager. An
\r
8966 application violating this rule will be incompatible with
\r
8975 Function 27. Allocate Standard/Raw Pages
\r
8976 Allocate Raw Pages subfunction
\r
8980 future versions of Microsoft's operating systems and
\r
8983 To be compatible with this specification, an expanded memory
\r
8984 manager will provide a special handle which is available to
\r
8985 the operating system only. This handle will have a value of
\r
8986 0000h and will have a set of pages allocated to it when the
\r
8987 expanded memory manager driver installs. The pages that the
\r
8988 memory manager will automatically allocate to handle 0000h
\r
8989 are those that backfill conventional memory. Typically,
\r
8990 this backfill occurs between addresses 40000h (256K) and
\r
8991 9FFFFh (640K). However, the range can extend below and
\r
8992 above this limit if the hardware and memory manager have the
\r
8995 An operating system won't have to invoke Function 27 to
\r
8996 obtain this handle because it can assume the handle already
\r
8997 exists and is available for use immediately after the
\r
8998 expanded memory device driver installs. When an operating
\r
8999 system wants to use this handle, it uses the special handle
\r
9000 value of 0000h. The operating system will be able to invoke
\r
9001 any EMM function using this special handle value. To
\r
9002 allocate pages to this handle, the operating system need
\r
9003 only invoke Function 18 (Reallocate Pages).
\r
9005 There are two special cases for this handle:
\r
9007 1. Function 27 (Allocate Raw Pages subfunction). This
\r
9008 function must never return zero as a handle value.
\r
9009 Applications must always invoke Function 27 to allocate
\r
9010 pages and obtain a handle which identifies the pages
\r
9011 which belong to it. Since Function 27 never returns a
\r
9012 handle value of zero, an application will never gain
\r
9013 access to this special handle.
\r
9015 2. Function 6 (Deallocate Pages). If the operating system
\r
9016 uses it to deallocate the pages which are allocated to
\r
9017 this handle, the pages the handle owns will be returned
\r
9018 to the manager for use. But the handle will not be
\r
9019 available for reassignment. The manager should treat a
\r
9020 deallocate pages function request for this handle the
\r
9021 same as a reallocate pages function request, where the
\r
9022 number of pages to reallocate to this handle is zero.
\r
9034 Function 27. Allocate Standard/Raw Pages
\r
9035 Allocate Raw Pages subfunction
\r
9039 CALLING PARAMETERS
\r
9042 Contains the Allocate Raw Pages subfunction.
\r
9044 BX = num_of_raw_pages_to_alloc
\r
9045 Contains the number of raw pages the operating system
\r
9046 wishes to allocate.
\r
9051 These results are valid only if the status returned is zero.
\r
9054 Contains a unique EMM raw handle. The operating system
\r
9055 must use this EMM raw handle as a parameter in any
\r
9056 function that requires it. Up to 255 handles may be
\r
9057 obtained. (Both Function 4 and Function 27 must share
\r
9058 the same 255 handles).
\r
9060 For all functions using this raw handle, the length of
\r
9061 the physical and logical pages allocated to it may be
\r
9062 non-standard (that is, not 16K bytes).
\r
9065 REGISTERS MODIFIED
\r
9072 AH = 0 SUCCESSFUL.
\r
9073 The manager has allocated the raw pages to an assigned
\r
9076 AH = 80h NON-RECOVERABLE.
\r
9077 The manager detected a malfunction in the memory manager
\r
9080 AH = 81h NON-RECOVERABLE.
\r
9081 The manager detected a malfunction in the expanded
\r
9093 Function 27. Allocate Standard/Raw Pages
\r
9094 Allocate Raw Pages subfunction
\r
9098 AH = 84h NON-RECOVERABLE.
\r
9099 The function code passed to the memory manager is not
\r
9102 AH = 85h RECOVERABLE.
\r
9103 All EMM handles are being used.
\r
9105 AH = 87h RECOVERABLE.
\r
9106 There aren't enough expanded memory raw pages present in
\r
9107 the system to satisfy the operating system's request.
\r
9109 AH = 88h RECOVERABLE.
\r
9110 There aren't enough unallocated raw pages to satisfy the
\r
9111 operating system's request.
\r
9113 AH = 8Fh NON-RECOVERABLE.
\r
9114 The subfunction parameter is invalid.
\r
9119 num_of_raw_pages_to_alloc DW ?
\r
9120 emm_raw_handle DW ?
\r
9122 MOV BX,num_of_raw_pages_to_alloc
\r
9123 MOV AX,5A01h ; load function code
\r
9124 INT 67h ; call the memory manager
\r
9125 OR AH,AH ; check EMM status
\r
9126 JNZ emm_err_handler ; jump to error handler
\r
9128 MOV emm_raw_handle,DX ; save raw handle
\r
9152 Function 28. Alternate Map Register Set
\r
9156 Note............................................................
\r
9157 This function is for use by operating systems only. The
\r
9158 operating system can disable this function at any time.
\r
9159 Refer to Function 30 for a description of how an operating
\r
9160 system can enable or disable this function.
\r
9163 Design Considerations
\r
9165 The hardware support for the entire set of subfunctions
\r
9166 described is generally not present on every expanded memory
\r
9167 board from every vendor of expanded memory board products.
\r
9168 For some of the subfunctions, software emulation is provid-
\r
9169 ed. For other subfunctions, a certain protocol in their use
\r
9170 must be observed. The subfunctions for which this is most
\r
9171 crucial are those which address system DMA capabilities.
\r
9174 System DMA Capabilities & Expanded Memory Support of DMA
\r
9176 In a multitasking operating system, when one task is waiting
\r
9177 for DMA to complete, it is useful to be able to switch to
\r
9178 another task. This specification describes a capability
\r
9179 which may be designed into expanded memory boards to provide
\r
9180 DMA into memory regions which may be mapped out while the
\r
9181 DMA is occurring. For expanded memory boards that do not
\r
9182 provide this, it is crucial to understand that while DMA is
\r
9183 in progress into a region of mappable memory, the memory
\r
9184 mapping context cannot be changed. That is, all DMA action
\r
9185 must be complete before any remapping of pages can be done.
\r
9188 Expanded Memory Support of DMA Register Sets
\r
9190 Expanded memory boards which have DMA register sets could
\r
9191 support DMA into a region of mappable memory while the
\r
9192 memory mapping context is being switched. It is important
\r
9193 to realize that these DMA register sets are separate from
\r
9194 the alternate map register sets. An example of how an OS/E
\r
9195 might use DMA register sets follows:
\r
9199 1. Allocate a DMA register set.
\r
9201 2. Get current register set.
\r
9203 3. Set the DMA register set.
\r
9211 Function 28. Alternate Map Register Set
\r
9215 4. Map in the memory desired.
\r
9217 5. Get the DMA register set.
\r
9219 6. Set the original register set.
\r
9221 7. Assign the desired DMA channel to the DMA register set.
\r
9223 The preceding set of calls makes all DMA accesses for the
\r
9224 desired DMA channel get mapped through the current DMA
\r
9225 register set regardless of the current register set. In
\r
9226 other words, the DMA register set overrides the current
\r
9227 mapping register set for DMA operations on the DMA channel
\r
9228 specified. A DMA channel that is not assigned to a DMA
\r
9229 register set has all its DMA operations mapped through the
\r
9230 current mapping register set.
\r
9270 Function 28. Alternate Map Register Set
\r
9271 Get Alternate Map Register Set subfunction
\r
9275 Note............................................................
\r
9276 This function is for use by operating systems only. The
\r
9277 operating system can disable this function at any time.
\r
9278 Refer to Function 30 for a description of how an operating
\r
9279 system can enable or disable this function.
\r
9284 The subfunction does one of two things depending on the map
\r
9285 register set which is active at the time this function is
\r
9288 1. If the preceding Set Alternate Map Register Set call was
\r
9289 done with the alternate map register set equal to zero
\r
9290 (BL = 0), these points apply:
\r
9292 a. The context save area pointer saved within EMM by
\r
9293 the Set Alternate Map Register subfunction is
\r
9294 returned by this call. This pointer is always
\r
9295 returned for boards which do not supply alternate
\r
9296 mapping register sets.
\r
9298 b. If the context save area pointer returned is not
\r
9299 equal to zero, this subfunction copies the contents
\r
9300 of the mapping registers on each expanded memory
\r
9301 board in the system into the save area specified by
\r
9302 the pointer. The format of this save area is the
\r
9303 same as that returned by Function 15 (Get Page Map
\r
9304 subfunction). This is intended to simulate getting
\r
9305 an alternate map register set. Note that the memory
\r
9306 manager does not allocate the space for the context:
\r
9307 the operating system must do so.
\r
9309 c. If the context save area pointer returned is equal
\r
9310 to zero, this subfunction does not copy the contents
\r
9311 of the mapping registers on each expanded memory
\r
9312 board in the system into the save area specified by
\r
9315 d. The context save area pointer must have been
\r
9316 initialized by a previous Set Alternate Map Register
\r
9317 Set call. Note that the value of the context save
\r
9318 area pointer saved within EMM is zero immediately
\r
9319 after installation.
\r
9329 Function 28. Alternate Map Register Set
\r
9330 Get Alternate Map Register Set subfunction
\r
9334 e. The context save area must be initialized by a
\r
9335 previous Get Page Map call (Function 15).
\r
9337 2. If the preceding Set Alternate Map Register Set call was
\r
9338 done with the alternate map register set greater than
\r
9339 zero (BL > 0), then the number of the alternate map
\r
9340 register set which is in use at the time that this
\r
9341 function is invoked is returned. The context save area
\r
9342 pointer is not returned in this case.
\r
9345 CALLING PARAMETERS
\r
9348 Contains the Get Alternate Map Register Set subfunction.
\r
9353 These results are valid only if the status returned is zero.
\r
9355 If BL <> 0, current active alternate map register set number
\r
9356 Contains the alternate map register set which was active
\r
9357 at the time that this function was invoked.
\r
9362 Indicates that a pointer to an area which contains the
\r
9363 state of all the map registers on all boards in the
\r
9364 system, and any additional information necessary to
\r
9365 restore the boards to their original state, has been
\r
9368 ES:DI = pointer to a map register context save area
\r
9369 Contains a pointer to an operating system supplied
\r
9370 context save area. The pointer is in standard seg-
\r
9371 ment:offset format. This pointer is always returned if
\r
9372 the expanded memory hardware does not supply alternate
\r
9373 mapping register sets.
\r
9388 Function 28. Alternate Map Register Set
\r
9389 Get Alternate Map Register Set subfunction
\r
9393 The operating system first passes this pointer to the
\r
9394 memory manager whenever it invokes a Set Alternate Map
\r
9395 Register Set subfunction (the description follows). If
\r
9396 the OS/E invokes this function before invoking a Set
\r
9397 Alternate Map Register Set subfunction, this function
\r
9398 returns a pointer value of zero. The OS/E must have
\r
9399 allocated the space for the save area. However, the OS
\r
9400 must request that the memory manager initialize the
\r
9401 contents of this save area before it contains any useful
\r
9404 The OS/E must initialize the save area it has allocated
\r
9405 by invoking Function 15 (Get Page Map subfunction).
\r
9406 After the OS/E has done this, the save area will contain
\r
9407 the state of all the map registers on all boards in the
\r
9408 system. The save area will also contain any additional
\r
9409 information necessary to restore the boards to their
\r
9410 original state when the operating system invokes a Set
\r
9411 Alternate Map Register Set subfunction.
\r
9414 REGISTERS MODIFIED
\r
9421 AH = 0 SUCCESSFUL.
\r
9422 The manager got the alternate map register set.
\r
9424 AH = 80h NON-RECOVERABLE.
\r
9425 The manager detected a malfunction in the memory manager
\r
9428 AH = 81h NON-RECOVERABLE.
\r
9429 The manager detected a malfunction in the expanded
\r
9432 AH = 84h NON-RECOVERABLE.
\r
9433 The function code passed to the memory manager is not
\r
9436 AH = 8Fh NON-RECOVERABLE.
\r
9437 The subfunction parameter is invalid.
\r
9447 Function 28. Alternate Map Register Set
\r
9448 Get Alternate Map Register Set subfunction
\r
9452 AH = A4h NON-RECOVERABLE.
\r
9453 The operating system denied access to this function.
\r
9454 The function cannot be used at this time.
\r
9459 alt_map_reg_set DB ?
\r
9460 context_save_area_ptr_seg DW ?
\r
9461 context_save_area_ptr_offset DW ?
\r
9463 MOV AX,5B00h ; load function code
\r
9464 INT 67h ; call the memory manager
\r
9465 OR AH,AH ; check EMM status
\r
9466 JNZ emm_err_handler ; jump to error handler
\r
9468 MOV alt_map_reg_set,BL
\r
9470 JNZ no_ptr_returned
\r
9472 MOV context_save_area_ptr_seg,ES ; save pointer values
\r
9473 MOV context_save_area_ptr_offset,DI
\r
9506 Function 28. Alternate Map Register Set
\r
9507 Set Alternate Map Register Set subfunction
\r
9511 Note............................................................
\r
9512 This function is for use by operating systems only. The
\r
9513 operating system can disable this function at any time.
\r
9514 Refer to Function 30 for a description of how an operating
\r
9515 system can enable or disable this function.
\r
9520 The subfunction does one of two things, depending on the map
\r
9521 register set specified:
\r
9523 1. If the alternate map register set specified is zero, map
\r
9524 register set zero is activated. If the map register
\r
9525 context restore area pointer is not equal to zero, the
\r
9526 contents of the restore area pointed to by ES:DI are
\r
9527 copied into register set zero on each expanded memory
\r
9528 board in the system. If the pointer is equal to zero,
\r
9529 the contents are not copied.
\r
9531 Regardless of its value, the map register context
\r
9532 restore area pointer is saved within the memory manager.
\r
9533 It will be used during the Get Alternate Map Register
\r
9536 The operating system must supply the pointer to the
\r
9537 area. This subfunction is intended to simulate setting
\r
9538 an alternate map register set. Note that the operating
\r
9539 system must allocate the space for the context. The
\r
9540 memory manager saves the context save area pointer
\r
9543 2. If the alternate map register set specified is not zero,
\r
9544 the alternate map register set specified is activated.
\r
9545 The restore area, which the operating system is pointing
\r
9549 CALLING PARAMETERS
\r
9552 Contains the Set Alternate Map Register Set subfunction.
\r
9565 Function 28. Alternate Map Register Set
\r
9566 Set Alternate Map Register Set subfunction
\r
9570 BL = new alternate map register set number
\r
9571 Contains the number of the alternate map register set
\r
9572 which is to be activated.
\r
9575 A pointer to a map register context restore area is
\r
9576 not required and the contents of ES:DI is unaffected
\r
9577 and ignored. The alternate map register set
\r
9578 specified in BL is activated if the board supports
\r
9582 A pointer to an area which contains the state of all
\r
9583 the map registers on all boards in the system, and
\r
9584 any additional information necessary to restore the
\r
9585 boards to their original state, has been passed in
\r
9588 ES:DI = pointer to a map register context restore area
\r
9589 Contains a pointer to an OS/E supplied map register
\r
9590 context restore area. The pointer is in standard
\r
9591 segment:offset format. This pointer must always be
\r
9592 passed if the expanded memory hardware does not supply
\r
9593 alternate mapping register sets.
\r
9595 The memory manager must save this pointer whenever the
\r
9596 OS/E invokes this function. The OS/E must have allo-
\r
9597 cated the space for the restore area. Additionally, the
\r
9598 contents of this restore area must have been initialized
\r
9599 by the memory manager before it will contain any useful
\r
9600 information. The OS/E initializes the restore area it
\r
9601 has allocated by invoking Function 15 (Get Page Map
\r
9602 subfunction). After the OS/E has done this, the restore
\r
9603 area will contain the state of the map registers on all
\r
9604 boards in the system, and any additional information
\r
9605 necessary to restore the boards to their original state
\r
9606 when the operating system invokes a Set Alternate Map
\r
9607 Register Set subfunction.
\r
9610 REGISTERS MODIFIED
\r
9624 Function 28. Alternate Map Register Set
\r
9625 Set Alternate Map Register Set subfunction
\r
9631 AH = 0 SUCCESSFUL.
\r
9632 The manager set the alternate map register set.
\r
9634 AH = 80h NON-RECOVERABLE.
\r
9635 The manager detected a malfunction in the memory manager
\r
9638 AH = 81h NON-RECOVERABLE.
\r
9639 The manager detected a malfunction in the expanded
\r
9642 AH = 84h NON-RECOVERABLE.
\r
9643 The function code passed to the memory manager is not
\r
9646 AH = 8Fh NON-RECOVERABLE.
\r
9647 The subfunction parameter is invalid.
\r
9649 AH = 9Ah NON-RECOVERABLE.
\r
9650 Alternate map register sets are supported, but the
\r
9651 alternate map register set specified is not supported.
\r
9653 AH = 9Ch NON-RECOVERABLE.
\r
9654 Alternate map register sets are not supported, and the
\r
9655 alternate map register set specified is not zero.
\r
9657 AH = 9Dh NON-RECOVERABLE.
\r
9658 Alternate map register sets are supported, but the
\r
9659 alternate map register set specified is either not
\r
9660 defined or not allocated.
\r
9662 AH = A3h NON-RECOVERABLE.
\r
9663 The contents of the source array have been corrupted, or
\r
9664 the pointer passed to the subfunction is invalid.
\r
9666 AH = A4h NON-RECOVERABLE.
\r
9667 The operating system has denied access to this function.
\r
9668 The function cannot be used at this time.
\r
9683 Function 28. Alternate Map Register Set
\r
9684 Set Alternate Map Register Set subfunction
\r
9690 alt_map_reg_set DB ?
\r
9691 context_restore_area_ptr_seg DW ?
\r
9692 context_restore_area_ptr_offset DW ?
\r
9694 MOV AX,5B01h ; load function code
\r
9695 MOV BL,alt_map_reg_set
\r
9699 MOV ES,context_restore_area_ptr_seg
\r
9700 MOV DI,context_restore_area_ptr_offset
\r
9704 INT 67h ; call the memory manger
\r
9705 OR AH,AH ; check EMM status
\r
9706 JNZ emm_err_handler ; jump to error handler
\r
9742 Function 28. Alternate Map Register Set
\r
9743 Get Alternate Map Save Array Size subfunction
\r
9747 Note............................................................
\r
9748 This function is for use by operating systems only. The
\r
9749 operating system can disable this function at any time.
\r
9750 Refer to Function 30 for a description of how an operating
\r
9751 system can enable or disable this function.
\r
9756 This subfunction returns the storage requirements for the
\r
9757 map register context save area referenced by the other
\r
9761 CALLING PARAMETERS
\r
9764 Contains the Get Alternate Map Save Array Size subfunc-
\r
9770 These results are valid only if the status returned is zero.
\r
9772 DX = size_of_array
\r
9773 Contains the number of bytes that will be transferred to
\r
9774 the memory area supplied by an operating system whenever
\r
9775 an operating system requests the Get, Set, or Get and
\r
9779 REGISTERS MODIFIED
\r
9786 AH = 0 SUCCESSFUL.
\r
9787 The manager has returned the array size.
\r
9789 AH = 80h NON-RECOVERABLE.
\r
9790 The manager detected a malfunction in the memory manager
\r
9801 Function 28. Alternate Map Register Set
\r
9802 Get Alternate Map Save Array Size subfunction
\r
9806 AH = 81h NON-RECOVERABLE.
\r
9807 The manager detected a malfunction in the expanded
\r
9810 AH = 84h NON-RECOVERABLE.
\r
9811 The function code passed to the memory manager is not
\r
9814 AH = 8Fh NON-RECOVERABLE.
\r
9815 The subfunction parameter is invalid.
\r
9817 AH = A4h NON-RECOVERABLE.
\r
9818 The operating system has denied access to this function.
\r
9819 The function cannot be used at this time.
\r
9824 size_of_array DW ?
\r
9826 MOV AX,5B02h ; load function code
\r
9827 INT 67h ; call the memory manager
\r
9828 OR AH,AH ; check EMM status
\r
9829 JNZ emm_err_handler ; jump to error handler on error
\r
9830 MOV size_of_array,DX ; save size of array
\r
9860 Function 28. Alternate Map Register Set
\r
9861 Allocate Alternate Map Register Set subfunction
\r
9865 Note............................................................
\r
9866 This function is for use by operating systems only. The
\r
9867 operating system can disable this function at any time.
\r
9868 Refer to Function 30 for a description of how an operating
\r
9869 system can enable or disable this function.
\r
9874 The Allocate Alternate Map Register Set subfunction gets the
\r
9875 number of an alternate map register set for an operating
\r
9876 system if an alternate map register set is currently
\r
9877 available for use. If the hardware does not support
\r
9878 alternate map register sets, an alternate map register set
\r
9879 number of zero will be returned.
\r
9881 The alternate map register set allocated may be referred to
\r
9882 by this number when using the Get or Set Alternate Map
\r
9883 Register Set subfunctions. The operating system can use
\r
9884 these subfunctions to switch map contexts very rapidly on
\r
9885 expanded memory boards with alternate map register sets.
\r
9887 This subfunction copies the currently active alternate map
\r
9888 register set's contents into the newly allocated alternate
\r
9889 map register set's mapping registers. This is done so that
\r
9890 when the OS/E performs a Set Alternate Map Register Set
\r
9891 subfunction the memory mapped before the allocation of the
\r
9892 new alternate map will be available for reading and writing.
\r
9893 This function does not actually change the alternate map
\r
9894 register set in use, but in addition to allocating a new
\r
9895 alternate map register set, it prepares the new alternate
\r
9896 map register set for a subsequent Set Alternate Map Register
\r
9900 CALLING PARAMETERS
\r
9903 Contains the Allocate Alternate Map Register Set
\r
9919 Function 28. Alternate Map Register Set
\r
9920 Allocate Alternate Map Register Set subfunction
\r
9926 These results are valid only if the status returned is zero.
\r
9928 BL = alternate map register set number
\r
9929 Contains the number of an alternate map register set.
\r
9930 If there are no alternate map register sets supported by
\r
9931 the hardware, a zero will be returned. In this case,
\r
9932 the Get Alternate Map function (Function 28) should be
\r
9933 invoked in order to obtain a pointer to a map register
\r
9934 context save area. The OS/E must supply this area. The
\r
9935 save area is necessary because the hardware doesn't
\r
9936 support alternate map register sets.
\r
9939 REGISTERS MODIFIED
\r
9946 AH = 0 SUCCESSFUL.
\r
9947 The manager has returned the alternate map register set
\r
9950 AH = 80h NON-RECOVERABLE.
\r
9951 The manager detected a malfunction in the memory manager
\r
9954 AH = 81h NON-RECOVERABLE.
\r
9955 The manager detected a malfunction in the expanded
\r
9958 AH = 84h NON-RECOVERABLE.
\r
9959 The function code passed to the memory manager is not
\r
9962 AH = 8Fh NON-RECOVERABLE.
\r
9963 The subfunction parameter is invalid.
\r
9965 AH = 9Bh NON-RECOVERABLE.
\r
9966 Alternate map register sets are supported. However, all
\r
9967 alternate map register sets are currently allocated.
\r
9978 Function 28. Alternate Map Register Set
\r
9979 Allocate Alternate Map Register Set subfunction
\r
9983 AH = A4h NON-RECOVERABLE.
\r
9984 The operating system has denied access to this function.
\r
9985 The function cannot be used at this time.
\r
9990 alt_map_reg_num DB ?
\r
9992 MOV AX,5B03h ; load function code
\r
9993 INT 67h ; call the memory manager
\r
9994 OR AH,AH ; check EMM status
\r
9995 JNZ emm_err_handler ; jump to error handler on error
\r
9996 MOV alt_map_reg_num,BL ; save number of
\r
9997 ; alternate map register set
\r
10031 EMM Functions 165
\r
10037 Function 28. Alternate Map Register Set
\r
10038 Deallocate Alternate Map Register Set subfunction
\r
10042 Note............................................................
\r
10043 This function is for use by operating systems only. The
\r
10044 operating system can disable this function at any time.
\r
10045 Refer to Function 30 for a description of how an operating
\r
10046 system can enable or disable this function.
\r
10051 The Deallocate Alternate Map Register Set subfunction
\r
10052 returns the alternate map register set to the memory manager
\r
10053 for future use. The memory manager may reallocate the
\r
10054 alternate map register set when needed.
\r
10056 This subfunction also makes the mapping context of the
\r
10057 alternate map register specified unavailable for reading or
\r
10058 writing (unmapping). This protects the pages previously
\r
10059 mapped in an alternate map register set by making them
\r
10060 inaccessible. Note that the current alternate map register
\r
10061 set cannot be deallocated. This makes all memory which was
\r
10062 currently mapped into conventional and expanded memory
\r
10066 CALLING PARAMETERS
\r
10069 Contains the Deallocate Alternate Map Register Set
\r
10072 BL = alternate register set number
\r
10073 Contains the number of the alternate map register set to
\r
10074 deallocate. Map register set zero cannot be allocated
\r
10075 or deallocated. However, if alternate map register set
\r
10076 zero is specified and this subfunction is invoked, no
\r
10077 error will be returned. The function invocation is
\r
10078 ignored in this case.
\r
10081 REGISTERS MODIFIED
\r
10090 EMM Functions 166
\r
10096 Function 28. Alternate Map Register Set
\r
10097 Deallocate Alternate Map Register Set subfunction
\r
10103 AH = 0 SUCCESSFUL.
\r
10104 The manager has deallocated the alternate map register
\r
10107 AH = 80h NON-RECOVERABLE.
\r
10108 The manager detected a malfunction in the memory manager
\r
10111 AH = 81h NON-RECOVERABLE.
\r
10112 The manager detected a malfunction in the expanded
\r
10115 AH = 84h NON-RECOVERABLE.
\r
10116 The function code passed to the memory manager is not
\r
10119 AH = 8Fh NON-RECOVERABLE.
\r
10120 The subfunction parameter is invalid.
\r
10122 AH = 9Ch NON-RECOVERABLE.
\r
10123 Alternate map register sets are not supported and the
\r
10124 alternate map register set specified is not zero.
\r
10126 AH = 9Dh NON-RECOVERABLE.
\r
10127 Alternate map register sets are supported, but the
\r
10128 alternate map register set specified is either not
\r
10129 defined or not allocated.
\r
10131 AH = A4h NON-RECOVERABLE.
\r
10132 The operating system has denied access to this function.
\r
10133 The function cannot be used at this time.
\r
10138 alternate_map_reg_set DB ?
\r
10140 MOV BL,alternate_map_reg_set ; specify alternate map
\r
10142 MOV AX,5B04h ; load function code
\r
10143 INT 67h ; call the memory manager
\r
10144 OR AH,AH ; check EMM status
\r
10145 JNZ emm_err_handler ; jump to error handler
\r
10149 EMM Functions 167
\r
10155 Function 28. Alternate Map Register Set
\r
10156 Allocate DMA Register Set subfunction
\r
10160 Note............................................................
\r
10161 This function is for use by operating systems only. The
\r
10162 operating system can disable this function at any time.
\r
10163 Refer to Function 30 for a description of how an operating
\r
10164 system can enable or disable this function.
\r
10169 The Allocate DMA Register Set subfunction gets the number of
\r
10170 a DMA register set for an OS/E, if a DMA register set is
\r
10171 currently available for use. If the hardware does not
\r
10172 support DMA register sets, a DMA register set number of zero
\r
10173 will be returned.
\r
10175 In a multitasking operating system, when one task is waiting
\r
10176 for DMA to complete, it is useful to be able to switch to
\r
10177 another task. However, if the DMA is being mapped through
\r
10178 the current register set, the switching cannot occur. That
\r
10179 is, all DMA action must be complete before any remapping of
\r
10180 pages can be done.
\r
10182 The operating system would initiate a DMA operation on a
\r
10183 specific DMA channel using a specific alternate map register
\r
10184 set. This alternate map register set would not be used
\r
10185 again, by the operating system or an application, until
\r
10186 after the DMA operation is complete. The operating system
\r
10187 guarantees this by not changing the contents of the alter-
\r
10188 nate map register set, or allowing an application to change
\r
10189 the contents of the alternate map register set, for the
\r
10190 duration of the DMA operation.
\r
10193 CALLING PARAMETERS
\r
10196 Contains the Allocate DMA Register Set subfunction.
\r
10201 These results are valid only if the status returned is zero.
\r
10203 BL = DMA register set number
\r
10204 Contains the number of a DMA register set. If there are
\r
10205 no DMA register sets supported by the hardware, a zero
\r
10206 will be returned.
\r
10208 EMM Functions 168
\r
10214 Function 28. Alternate Map Register Set
\r
10215 Allocate DMA Register Set subfunction
\r
10219 REGISTERS MODIFIED
\r
10226 AH = 0 SUCCESSFUL.
\r
10227 The manager has allocated the DMA register set.
\r
10229 AH = 80h NON-RECOVERABLE.
\r
10230 The manager detected a malfunction in the memory manager
\r
10233 AH = 81h NON-RECOVERABLE.
\r
10234 The manager detected a malfunction in the expanded
\r
10237 AH = 84h NON-RECOVERABLE.
\r
10238 The function code passed to the memory manager is not
\r
10241 AH = 8Fh NON-RECOVERABLE.
\r
10242 The subfunction parameter is invalid.
\r
10244 AH = 9Bh NON-RECOVERABLE.
\r
10245 DMA register sets are supported. However, all DMA
\r
10246 register sets are currently allocated.
\r
10248 AH = A4h NON-RECOVERABLE.
\r
10249 Access to this function has been denied by the operating
\r
10250 system. The function cannot be used at this time.
\r
10255 DMA_reg_set_number DB ?
\r
10257 MOV AX,5B05h ; load function code
\r
10258 INT 67h ; call memory manager
\r
10259 OR AH,AH ; check EMM status
\r
10260 JNZ emm_err_handler ; jump to error handler
\r
10262 MOV DMA_reg_set_number,BL ; save number of DMA
\r
10267 EMM Functions 169
\r
10273 Function 28. Alternate Map Register Set
\r
10274 Enable DMA on Alternate Map Register Set subfunction
\r
10278 Note............................................................
\r
10279 This function is for use by operating systems only. The
\r
10280 operating system can disable this function at any time.
\r
10281 Refer to Function 30 for a description of how an operating
\r
10282 system can enable or disable this function.
\r
10287 This subfunction allows DMA accesses on a specific DMA
\r
10288 channel to be associated with a specific alternate map
\r
10289 register set. In a multitasking operating system, when a
\r
10290 task is waiting for the completion of DMA, it is useful to
\r
10291 be able to switch to another task until the DMA operation
\r
10294 Any DMA on the specified channel will go through the speci-
\r
10295 fied DMA register set regardless of the current register
\r
10296 set. If a DMA channel is not assigned to a DMA register
\r
10297 set, DMA for that channel will be mapped through the current
\r
10301 CALLING PARAMETERS
\r
10304 Contains the Enable DMA on Alternate Map Register Set
\r
10307 BL = DMA register set number
\r
10308 Contains the number of the alternate map register set to
\r
10309 be used for DMA operations on the DMA channel specified
\r
10310 by DL. If the alternate map register set specified is
\r
10311 zero, no special action will be taken on DMA accesses
\r
10312 for the DMA channel specified.
\r
10314 DL = DMA channel number
\r
10315 Contains the DMA channel which is to be associated with
\r
10316 the DMA map register set specified in BL.
\r
10319 REGISTERS MODIFIED
\r
10326 EMM Functions 170
\r
10332 Function 28. Alternate Map Register Set
\r
10333 Enable DMA on Alternate Map Register Set subfunction
\r
10339 AH = 0 SUCCESSFUL.
\r
10340 The manager has enabled DMA on the DMA register set and
\r
10341 the DMA channel specified.
\r
10343 AH = 80h NON-RECOVERABLE.
\r
10344 The manager detected a malfunction in the memory manager
\r
10347 AH = 81h NON-RECOVERABLE.
\r
10348 The manager detected a malfunction in the expanded
\r
10351 AH = 84h NON-RECOVERABLE.
\r
10352 The function code passed to the memory manager is not
\r
10355 AH = 8Fh NON-RECOVERABLE.
\r
10356 The subfunction parameter is invalid.
\r
10358 AH = 9Ah NON-RECOVERABLE.
\r
10359 Alternate DMA register sets are supported, but the
\r
10360 alternate DMA register set specified is not supported.
\r
10362 AH = 9Ch NON-RECOVERABLE.
\r
10363 Alternate DMA register sets are not supported, and the
\r
10364 DMA register set specified is not zero.
\r
10366 AH = 9Dh NON-RECOVERABLE.
\r
10367 DMA register sets are supported, but the DMA register
\r
10368 set specified is either not defined or not allocated.
\r
10370 AH = 9Eh NON-RECOVERABLE.
\r
10371 Dedicated DMA channels are not supported.
\r
10373 AH = 9Fh NON-RECOVERABLE.
\r
10374 Dedicated DMA channels are supported, but the DMA
\r
10375 channel specified is not supported.
\r
10377 AH = A4h NON-RECOVERABLE.
\r
10378 The operating system has denied access to this function.
\r
10379 The function cannot be used at this time.
\r
10385 EMM Functions 171
\r
10391 Function 28. Alternate Map Register Set
\r
10392 Enable DMA on Alternate Map Register Set subfunction
\r
10398 alt_map_reg_set DB ?
\r
10399 DMA_channel_num DB ?
\r
10401 MOV BL,alt_map_reg_set
\r
10402 MOV DL,DMA_channel_num
\r
10403 MOV AX,5B06h ; load function code
\r
10404 INT 67h ; call the memory manager
\r
10405 OR AH,AH ; check EMM status
\r
10406 JNZ emm_err_handler ; jump to error handler on error
\r
10444 EMM Functions 172
\r
10450 Function 28. Alternate Map Register Set
\r
10451 Disable DMA on Alternate Map Register Set subfunction
\r
10455 Note............................................................
\r
10456 This function is for use by operating systems only. The
\r
10457 operating system can disable this function at any time.
\r
10458 Refer to Function 30 for a description of how an operating
\r
10459 system can enable or disable this function.
\r
10464 This subfunction disables DMA accesses for all DMA channels
\r
10465 which were associated with a specific alternate map register
\r
10469 CALLING PARAMETERS
\r
10472 Contains the Disable DMA on Alternate Map Register Set
\r
10475 BL = alternate register set number
\r
10476 Contains the number of the DMA register set for which
\r
10477 all operations are to be disabled. If the alternate map
\r
10478 register set specified is zero, no action will be taken.
\r
10481 REGISTERS MODIFIED
\r
10488 AH = 0 SUCCESSFUL.
\r
10489 The manager has disabled DMA operations on the alternate
\r
10490 DMA register set.
\r
10492 AH = 80h NON-RECOVERABLE.
\r
10493 The manager detected a malfunction in the memory manager
\r
10496 AH = 81h NON-RECOVERABLE.
\r
10497 The manager detected a malfunction in the expanded
\r
10503 EMM Functions 173
\r
10509 Function 28. Alternate Map Register Set
\r
10510 Disable DMA on Alternate Map Register Set subfunction
\r
10514 AH = 84h NON-RECOVERABLE.
\r
10515 The function code passed to the memory manager is not
\r
10518 AH = 8Fh NON-RECOVERABLE.
\r
10519 The subfunction parameter is invalid.
\r
10521 AH = 9Ah NON-RECOVERABLE.
\r
10522 Alternate DMA register sets are supported, but the
\r
10523 alternate DMA register set specified is not supported.
\r
10525 AH = 9Ch NON-RECOVERABLE.
\r
10526 Alternate DMA register sets are not supported, and the
\r
10527 DMA register set specified is not zero.
\r
10529 AH = 9Dh NON-RECOVERABLE.
\r
10530 DMA register sets are supported, but the DMA register
\r
10531 set specified is either not defined or not allocated.
\r
10533 AH = 9Eh NON-RECOVERABLE.
\r
10534 Dedicated DMA channels are not supported.
\r
10536 AH = 9Fh NON-RECOVERABLE.
\r
10537 Dedicated DMA channels are supported, but the DMA
\r
10538 channel specified is not supported.
\r
10540 AH = A4h NON-RECOVERABLE.
\r
10541 The operating system has denied access to this function.
\r
10542 The function cannot be used at this time.
\r
10549 MOV BL,DMA_reg_set
\r
10550 MOV AX,5B07h ; load function code
\r
10551 INT 67h ; call the memory manager
\r
10552 OR AH,AH ; check EMM status
\r
10553 JNZ emm_err_handler ; jump to error handler on error
\r
10562 EMM Functions 174
\r
10568 Function 28. Alternate Map Register Set
\r
10569 Deallocate DMA Register Set subfunction
\r
10573 Note............................................................
\r
10574 This function is for use by operating systems only. The
\r
10575 operating system can disable this function at any time.
\r
10576 Refer to Function 30 for a description of how an operating
\r
10577 system can enable or disable this function.
\r
10582 The Deallocate DMA Register Set subfunction deallocates the
\r
10583 specified DMA register set.
\r
10586 CALLING PARAMETERS
\r
10589 Contains the Deallocate DMA Register Set subfunction.
\r
10591 BL = DMA register set number
\r
10592 Contains the number of the DMA register set which should
\r
10593 not be used for DMA operations any longer. The DMA
\r
10594 register set would have been previously allocated and
\r
10595 enabled for DMA operations on a specific DMA channel.
\r
10596 If the DMA register set specified is zero, no action
\r
10600 REGISTERS MODIFIED
\r
10607 AH = 0 SUCCESSFUL.
\r
10608 The manager has deallocated the DMA register set.
\r
10610 AH = 80h NON-RECOVERABLE.
\r
10611 The manager detected a malfunction in the memory manager
\r
10614 AH = 81h NON-RECOVERABLE.
\r
10615 The manager detected a malfunction in the expanded
\r
10621 EMM Functions 175
\r
10627 Function 28. Alternate Map Register Set
\r
10628 Deallocate DMA on Alternate Map Register Set subfunction
\r
10632 AH = 84h NON-RECOVERABLE.
\r
10633 The function code passed to the memory manager is not
\r
10636 AH = 8Fh NON-RECOVERABLE.
\r
10637 The subfunction parameter is invalid.
\r
10639 AH = 9Ch NON-RECOVERABLE.
\r
10640 DMA register sets are not supported, and the DMA
\r
10641 register set specified is not zero.
\r
10643 AH = 9Dh NON-RECOVERABLE.
\r
10644 DMA register sets are supported, but the DMA register
\r
10645 set specified is either not defined or not allocated.
\r
10647 AH = A4h NON-RECOVERABLE.
\r
10648 The operating system has denied access to this function.
\r
10649 The function cannot be used at this time.
\r
10654 DMA_reg_set_num DB ?
\r
10656 MOV BL,DMA_reg_set_num
\r
10657 MOV AX,5B08h ; load function code
\r
10658 INT 67h ; call the memory manager
\r
10659 OR AH,AH ; check EMM status
\r
10660 JNZ emm_err_handler ; jump to error handler on error
\r
10680 EMM Functions 176
\r
10686 Function 29. Prepare Expanded Memory Hardware For Warm Boot
\r
10692 This function prepares the expanded memory hardware for an
\r
10693 impending warm boot. This function assumes that the next
\r
10694 operation that the operating system performs is a warm boot
\r
10695 of the system. In general, this function will effect the
\r
10696 current mapping context, the alternate register set in use,
\r
10697 and any other expanded memory hardware dependencies which
\r
10698 need to be initialized at boot time. If an application
\r
10699 decides to map memory below 640K, the application must trap
\r
10700 all possible conditions leading to a warm boot and invoke
\r
10701 this function before performing the warm boot itself.
\r
10704 CALLING PARAMETERS
\r
10707 Contains the Prepare Expanded Memory Hardware for Warm
\r
10711 REGISTERS MODIFIED
\r
10718 AH = 0 SUCCESSFUL.
\r
10719 The manager has prepared the expanded memory hardware
\r
10722 AH = 80h NON-RECOVERABLE.
\r
10723 The manager detected a malfunction in the memory manager
\r
10726 AH = 81h NON-RECOVERABLE.
\r
10727 The manager detected a malfunction in the expanded
\r
10730 AH = 84h NON-RECOVERABLE.
\r
10731 The function code passed to the memory manager is not
\r
10739 EMM Functions 177
\r
10745 Function 29. Prepare Expanded Memory Hardware for Warm Boot
\r
10751 MOV AH,5Ch ; load function code
\r
10752 INT 67h ; call the memory manager
\r
10753 OR AH,AH ; check EMM status
\r
10754 JNZ emm_err_handler ; jump to error handler on error
\r
10798 EMM Functions 178
\r
10804 Function 30. Enable/Disable OS/E Function Set Functions
\r
10805 Enable OS/E Function Set subfunction
\r
10809 Note............................................................
\r
10810 This function is for use by operating systems only. The
\r
10811 operating system can disable this function at any time.
\r
10816 This subfunction provides an OS/E with the ability to enable
\r
10817 all programs or device drivers to use the OS/E specific
\r
10818 functions. The capability is provided only for an OS/E
\r
10819 which manages regions of mappable conventional memory and
\r
10820 cannot permit programs to use any of the functions which
\r
10821 affect mappable conventional memory regions, but must be
\r
10822 able to use these functions itself. When an OS/E disables
\r
10823 these functions and a program attempts to use them, the
\r
10824 memory manager returns a status to the program indicating
\r
10825 that the OS/E has denied the program access to the function.
\r
10826 In other words, the functions will not work when disabled.
\r
10827 However, all programs may use them when enabled.
\r
10829 The OS/E (Operating System/Environment) functions this
\r
10830 subfunction enables are:
\r
10832 Function 26. Get Expanded Memory Hardware Information.
\r
10833 Function 28. Alternate Map Register Sets.
\r
10834 Function 30. Enable/Disable Operating System Functions.
\r
10836 It appears contradictory that the OS/E can re-enable these
\r
10837 functions when the function which re-enables them is itself
\r
10838 disabled. An overview of the process follows.
\r
10840 The memory manager enables all the OS/E specific functions,
\r
10841 including this one, when it is loaded. The OS/E gets
\r
10842 exclusive access to these functions by invoking either of
\r
10843 the Enable/Disable OS/E Function Set subfunctions before any
\r
10844 other software does.
\r
10846 On the first invocation of either of these subfunctions, the
\r
10847 memory manager returns an access_key which the OS/E must use
\r
10848 in all future invocations of either of these subfunctions.
\r
10849 The memory manager does not require the access_key on the
\r
10850 first invocation of the Enable/Disable OS/E Function Set
\r
10857 EMM Functions 179
\r
10863 Function 30. Enable/Disable OS/E Function Set Functions
\r
10864 Enable OS/E Function Set subfunction
\r
10868 On all subsequent invocations, the access_key is required
\r
10869 for either the Enable or Disable OS/E Function Set subfunc-
\r
10870 tions. Since the access_key is returned only on the first
\r
10871 invocation of the Enable/Disable OS/E Function Set subfunc-
\r
10872 tions, and presumably the OS/E is the first software to
\r
10873 invoke this function, only the OS/E obtains a copy of this
\r
10874 key. The memory manager must return an access key with a
\r
10875 random value, a fixed value key defeats the purpose of
\r
10876 providing this level of security for an OS/E.
\r
10879 CALLING PARAMETERS
\r
10882 Contains the Enable OS/E Function Set subfunction.
\r
10884 BX,CX = access_key
\r
10885 Required on all function invocations after the first.
\r
10886 The access_key value returned by the first function
\r
10887 invocation is required.
\r
10892 These results are valid only if the status returned is zero.
\r
10894 BX,CX = access_key
\r
10895 Returned only on the first function invocation, the
\r
10896 memory manager returns a random valued key which will be
\r
10897 required thereafter for the execution of this function.
\r
10898 On all invocations after the first, this key is not
\r
10899 returned. Neither BX nor CX is affected after the first
\r
10900 time this function is invoked.
\r
10903 REGISTERS MODIFIED
\r
10910 AH = 0 SUCCESSFUL.
\r
10911 The operating system function set has been enabled.
\r
10916 EMM Functions 180
\r
10922 Function 30. Enable/Disable OS/E Function Set Functions
\r
10923 Enable OS/E Function Set subfunction
\r
10927 AH = 80h NON-RECOVERABLE.
\r
10928 The manager detected a malfunction in the memory manager
\r
10931 AH = 81h NON-RECOVERABLE.
\r
10932 The manager detected a malfunction in the expanded
\r
10935 AH = 84h NON-RECOVERABLE.
\r
10936 The function code passed to the memory manager is not
\r
10939 AH = 8Fh NON-RECOVERABLE.
\r
10940 The subfunction parameter is invalid.
\r
10942 AH = A4h NON-RECOVERABLE.
\r
10943 The operating system has denied access to this function.
\r
10944 The function cannot be used at this time. The value of
\r
10945 the key which was passed to this function does not
\r
10946 entitle the program to execute this function.
\r
10953 access_key DW 2 DUP (?)
\r
10955 MOV AX,5D00h ; load function code
\r
10956 INT 67h ; call the memory manager
\r
10957 OR AH,AH ; check EMM status
\r
10958 JNZ emm_err_handler ; jump to error handler on error
\r
10959 MOV access_key[0],BX
\r
10960 MOV access_key[2],CX
\r
10963 All invocations after the first
\r
10965 access_key DW 2 DUP (?)
\r
10967 MOV BX,access_key[0]
\r
10968 MOV CX,access_key[2]
\r
10969 MOV AX,5D00h ; load function code
\r
10970 INT 67h ; call the memory manager
\r
10971 OR AH,AH ; check EMM status
\r
10972 JNZ emm_err_handler ; jump to error handler on error
\r
10975 EMM Functions 181
\r
10981 Function 30. Enable/Disable OS/E Function Set Functions
\r
10982 Disable OS/E Function Set subfunction
\r
10986 Note............................................................
\r
10987 This function is for use by operating systems only. The
\r
10988 operating system can disable this function at any time.
\r
10993 This subfunction provides an OS/E with the ability to
\r
10994 disable all programs or device drivers from using the OS/E
\r
10995 specific functions. The capability is provided only for an
\r
10996 OS/E which manages regions of mappable conventional memory
\r
10997 and cannot permit programs to use any of the functions which
\r
10998 would affect mappable conventional memory regions. When an
\r
10999 OS/E disables these functions and a program attempts to use
\r
11000 them, the memory manager returns a status to the program
\r
11001 indicating that the OS/E has denied the program access to
\r
11002 the function. In other words, the functions will not work
\r
11005 The OS/E (Operating System) functions which are disabled by
\r
11006 this subfunction are:
\r
11008 Function 26. Get Expanded Memory Hardware Information.
\r
11009 Function 28. Alternate Map Register Sets.
\r
11010 Function 30. Enable/Disable Operating System Functions.
\r
11013 CALLING PARAMETERS
\r
11016 Contains the Disable OS/E Function Set subfunction.
\r
11018 BX,CX = access_key
\r
11019 Required on all function invocations after the first.
\r
11020 The access_key value returned by the first function
\r
11021 invocation is required.
\r
11034 EMM Functions 182
\r
11040 Function 30. Enable/Disable OS/E Function Set Functions
\r
11041 Disable OS/E Function Set subfunction
\r
11047 These results are valid only if the status returned is zero.
\r
11049 BX,CX = access_key
\r
11050 Returned only on the first function invocation, the
\r
11051 memory manager returns a random valued key which will be
\r
11052 required thereafter for the execution of this function.
\r
11053 On all invocations after the first, this key is not
\r
11054 returned. Neither BX nor CX is affected after the first
\r
11055 time this function is invoked.
\r
11058 REGISTERS MODIFIED
\r
11065 AH = 0 SUCCESSFUL.
\r
11066 The operating system function set has been disabled.
\r
11068 AH = 80h NON-RECOVERABLE.
\r
11069 The manager detected a malfunction in the memory manager
\r
11072 AH = 81h NON-RECOVERABLE.
\r
11073 The manager detected a malfunction in the expanded
\r
11076 AH = 84h NON-RECOVERABLE.
\r
11077 The function code passed to the memory manager is not
\r
11080 AH = 8Fh NON-RECOVERABLE.
\r
11081 The subfunction parameter is invalid.
\r
11083 AH = A4h NON-RECOVERABLE.
\r
11084 The operating system has denied access to this function.
\r
11085 The function cannot be used at this time. The value of
\r
11086 the key which was passed to this function does not
\r
11087 entitle the program to execute this function.
\r
11093 EMM Functions 183
\r
11099 Function 30. Enable/Disable OS/E Function Set Functions
\r
11100 Disable OS/E Function Set subfunction
\r
11106 First Function invocation
\r
11108 access_key DW 2 DUP (?)
\r
11110 MOV AX,5D01h ; load function code
\r
11111 INT 67h ; call the memory manager
\r
11112 OR AH,AH ; check EMM status
\r
11113 JNZ emm_err_handler ; jump to error handler on error
\r
11114 MOV access_key[0],BX
\r
11115 MOV access_key[2],CX
\r
11118 All invocations after the first
\r
11120 access_key DW 2 DUP (?)
\r
11122 MOV BX,access_key[0]
\r
11123 MOV CX,access_key[2]
\r
11124 MOV AX,5D01h ; load function code
\r
11125 INT 67h ; call the memory manager
\r
11126 OR AH,AH ; check EMM status
\r
11127 JNZ emm_err_handler ; jump to error handler on error
\r
11152 EMM Functions 184
\r
11158 Function 30. Enable/Disable OS/E Function Set Functions
\r
11159 Return Access Key subfunction
\r
11163 Note............................................................
\r
11164 This function is for use by operating systems only. The
\r
11165 operating system can disable this function at any time.
\r
11170 This subfunction provides an OS/E with the ability to return
\r
11171 the access key to the memory manager. Returning the access
\r
11172 key to the memory manager places the memory manager in the
\r
11173 state it is in at installation time (regarding the use of
\r
11174 the OS/E function set and the access key). That is, access
\r
11175 to the OS/E function set is enabled. Upon execution of the
\r
11176 next enable/disable OS/E function set subfunction, the
\r
11177 access key will once again be returned.
\r
11180 CALLING PARAMETERS
\r
11183 Contains the Return Access Key subfunction.
\r
11185 BX,CX = access_key
\r
11186 Required on all function invocations. The access_key
\r
11187 value returned by the first function invocation of the
\r
11188 enable or disable subfunctions is required.
\r
11191 REGISTERS MODIFIED
\r
11198 AH = 0 SUCCESSFUL.
\r
11199 The access key has been returned to the memory manager.
\r
11201 AH = 80h NON-RECOVERABLE.
\r
11202 The manager detected a malfunction in the memory manager
\r
11205 AH = 81h NON-RECOVERABLE.
\r
11206 The manager detected a malfunction in the expanded
\r
11211 EMM Functions 185
\r
11217 Function 30. Enable/Disable OS/E Function Set Functions
\r
11218 Return Access Key subfunction
\r
11222 AH = 84h NON-RECOVERABLE.
\r
11223 The function code passed to the memory manager is not
\r
11226 AH = 8Fh NON-RECOVERABLE.
\r
11227 The subfunction parameter is invalid.
\r
11229 AH = A4h NON-RECOVERABLE.
\r
11230 The operating system has denied access to this function.
\r
11231 The function cannot be used at this time. The value of
\r
11232 the key which was passed to this function does not
\r
11233 entitle the program to execute this function.
\r
11238 access_key DW 2 DUP (?)
\r
11240 MOV BX,access_key[0]
\r
11241 MOV CX,access_key[2]
\r
11242 MOV AX,5D02h ; load function code
\r
11243 INT 67h ; call the memory manager
\r
11244 OR AH,AH ; check EMM status
\r
11245 JNZ emm_err_handler ; jump to error handler on error
\r
11270 EMM Functions 186
\r
11277 FUNCTION AND STATUS CODE CROSS REFERENCE TABLES
\r
11281 This appendix contains two cross reference tables: one
\r
11282 lists the function codes and the status codes they return;
\r
11283 the other lists the status codes and the functions that
\r
11287 Table A-1. Function and Status Code Cross Reference
\r
11288 ----------------------------------------------------------------
\r
11290 Function Status Description
\r
11292 ----------------------------------------------------------------
\r
11294 40h 00h, 80h, 81h, 84h Get Memory Manager Status
\r
11296 41h 00h, 80h, 81h, 84h Get Page Frame Segment Address
\r
11298 42h 00h, 80h, 81h, 84h Get Unallocated Page Count
\r
11300 43h 00h, 80h, 81h, 84h Allocate Pages
\r
11301 85h, 87h, 88h, 89h
\r
11303 44h 00h, 80h, 81h, 83h Map/Unmap Handle Page
\r
11306 45h 00h, 80h, 81h, 83h Deallocate Pages
\r
11309 46h 00h, 80h, 81h, 84h Get EMM Version
\r
11311 47h 00h, 80h, 81h, 83h Save Page Map
\r
11314 48h 00h, 80h, 81h, 83h Restore Page Map
\r
11321 4Bh 00h, 80h, 81h, 84h Get EMM Handle Count
\r
11323 4Ch 00h, 80h, 81h, 83h Get EMM Handle Pages
\r
11326 4Dh 00h, 80h, 81h, 84h Get All EMM Handle Pages
\r
11329 Cross Reference Tables 187
\r
11335 Table A-1. Function and Status Code Cross Reference (continued)
\r
11336 ----------------------------------------------------------------
\r
11338 Function Status Description
\r
11340 ----------------------------------------------------------------
\r
11342 4E00h 00h, 80h, 81h, 84h Get Page Map
\r
11345 4E01h 00h, 80h, 81h, 84h Set Page Map
\r
11348 4E02h 00h, 80h, 81h, 84h Get & Set Page Map
\r
11351 4E03h 00h, 80h, 81h, 84h Get Size of Page Map Save Array
\r
11354 4F00h 00h, 80h, 81h, 84h Get Partial Page Map
\r
11357 4F01h 00h, 80h, 81h, 84h Set Partial Page Map
\r
11360 4F02h 00h, 80h, 81h, 84h Get Size of Partial Page Map Array
\r
11363 5000h 00h, 80h, 81h, 83h Map/Unmap Multiple Handle Pages
\r
11364 84h, 8Ah, 8Bh, 8Fh (physical page number mode)
\r
11366 5001h 00h, 80h, 81h, 83h Map/Unmap Multiple Handle Pages
\r
11367 84h, 8Ah, 8Bh, 8Fh (segment address mode)
\r
11369 51h 00h, 80h, 81h, 83h Reallocate Pages
\r
11372 5200h 00h, 80h, 81h, 83h Get Handle Attribute
\r
11375 5201h 00h, 80h, 81h, 83h Set Handle Attribute
\r
11376 84h, 8Fh, 90h, 91h
\r
11378 5202h 00h, 80h, 81h, 84h Get Handle Attribute Capability
\r
11381 5300h 00h, 80h, 81h, 83h Get Handle Name
\r
11384 5301h 00h, 80h, 81h, 83h Set Handle Name
\r
11388 Cross Reference Tables 188
\r
11394 Table A-1. Function and Status Code Cross Reference (continued)
\r
11395 ----------------------------------------------------------------
\r
11397 Function Status Description
\r
11399 ----------------------------------------------------------------
\r
11401 5400h 00h, 80h, 81h, 84h Get Handle Directory
\r
11404 5401h 00h, 80h, 81h, 84h Search for Named Handle
\r
11407 5402h 00h, 80h, 81h, 84h Get Total Handles
\r
11410 5500h 00h, 80h, 81h, 83h Alter Page Map & Jump (Physical
\r
11411 84h, 8Ah, 8Bh, 8Fh page mode)
\r
11413 5501h 00h, 80h, 81h, 83h Alter Page Map & Jump (Segment
\r
11414 84h, 8Ah, 8Bh, 8Fh address mode)
\r
11416 5600h 00h, 80h, 81h, 83h Alter Page Map & Call (Physical
\r
11417 84h, 8Ah, 8Bh, 8Fh page mode)
\r
11419 5601h 00h, 80h, 81h, 83h Alter Page Map & Call (Segment
\r
11420 84h, 8Ah, 8Bh, 8Fh address mode)
\r
11422 5602h 00h, 80h, 81h, 84h Get Alter Page Map & Call Stack
\r
11425 5700h 00h, 80h, 81h, 83h Move Memory Region
\r
11426 84h, 8Ah, 8Fh, 92h
\r
11427 93h, 94h, 95h, 96h
\r
11430 5701h 00h, 80h, 81h, 83h Exchange Memory Region
\r
11431 84h, 8Ah, 8Fh, 93h
\r
11432 94h, 95h, 96h, 97h
\r
11435 5800h 00h, 80h, 81h, 84h Get Mappable Physical Address
\r
11438 5801h 00h, 80h, 81h, 84h Get Mappable Physical Address
\r
11439 8Fh Array Entries
\r
11441 5900h 00h, 80h, 81h, 84h Get Expanded Memory Hardware
\r
11442 8Fh, A4h Information
\r
11444 5901h 00h, 80h, 81h, 84h Get Unallocated Raw Page Count
\r
11447 Cross Reference Tables 189
\r
11453 Table A-1. Function and Status Code Cross Reference (continued)
\r
11454 ----------------------------------------------------------------
\r
11456 Function Status Description
\r
11458 ----------------------------------------------------------------
\r
11460 5A00h 00h, 80h, 81h, 84h Allocate Standard Pages
\r
11461 85h, 87h, 88h, 8Fh
\r
11463 5A01h 00h, 80h, 81h, 84h Allocate Raw Pages
\r
11464 85h, 87h, 88h, 8Fh
\r
11466 5B00h 00h, 80h, 81h, 84h Get Alternate Map Register Set
\r
11469 5B01h 00h, 80h, 81h, 84h Set Alternate Map Register Set
\r
11470 8Fh, 9Ah, 9Ch, 9Dh
\r
11473 5B02h 00h, 80h, 81h, 84h Get Alternate Map Save Array Size
\r
11476 5B03h 00h, 80h, 81h, 84h Allocate Alternate Map Register
\r
11477 8Fh, 9Bh, A4h Set
\r
11479 5B04h 00h, 80h, 81h, 84h Deallocate Alternate Map Register
\r
11480 8Fh, 9Ch, 9Dh, A4h Set
\r
11482 5B05h 00h, 80h, 81h, 84h Allocate DMA Register Set
\r
11485 5B06h 00h, 80h, 81h, 84h Enable DMA on Alternate Map
\r
11486 8Fh, 9Ah, 9Ch, 9Dh Register Set
\r
11489 5B07h 00h, 80h, 81h, 84h Disable DMA on Alternate Map
\r
11490 8Fh, 9Ah, 9Ch, 9Dh Register Set
\r
11493 5B08h 00h, 80h, 81h, 84h Deallocate DMA Register Set
\r
11494 8Fh, 9Ch, 9Dh, A4h
\r
11496 5Ch 00h, 80h, 81h, 84h Prepare Expanded Memory Hardware
\r
11499 5D00h 00h, 80h, 81h, 84h Enable Operating System Function
\r
11502 5D01h 00h, 80h, 81h, 84h Disable Operating System Function
\r
11506 Cross Reference Tables 190
\r
11512 Table A-1. Function and Status Code Cross Reference (continued)
\r
11513 ----------------------------------------------------------------
\r
11515 Function Status Description
\r
11517 ----------------------------------------------------------------
\r
11519 5D02h 00h, 80h, 81h, 84h Return Operating System Access Key
\r
11521 ----------------------------------------------------------------
\r
11565 Cross Reference Tables 191
\r
11571 Table A-2. Status and Function Code Cross Reference
\r
11572 ----------------------------------------------------------------
\r
11574 Status Function Description
\r
11576 ----------------------------------------------------------------
\r
11578 00h All The function completed normally.
\r
11580 80h All The memory manager has detected a
\r
11581 malfunction in the expanded memory
\r
11582 software. A condition has been
\r
11583 detected which would not have
\r
11584 occurred if the memory manager had
\r
11585 been operating correctly.
\r
11587 81h All The memory manager has detected a
\r
11588 malfunction in the expanded memory
\r
11589 hardware. A condition has been
\r
11590 detected which would not occur if the
\r
11591 memory hardware were working correct-
\r
11592 ly. Diagnostics should be run on the
\r
11593 expanded memory system to determine
\r
11594 the source of the problem.
\r
11596 82h None This error code is not returned in
\r
11597 version 3.2 of the memory manager or
\r
11598 above. In earlier versions of the
\r
11599 memory manager this code meant a
\r
11600 "busy" status. This status indicated
\r
11601 that the memory manager was already
\r
11602 processing an expanded memory request
\r
11603 when the current request was made and
\r
11604 is unable to process another request.
\r
11605 In versions 3.2 of the memory manager
\r
11606 and above, the memory manager is
\r
11607 never "busy" and can always honor
\r
11610 83h 44h, 45h, 47h, 48h The memory manager can not find the
\r
11611 4Ch, 5000h, 5001h handle specified. The program has
\r
11612 51h, 5200h, 5201h probably corrupted its specified
\r
11613 5300h, 5301h handle. The memory manager does not
\r
11614 5500h, 5501h have any information pertaining to
\r
11615 5600h, 5601h the specified handle. The program
\r
11616 5700h, 5701h has probably corrupted its handle.
\r
11618 84h All The function code passed to the
\r
11619 manager is not currently defined.
\r
11620 Function codes in the range 40h
\r
11621 through 5Dh are currently defined.
\r
11624 Cross Reference Tables 192
\r
11630 Table A-2. Status and Function Code Cross Reference (continued)
\r
11631 ----------------------------------------------------------------
\r
11633 Status Function Description
\r
11635 ----------------------------------------------------------------
\r
11637 85h 43h, 5A00h, 5A01h No handles are currently available.
\r
11638 All assignable handles are currently
\r
11639 in use. The program may re-request
\r
11640 the assignment of a handle in the
\r
11641 hope that another program has
\r
11642 released a handle. The maximum
\r
11643 number of handles that may be
\r
11644 supported is 255.
\r
11646 86h 45h A mapping context restoration error
\r
11647 has been detected. This error occurs
\r
11648 when a program attempts to return a
\r
11649 handle and there is still a "mapping
\r
11650 context" on the context stack for the
\r
11651 indicated handle. A program can
\r
11652 recover from this error by restoring
\r
11653 the mapping context before returning
\r
11656 87h 43h, 51h, 5A00h, The number of total pages that are
\r
11657 5A01h available in the system is insuffi-
\r
11658 cient to honor the request. The
\r
11659 program can recover from this
\r
11660 condition by requesting fewer pages.
\r
11662 88h 43h, 51h, 5A00h, The number of unallocated pages
\r
11663 5A01h currently available is insufficient
\r
11664 to honor the allocation request. The
\r
11665 program can recover from this
\r
11666 condition by re-posting the request
\r
11667 or by requesting fewer pages.
\r
11669 89h 43h A Function 4 (Allocate Pages) request
\r
11670 has been made specifying zero pages.
\r
11671 Zero pages cannot be assigned to a
\r
11672 handle with Function 4 (Allocate
\r
11673 Pages). If it is necessary to assign
\r
11674 zero pages to a handle, Function 27
\r
11675 (Allocate Standard Pages and Allocate
\r
11676 Raw Pages subfunctions) may be used.
\r
11683 Cross Reference Tables 193
\r
11689 Table A-2. Status and Function Code Cross Reference (continued)
\r
11690 ----------------------------------------------------------------
\r
11692 Status Function Description
\r
11694 ----------------------------------------------------------------
\r
11696 8Ah 44h, 5000h, 5001h The logical page to map into memory
\r
11697 5500h, 5501h is out of the range of logical pages
\r
11698 5600h, 5601h which are allocated to the handle.
\r
11699 5700h, 5701h The program can recover from this
\r
11700 condition by attempting to map a
\r
11701 logical page which is within the
\r
11702 bounds for the handle.
\r
11704 8Bh 44h, 4F00h, 4F02h One or more of the physical pages is
\r
11705 5000h, 5001h out of the range of allowable
\r
11706 5600h, 5601h physical pages. Physical page
\r
11707 5500h, 5501 numbers are numbered zero-relative.
\r
11708 The program can recover from this
\r
11709 condition by mapping at a physical
\r
11710 page which is in the range from zero
\r
11713 8Ch 47h The mapping register context save
\r
11714 area is full. The program can
\r
11715 recover from this condition by
\r
11716 attempting to save the mapping
\r
11719 8Dh 47h The mapping register context stack
\r
11720 already has a context associated with
\r
11721 the handle. The program has at-
\r
11722 tempted to save the mapping register
\r
11723 context when there was already a
\r
11724 context for the handle on the stack.
\r
11725 The program can recover from this
\r
11726 condition by not attempting to save
\r
11727 the context again (this assumes the
\r
11728 mapping register context on the stack
\r
11729 for the handle is correct).
\r
11742 Cross Reference Tables 194
\r
11748 Table A-2. Status and Function Code Cross Reference (continued)
\r
11749 ----------------------------------------------------------------
\r
11751 Status Function Description
\r
11753 ----------------------------------------------------------------
\r
11755 8Eh 48h The mapping register context stack
\r
11756 does not have a context associated
\r
11757 with the handle. The program has
\r
11758 attempted to restore the mapping
\r
11759 register context when there was no
\r
11760 context for the handle on the stack.
\r
11761 The program can recover from this
\r
11762 condition by not attempting to
\r
11763 restore the context again (this
\r
11764 assumes the current mapping register
\r
11765 context is correct).
\r
11767 8Fh All functions The subfunction parameter passed to
\r
11768 requiring the function is not defined.
\r
11769 subfunction codes
\r
11771 90h 5201h The attribute type is undefined.
\r
11773 91h 5200h, 5201h The system configuration does not
\r
11774 support non-volatility.
\r
11776 92h 5700h The source and destination expanded
\r
11777 memory regions have the same handle
\r
11778 and overlap. This is valid for a
\r
11779 move. The move has been completed
\r
11780 and the destination region has a full
\r
11781 copy of the source region. However,
\r
11782 at least a portion of the source
\r
11783 region has been overwritten by the
\r
11784 move. Note that the source and
\r
11785 destination expanded memory regions
\r
11786 with different handles will never
\r
11787 physically overlap because the
\r
11788 different handles specify totally
\r
11789 different regions of expanded memory.
\r
11801 Cross Reference Tables 195
\r
11807 Table A-2. Status and Function Code Cross Reference (continued)
\r
11808 ----------------------------------------------------------------
\r
11810 Status Function Description
\r
11812 ----------------------------------------------------------------
\r
11814 93h 5700h, 5701h The length of the specified source or
\r
11815 destination expanded memory region
\r
11816 exceeds the length of the expanded
\r
11817 memory region allocated to the
\r
11818 specified source or destination
\r
11819 handle. There are insufficient pages
\r
11820 allocated to this handle to move/ex-
\r
11821 change a region of the size speci-
\r
11822 fied. The program can recover from
\r
11823 this condition by attempting to
\r
11824 allocate additional pages to the
\r
11825 destination or source handle or by
\r
11826 reducing the specified length.
\r
11827 However, if the application program
\r
11828 has allocated as much expanded memory
\r
11829 as it thought it needed, this may be
\r
11830 a program error and is therefore not
\r
11833 94h 5700h, 5701h The conventional memory region and
\r
11834 expanded memory region overlap. This
\r
11835 is invalid, the conventional memory
\r
11836 region cannot overlap the expanded
\r
11839 95h 5700h, 5701h The offset within the logical page
\r
11840 exceeds the length of the logical
\r
11841 page. The initial source or destina-
\r
11842 tion offsets within an expanded
\r
11843 memory region must be between 0 and
\r
11844 the (length of a logical page - 1) or
\r
11847 96h 5700h, 5701h Region length exceeds 1M-byte limit.
\r
11860 Cross Reference Tables 196
\r
11866 Table A-2. Status and Function Code Cross Reference (continued)
\r
11867 ----------------------------------------------------------------
\r
11869 Status Function Description
\r
11871 ----------------------------------------------------------------
\r
11873 97h 5701h The source and destination expanded
\r
11874 memory regions have the SAME handle
\r
11875 AND overlap. This is invalid; the
\r
11876 source and destination expanded
\r
11877 memory regions cannot have the same
\r
11878 handle and overlap when they are
\r
11879 being exchanged. Note that the
\r
11880 source and destination expanded
\r
11881 memory regions with different handles
\r
11882 will never physically overlap because
\r
11883 the different handles specify totally
\r
11884 different regions of expanded memory.
\r
11886 98h 5700h, 5701h The memory source and destination
\r
11887 types are undefined/not supported.
\r
11889 9Ah 5B01h, 5B06h Alternate map register sets are
\r
11890 5B07h supported, but the alternate map
\r
11891 register set specified is not
\r
11894 9Bh 5B03h, 5B05h Alternate map/DMA register sets are
\r
11895 supported. However, all alternate
\r
11896 map/DMA register sets are currently
\r
11899 9Ch 5B01h, 5B04h Alternate map/DMA register sets are
\r
11900 5B06h, 5B07h not supported, and the alternate
\r
11901 5B08h map/DMA register set specified is not
\r
11904 9Dh 5B01h, 5B04h Alternate map/DMA register sets are
\r
11905 5B06h, 5B07h supported, but the alternate map
\r
11906 5B08h register set specified is not
\r
11907 defined, not allocated, or is the
\r
11908 currently allocated map register set.
\r
11910 9Eh 5B06h, 5B07h Dedicated DMA channels are not
\r
11913 9Fh 5B06h, 5B07h Dedicated DMA channels are supported.
\r
11914 But the DMA channel specified is not
\r
11919 Cross Reference Tables 197
\r
11925 Table A-2. Status and Function Code Cross Reference (continued)
\r
11926 ----------------------------------------------------------------
\r
11928 Status Function Description
\r
11930 ----------------------------------------------------------------
\r
11932 A0h 5401h No corresponding handle value could
\r
11933 be found for the handle name speci-
\r
11936 A1h 5301h, 5401h A handle with this name already
\r
11937 exists. The specified handle was not
\r
11940 A2h 5700h, 5701h An attempt was made to "wrap around"
\r
11941 the 1M-byte address space during the
\r
11942 move/exchange. The source starting
\r
11943 address together with the length of
\r
11944 the region to be moved/exchanged
\r
11945 exceeds 1M bytes. No data was
\r
11948 A3h 4E01h, 4E02h The contents of the data structure
\r
11949 4F00h, 4F01h passed to the function have either
\r
11950 5B01h been corrupted or are meaningless.
\r
11952 A4h 5900h, 5B00h The operating system has denied
\r
11953 5B01h, 5B02h access to this function. The
\r
11954 5B03h, 5B04h function cannot be used at this time.
\r
11960 ----------------------------------------------------------------
\r
11978 Cross Reference Tables 198
\r
11985 TESTING FOR THE PRESENCE OF THE EXPANDED MEMORY MANAGER
\r
11989 Before an application program can use the Expanded Memory
\r
11990 Manager, it must determine whether DOS has loaded the
\r
11991 manager. This appendix describes two methods your program
\r
11992 can use to test for the presence of the memory manager and
\r
11993 how to choose the correct one for your situation.
\r
11995 The first method uses the DOS "open handle" technique; the
\r
11996 second method uses the DOS "get interrupt vector" technique.
\r
11999 Which method should your program use?
\r
12001 The majority of application programs can use either the
\r
12002 "open handle" or the "get interrupt vector" method.
\r
12003 However, if your program is a device driver or if it
\r
12004 interrupts DOS during file system operations, you must use
\r
12005 only the "get interrupt vector" method.
\r
12007 Device drivers execute from within DOS and can't access the
\r
12008 DOS file system; programs that interrupt DOS during file
\r
12009 system operations have a similar restriction. During their
\r
12010 interrupt processing procedures, they can't access the DOS
\r
12011 file system because another program may be using the system.
\r
12012 Since the "get interrupt vector" method doesn't require the
\r
12013 DOS file system, you must use it for these types of pro-
\r
12017 The "open handle" technique
\r
12019 Most application programs can use the DOS "open handle"
\r
12020 technique to test for the presence of the memory manager.
\r
12021 This section describes how to use the technique and gives an
\r
12024 Caution.........................................................
\r
12025 Don't use this technique if your program is a device driver
\r
12026 or if it interrupts DOS during file system operations. Use
\r
12027 the "get interrupt vector" technique described later in this
\r
12031 Using the "open handle" technique
\r
12033 This section describes how to use the DOS "open handle"
\r
12034 technique to test for the presence of the memory manager.
\r
12035 Follow these steps in order:
\r
12037 Testing For The Presence Of The EMM 199
\r
12043 1. Issue an "open handle" command (DOS function 3Dh) in
\r
12044 "read only" access mode (register AL = 0). This
\r
12045 function requires your program to point to an ASCII
\r
12046 string which contains the path name of the file or
\r
12047 device in which you're interested (register set DS:DX
\r
12048 contains the pointer). In this case the file is
\r
12049 actually the name of the memory manager.
\r
12051 You should format the ASCII string as follows:
\r
12053 ASCII_device_name DB 'EMMXXXX0', 0
\r
12055 The ASCII codes for the capital letters EMMXXXX0 are
\r
12056 terminated by a byte containing a value of zero.
\r
12058 2. If DOS returns no error status code, skip Steps 3 and 4
\r
12059 and go to Step 5. If DOS returns a "Too many open
\r
12060 files" error status code, go to Step 3. If DOS returns
\r
12061 a "File/Path not found" error status code, skip Step 3
\r
12062 and go to Step 4.
\r
12064 3. If DOS returns a "Too many open files" (not enough
\r
12065 handles) status code, your program should invoke the
\r
12066 "open file" command before it opens any other files.
\r
12067 This will guarantee that at least one file handle will
\r
12068 be available to perform the function without causing
\r
12071 After the program performs the "open file" command, it
\r
12072 should perform the test described in Step 6 and close
\r
12073 the "file handle" (DOS function 3Eh). Don't keep the
\r
12074 manager "open" after this status test is performed since
\r
12075 "manager" functions are not available through DOS. Go
\r
12078 4. If DOS returns a "File/Path not found," the memory
\r
12079 manager is not installed. If your application requires
\r
12080 the memory manager, the user will have to reboot the
\r
12081 system with a disk containing the memory manager and the
\r
12082 appropriate CONFIG.SYS file before proceeding.
\r
12084 5. If DOS doesn't return an error status code you can
\r
12085 assume that either a device with the name EMMXXXX0 is
\r
12086 resident in the system, or a file with this name is on
\r
12087 disk in the current disk drive. Go to Step 6.
\r
12089 6. Issue an "I/O Control for Devices" command (DOS function
\r
12090 44h) with a "get device information" command (register
\r
12091 AL = 0). DOS function 44h determines whether EMMXXXX0
\r
12092 is a device or a file.
\r
12096 Testing For The Presence Of The EMM 200
\r
12102 You must use the file handle (register BX) which you
\r
12103 obtained in Step 1 to access the "EMM" device.
\r
12105 This function returns the "device information" in a word
\r
12106 (register DX). Go to Step 7.
\r
12108 7. If DOS returns any error status code, you should assume
\r
12109 that the memory manager device driver is not installed.
\r
12110 If your application requires the memory manager, the
\r
12111 user will have to reboot the system with a disk contain-
\r
12112 ing the memory manager and the appropriate CONFIG.SYS
\r
12113 file before proceeding.
\r
12115 8. If DOS didn't return an error status, test the contents
\r
12116 of bit 7 (counting from 0) of the "device information"
\r
12117 word (register DX) the function returned. Go to Step 9.
\r
12119 9. If bit 7 of the "device information" word contains a
\r
12120 zero, then EMMXXXX0 is a file, and the memory manager
\r
12121 device driver is not present. If your application
\r
12122 requires the memory manager, the user will have to
\r
12123 reboot the system with a disk containing the memory
\r
12124 manager and the appropriate CONFIG.SYS file before
\r
12127 If bit 7 contains a one, then EMMXXXX0 is a device. Go
\r
12130 10. Issue an "I/O Control for Devices" command (DOS function
\r
12131 44h) with a "get output status" command (register AL =
\r
12134 You must use the file handle you obtained in Step 1 to
\r
12135 access the "EMM" device (register BX). Go to Step 11.
\r
12137 11. If the expanded memory device driver is "ready," the
\r
12138 memory manager passes a status value of "FFh" in
\r
12139 register AL. The status value is "00h" if the device
\r
12140 driver is "not ready."
\r
12142 If the memory manager device driver is "not ready" and
\r
12143 your application requires its presence, the user will
\r
12144 have to reboot the system with a disk containing the
\r
12145 memory manager and the appropriate CONFIG.SYS file
\r
12146 before proceeding.
\r
12148 If the memory manager device driver is "ready," go to
\r
12155 Testing For The Presence Of The EMM 201
\r
12161 12. Issue a "Close File Handle" command (DOS function 3Eh)
\r
12162 to close the expanded memory device driver. You must
\r
12163 use the file handle you obtained in Step 1 to close the
\r
12164 "EMM" device (register BX).
\r
12214 Testing For The Presence Of The EMM 202
\r
12220 An example of the "open handle" technique
\r
12222 The following procedure is an example of the "open handle"
\r
12223 technique outlined in the previous section.
\r
12225 ;--------------------------------------------------------------;
\r
12226 ; The following procedure tests for the presence of the ;
\r
12227 ; EMM in the system. It returns the CARRY FLAG SET if ;
\r
12228 ; the EMM is present. If the EMM is not present, this ;
\r
12229 ; procedure returns the CARRY FLAG CLEAR. ;
\r
12230 ;--------------------------------------------------------------;
\r
12232 first_test_for_EMM PROC NEAR
\r
12236 MOV AX,3D00h ; issue "device open" in
\r
12237 LEA DX,ASCII_device_name ; "read only" mode
\r
12239 JC first_test_for_EMM_error_exit ; test for error
\r
12240 ; during "device open"
\r
12241 MOV BX,AX ; get the "file
\r
12242 ; handle" returned by DOS
\r
12243 MOV AX,4400h ; issue "IOCTL
\r
12244 INT 21h ; get device info"
\r
12245 JC first_test_for_EMM_error_exit ; test for error
\r
12246 ; during "get device info"
\r
12247 TEST DX,0080h ; test to determine
\r
12248 JZ first_test_for_EMM_error_exit ; ASCII_device_name
\r
12249 ; is a device or a file
\r
12250 MOV AX,4407h ; issue "IOCTL"
\r
12252 JC first_test_for_EMM_error_exit ; test for error
\r
12254 PUSH AX ; save "IOCTL" status
\r
12255 MOV AH,3Eh ; issue "close
\r
12256 INT 21h ; file handle"
\r
12257 POP AX ; restore "IOCTL" status
\r
12258 CMP AL,0FFh ; test for "device
\r
12259 JNE first_test_for_EMM_error_exit ; ready" status
\r
12260 ; returned by the driver
\r
12261 first_test_for_EMM_exit:
\r
12262 POP DS ; EMM is present
\r
12263 STC ; in the system
\r
12266 first_test_for_EMM_error_exit:
\r
12267 POP DS ; EMM is NOT present
\r
12268 CLC ; in the system
\r
12270 ASCII_device_name DB 'EMMXXXX0', 0
\r
12271 first_test_for_EMM ENDP
\r
12273 Testing For The Presence Of The EMM 203
\r
12279 The "get interrupt vector" technique
\r
12281 Any type of program can use the DOS "get interrupt vector"
\r
12282 technique to test for the presence of the memory manager.
\r
12283 This section describes how to use the technique and gives an
\r
12286 Caution.........................................................
\r
12287 Be sure to use this technique (and not the "open handle"
\r
12288 technique) if your program is a device driver or if it
\r
12289 interrupts DOS during file system operations.
\r
12292 Using the "get interrupt vector" technique
\r
12294 This section describes how to use the DOS "get interrupt
\r
12295 vector" technique to test for the presence of the memory
\r
12296 manager. Follow these steps in order:
\r
12298 1. Issue a "get vector" command (DOS function 35h) to
\r
12299 obtain the contents of interrupt vector array entry
\r
12300 number 67h (addresses 0000:019Ch thru 0000:019Fh).
\r
12302 The memory manager uses this interrupt vector to perform
\r
12303 all manager functions. The offset portion of this
\r
12304 interrupt service routine address is stored in the word
\r
12305 located at address 0000:019Ch; the segment portion is
\r
12306 stored in the word located at address 0000:019Eh.
\r
12308 2. Compare the "device name field" with the contents of the
\r
12309 ASCII string which starts at the address specified by
\r
12310 the segment portion of the contents of interrupt vector
\r
12311 address 67h and a fixed offset of 000Ah. If DOS loaded
\r
12312 the memory manager at boot time this name field will
\r
12313 have the name of the device in it.
\r
12315 Since the memory manager is implemented as a character
\r
12316 device driver, its program origin is 0000h. Device
\r
12317 drivers are required to have a "device header" located
\r
12318 at the program origin. Within the "device header" is an
\r
12319 8 byte "device name field." For a character mode device
\r
12320 driver this name field is always located at offset 000Ah
\r
12321 within the device header. The device name field
\r
12322 contains the name of the device which DOS uses when it
\r
12323 references the device.
\r
12325 If the result of the "string compare" in this technique
\r
12326 is positive, the memory manager is present.
\r
12332 Testing For The Presence Of The EMM 204
\r
12338 An example of the "get interrupt vector" technique
\r
12340 The following procedure is an example of the "get interrupt
\r
12341 vector" technique outlined in the previous section.
\r
12344 ;--------------------------------------------------------------;
\r
12345 ; The following procedure tests for the presence of the ;
\r
12346 ; EMM in the system. It returns the CARRY FLAG SET if ;
\r
12347 ; the EMM is present. If the EMM is not present, this ;
\r
12348 ; procedure returns the CARRY FLAG CLEAR. ;
\r
12349 ;--------------------------------------------------------------;
\r
12352 second_test_for_EMM PROC NEAR
\r
12356 MOV AX,3567h ; issue "get interrupt
\r
12359 MOV DI,000Ah ; use the segment in ES
\r
12360 ; returned by DOS, place
\r
12361 ; the "device name field"
\r
12363 LEA SI,ASCII_device_name ; place the OFFSET of the
\r
12364 ; device name string in SI,
\r
12365 ; the SEGMENT is already
\r
12367 MOV CX,8 ; compare the name strings
\r
12370 JNE second_test_for_EMM_error_exit
\r
12372 second_test_for_EMM_exit:
\r
12373 POP DS ; EMM is present in
\r
12377 second_test_for_EMM_error_exit:
\r
12378 POP DS ; EMM is NOT present
\r
12379 CLC ; in the system
\r
12382 ASCII_device_name DB 'EMMXXXX0'
\r
12383 second_test_for_EMM ENDP
\r
12391 Testing For The Presence Of The EMM 205
\r
12398 EXPANDED MEMORY MANAGER IMPLEMENTATION GUIDELINES
\r
12402 In addition to the functional specification, the expanded
\r
12403 memory manager should provide certain resources. The
\r
12404 following guidelines are provided so required resources are
\r
12405 present in expanded memory managers which comply with this
\r
12406 version of the LIM specification.
\r
12408 o The amount of expanded memory supported:
\r
12409 Up to a maximum of 32M bytes of expanded memory should
\r
12412 o The number of handles supported:
\r
12413 The maximum number of expanded memory handles provided
\r
12414 should be 255, the minimum should be 64.
\r
12416 o Handle Numbering:
\r
12417 Although a handle is a word quantity, there is a maximum
\r
12418 of 255 handles, including the operating system handle.
\r
12419 This specification defines the handle word as follows:
\r
12420 the low byte of the word is the actual handle value, the
\r
12421 high byte of the handle is set to 00h by the memory
\r
12422 manager. Previous versions of this specification did
\r
12423 not specify the value of handles.
\r
12425 o New handle type: Handles versus Raw Handles:
\r
12426 The difference between a raw handle and a regular handle
\r
12427 is slight. If you use Function 27 to "Allocate raw
\r
12428 pages to a handle," what is returned in DX is termed a
\r
12429 raw handle. The raw handle does not necessarily refer
\r
12430 to 16K-byte pages. Instead it refers to the "raw" page
\r
12431 size, which depends on the expanded memory hardware.
\r
12433 An application program can use Function 26 to find the
\r
12434 raw page size, and by using the raw handle Function 27
\r
12435 returns, it can access them with the finer resolution
\r
12436 that a particular expanded memory board may allow.
\r
12438 On the other hand, applications which use Function 4 to
\r
12439 "allocate pages to handle" receive a handle which always
\r
12440 refers to 16K-byte pages. On expanded memory boards
\r
12441 with smaller raw pages, the EMM driver will allocate and
\r
12442 maintain the number of raw pages it takes to create a
\r
12443 single composite 16K-byte page. The difference between
\r
12444 the expanded memory boards' raw page size and the 16K-
\r
12445 byte LIM page size is transparent to the application
\r
12446 when it is using a handle obtained with Function 4.
\r
12450 EMM Implementation Guidelines 206
\r
12456 The memory manager must differentiate between pages
\r
12457 allocated to handles and pages allocated to raw handles.
\r
12458 The meaning of a call to the driver changes depending on
\r
12459 whether a handle or a raw handle is passed to the memory
\r
12460 manager. If, for example, a handle is passed to
\r
12461 Function 18 (Reallocate), the memory manager will
\r
12462 increase or decrease the number of 16K-byte pages
\r
12463 allocated to the handle. If Function 18 is passed a raw
\r
12464 handle, the memory manager will increase or decrease the
\r
12465 number of raw (non-16K-byte) pages allocated to the raw
\r
12466 handle. For LIM standard boards, there is no difference
\r
12467 between pages and raw pages.
\r
12469 o The system Raw Handle (Raw Handle = 0000h):
\r
12470 For expanded memory boards that can remap the memory in
\r
12471 the lower 640K-byte address space, managing the pages of
\r
12472 memory which are used to fill in the lower 640K can be a
\r
12473 problem. To solve this problem, the memory manager will
\r
12474 create a raw handle with a value of 0000h when DOS loads
\r
12475 the manager. This raw handle is called the system
\r
12478 At power up, the memory manager will allocate all of the
\r
12479 pages that are mapped into the lower 640K bytes to the
\r
12480 system handle. These pages should be mapped in their
\r
12481 logical order. For example, if the system board
\r
12482 supplies 256K bytes of RAM, and the 384K bytes above it
\r
12483 is mappable, the system handle should have its logical
\r
12484 page zero mapped into the first physical page at 256K,
\r
12485 its logical page one mapped into the next physical page,
\r
12488 The system handle should deal with raw pages. To
\r
12489 release some of these pages so application programs can
\r
12490 use them, an operating system could decrease the number
\r
12491 of pages allocated to the system handle with the
\r
12492 "Reallocate" function. Invoking the "Deallocate"
\r
12493 function would decrease the system handle to zero size,
\r
12494 but it must not deallocate the raw handle itself. The
\r
12495 "Deallocate" function treats the system handle dif-
\r
12496 ferently than it treats other raw handles. If the
\r
12497 operating system can ever be "exited" (for example, the
\r
12498 way Windows can be exited), it must increase the size of
\r
12499 the system handle back to what is needed to fill 640K
\r
12500 and map these logical pages back into physical memory
\r
12501 before returning to DOS.
\r
12509 EMM Implementation Guidelines 207
\r
12515 There are two functional special cases for this handle:
\r
12517 - The first special case deals with Function 4
\r
12518 (Allocate Pages). This function must never return
\r
12519 zero as a handle value. Applications must always
\r
12520 invoke Function 4 to allocate pages and obtain a
\r
12521 handle which identifies its pages. Since Function 4
\r
12522 will never return a handle value of zero, an
\r
12523 application will never gain access to this special
\r
12526 - The second special case deals with Function 6
\r
12527 (Deallocate Pages). If the operating system uses
\r
12528 Function 6 to deallocate the pages which are
\r
12529 allocated to the system handle, the pages will be
\r
12530 returned to the manager for use, but the handle will
\r
12531 not be available for reassignment. The manager
\r
12532 should treat a "deallocate pages" function request
\r
12533 for this handle the same as a "reallocate pages"
\r
12534 function request, where the number of pages to
\r
12535 reallocate to this handle is zero.
\r
12537 o Terminate and Stay Resident (TSR) Program Cooperation:
\r
12538 In order for TSR's to cooperate with each other and with
\r
12539 other applications, TSR's must follow this rule: a
\r
12540 program may only remap the DOS partition it lives in.
\r
12541 This rule applies at all times, even when no expanded
\r
12542 memory is present.
\r
12544 o Accelerator Cards:
\r
12545 To support generic accelerator cards, the support of
\r
12546 Function 34, as defined by AST, is encouraged.
\r
12568 EMM Implementation Guidelines 208
\r
12575 OPERATING SYSTEM/ENVIRONMENT USE OF FUNCTION 28
\r
12579 All expanded memory boards have a set of registers that
\r
12580 "remember" the logical to physical page mappings. Some
\r
12581 boards have extra (or alternate) sets of these mapping
\r
12582 registers. Because no expanded memory board can supply an
\r
12583 infinite number of alternate map register sets, this
\r
12584 specification provides a way to simulate them using Function
\r
12585 28 (Alternate Map Register Set).
\r
12590 For the examples in this section, assume the hardware
\r
12591 supports alternate map register sets. First Windows is
\r
12592 brought up, then "Reversi" is started. Then control is
\r
12593 switched back to the MS-DOS Executive. For this procedure,
\r
12594 here are the calls to the expanded memory manager:
\r
12598 Allocate alt reg set ; Start up the MS-DOS
\r
12599 (for MS-DOS Executive) ; Executive
\r
12602 (for MS-DOS Executive)
\r
12604 Allocate alt reg set ; Start up Reversi
\r
12613 Set alt ret set ; Switch back to MS-DOS
\r
12614 (for MS-DOS Executive) ; Executive
\r
12627 Operating System Use Of Function 28 209
\r
12633 Notice this procedure needed no "get" calls because the
\r
12634 register set contained all the information needed to save a
\r
12635 context. However, using "Get" calls would have no ill
\r
12640 Allocate alt reg set ; Start up MS-DOS
\r
12641 (for MS-DOS Executive) ; Executive
\r
12644 (for MS-DOS Executive)
\r
12647 (for MS-DOS Executive)
\r
12649 Allocate alt reg set ; Start up Reversi
\r
12661 Set alt reg set ; Switch back to MS-DOS
\r
12662 (for MS-DOS Executive) ; Executive
\r
12664 The important point to follow is that a Set must always
\r
12665 precede a Get. The model of Set then Get is the inverse of
\r
12666 what interrupt handlers use, which is Get then Set (Get the
\r
12667 old map context and Set the new one). Another crucial point
\r
12668 is that an alternate map register set must have the current
\r
12669 mapping when allocated; otherwise, the Set will create
\r
12672 What happens if this is simulated in software? The same Set
\r
12673 and Get model applies. The main difference is where the
\r
12674 context is saved.
\r
12686 Operating System Use Of Function 28 210
\r
12692 Since the allocate call is dynamic and there is no limit on
\r
12693 the number of sets allocated, the OS/E must supply the space
\r
12694 required. Device drivers cannot allocate space dynamically,
\r
12695 since the request would fail. If the Allocate register set
\r
12696 call returns a status indicating the alternate map register
\r
12697 sets aren't supported, the OS/E must allocate space for the
\r
12698 context. It must also initialize the context using Function
\r
12699 15. At that point it can do the Set, passing a pointer to
\r
12700 the map context space. On the Get call, the EMM driver is
\r
12701 to return a pointer to the same context space.
\r
12705 Allocate alt reg set ; Start up MS-DOS
\r
12706 (for MS-DOS Executive) ; Executive
\r
12709 (for MS-DOS Executive)
\r
12712 (for MS-DOS Executive)
\r
12714 Allocate alt reg set ; Start up Reversi
\r
12726 Set alt ret set ; Switch back to MS-DOS
\r
12727 (for MS-DOS Executive) ; Executive
\r
12745 Operating System Use Of Function 28 211
\r
12755 The following terms are used frequently in this specifica-
\r
12759 Allocate To reserve a specified amount of
\r
12760 expanded memory pages.
\r
12762 Application Program An application program is the program
\r
12763 you write and your customer uses. Some
\r
12764 categories of application software are
\r
12765 word processors, database managers,
\r
12766 spreadsheet managers, and project
\r
12769 Conventional memory The memory between 0 and 640K bytes,
\r
12770 address range 00000h thru 9FFFFh.
\r
12772 Deallocate To return previously allocated expanded
\r
12773 memory to the memory manager.
\r
12775 EMM See Expanded Memory Manager.
\r
12777 Expanded memory Expanded memory is memory outside DOS's
\r
12778 640K-byte limit (usually in the range of
\r
12779 C0000h thru EFFFFh).
\r
12781 Expanded Memory A device driver that controls the
\r
12782 Manager (EMM) interface between DOS application
\r
12783 programs and expanded memory.
\r
12785 Extended memory The 15M-byte address range between
\r
12786 100000h thru FFFFFFh available on an
\r
12787 80286 processor when it is operating in
\r
12788 protected virtual address mode.
\r
12790 Handle A value that the EMM assigns and uses to
\r
12791 identify a block of memory requested by
\r
12792 an application program. All allocated
\r
12793 logical pages are associated with a
\r
12794 particular handle.
\r
12796 Logical Page The EMM allocates expanded memory in
\r
12797 units (typically 16K bytes) called
\r
12800 Mappable Segment A 16K-byte region of memory which can
\r
12801 have a logical page mapped at it.
\r
12810 Map Registers The set of registers containing the
\r
12811 current mapping context of the EMM
\r
12814 Mapping The process of making a logical page of
\r
12815 memory appear at a physical page.
\r
12817 Mapping Context The contents of the mapping registers at
\r
12818 a specific instant. This context
\r
12819 represents a map state.
\r
12821 Page Frame A collection of 16K-byte contiguous
\r
12822 physical pages from which an application
\r
12823 program accesses expanded memory.
\r
12825 Page Frame A page frame base address is the
\r
12826 Base Address location (in segment format) of the
\r
12827 first byte of the page frame.
\r
12829 Physical Page A physical page is the range of memory
\r
12830 addresses occupied by a single 16K-byte
\r
12833 Raw Page The smallest unit of mappable memory
\r
12834 that an expanded memory board can
\r
12837 Resident Application A resident application program is loaded
\r
12838 Program by DOS, executes, and remains resident
\r
12839 in the system after it returns control
\r
12840 to DOS. This type of program occupies
\r
12841 memory and is usually invoked by the
\r
12842 operating system, an application
\r
12843 program, or the hardware. Some example
\r
12844 of resident application programs are RAM
\r
12845 disks, print spoolers, and "pop-up"
\r
12846 desktop programs.
\r
12848 Status code A code that an EMM function returns
\r
12849 which indicates something about the
\r
12850 result of running the function. Some
\r
12851 status codes indicate whether the
\r
12852 function worked correctly and others may
\r
12853 tell you something about the expanded
\r
12854 memory hardware or software.
\r
12869 Transient Application A transient application program is
\r
12870 Program loaded by DOS, executes, and doesn't
\r
12871 remain in the system after it returns
\r
12872 control to DOS. After a transient
\r
12873 application program returns control to
\r
12874 DOS, the memory it used is available for
\r
12877 Unmap To make a logical page inaccessible for
\r
12878 reading or writing.
\r
12932 Allocate Alternate Map Register Set 36, 163
\r
12933 Allocate DMA Register Set 36, 168, 190
\r
12934 Allocate Pages 5, 14, 23, 30, 34, 42, 43, 47, 49, 144,
\r
12935 147, 148, 193, 206, 208
\r
12936 Allocate Raw Pages 36, 46, 80, 89, 147-149, 190, 193,
\r
12938 Allocate Standard Pages 36, 42, 46, 80, 89, 144, 145,
\r
12940 Alter Page Map & Call 7, 10, 35, 113, 118, 189
\r
12941 Alter Page Map & Jump 7, 10, 35, 109, 189
\r
12942 Alternate Map 10, 36, 151, 153-155, 157-159, 161, 163,
\r
12943 164, 165-168, 170, 173, 175, 179, 182, 190, 197,
\r
12945 Alternate Map Register Set 10, 36, 151, 153-155, 157,
\r
12946 158, 159, 161, 163-168, 170, 173, 175, 190, 197,
\r
12948 Alternate Mapping and Unmapping Methods 81
\r
12949 Alternate Register 139, 166, 173, 177
\r
12951 Deallocate Alternate Map Register Set 36, 166
\r
12952 Deallocate DMA Register Set 36, 175, 190
\r
12953 Deallocate Pages 5, 14, 25, 31, 34, 43, 49, 88, 145,
\r
12955 Design Considerations 91, 151
\r
12956 Device Driver 1, 15, 43, 53, 55, 144, 148, 199, 201,
\r
12958 Disable DMA on Alternate Map Register Set 173
\r
12959 Disable OS/E Function Set 36, 179, 180, 182, 185
\r
12960 DMA 36, 138-140, 151, 152, 168-176, 190, 197
\r
12961 DMA Channels 139, 171, 173, 174, 197
\r
12962 DMA Register 36, 139, 140, 151, 152, 168-171, 173-176,
\r
12964 DOS 1, 12, 14, 15, 19, 21, 30, 31, 49, 53, 88, 199-205,
\r
12966 Enable DMA on Alternate Map Register Set 170
\r
12967 Enable OS/E Function Set 36, 179, 180
\r
12968 Enable/Disable OS/E Function Set 179, 180, 182, 185
\r
12969 Exchange Memory Region 7, 10, 35, 120, 126, 127, 189
\r
12970 Expanded Memory Support of DMA 151
\r
12971 Expanded Memory Support of DMA Register Sets 151
\r
12972 Extended Memory 91
\r
12978 Function 14 7, 63
\r
12987 Function 15 13, 53, 55, 65, 67, 69, 71, 73, 76, 139,
\r
12988 153, 154, 155, 158, 211
\r
12989 Function 16 13, 73, 76, 78
\r
12990 Function 17 6, 80, 82, 85
\r
12991 Function 18 6, 43, 88, 144, 148, 207
\r
12992 Function 19 7, 91, 92, 94, 96
\r
12994 Function 20 7, 98, 100
\r
12995 Function 21 7, 42, 102, 105, 107
\r
12997 Function 23 113, 118
\r
12998 Function 24 7, 120, 126
\r
12999 Function 25 6, 8, 46, 74, 85, 132, 136
\r
13000 Function 26 138, 142, 179, 182, 206
\r
13001 Function 27 42, 46, 80, 89, 144, 145, 147-149, 193, 206
\r
13002 Function 28 140, 151, 153, 157, 161, 163, 164, 166,
\r
13003 168, 170, 173, 175, 179, 182, 209
\r
13005 Function 3 4, 40, 142
\r
13006 Function 30 138, 151, 153, 157, 161, 163, 166, 168,
\r
13007 170, 173, 175, 179, 182, 185
\r
13008 Function 4 4, 42, 43, 46, 47, 49, 80, 89, 144, 145,
\r
13009 147, 149, 193, 206, 208
\r
13010 Function 5 4, 46, 81
\r
13011 Function 6 4, 43, 49, 88, 145, 148, 208
\r
13013 Function 8 46, 50, 53, 55
\r
13014 Function 9 46, 50, 53, 55
\r
13015 Get & Set Page Map 35, 69
\r
13016 Get All Handle Pages 9, 34, 63
\r
13017 Get Alternate Map Register Set 36, 153, 154, 157, 190
\r
13018 Get Alternate Map Save Array Size 36, 161, 190
\r
13019 Get Attribute Capability 7, 96
\r
13020 Get Expanded Memory Hardware Information 10, 138, 142,
\r
13022 Get Handle Attribute 35, 92
\r
13023 Get Handle Count 9, 34, 59
\r
13024 Get Handle Directory 10, 35, 102, 105, 107
\r
13025 Get Handle Name 35, 98
\r
13026 Get Handle Pages 7, 9, 34, 61
\r
13027 Get Hardware Configuration Array 36, 138
\r
13028 Get Interrupt Vector 15, 21, 30, 199, 204, 205
\r
13029 Get Mappable Physical Address Array 6, 8, 10, 35, 46,
\r
13031 Get Mappable Physical Address Array Entries 8, 136
\r
13032 Get Page Frame Address 5, 34, 38
\r
13033 Get Page Map 35, 65, 118, 153-155, 158, 211
\r
13034 Get Page Map Stack Space Size 35, 118
\r
13035 Get Partial Page Map 35, 73, 78
\r
13036 Get Size of Page Map Save Array 35, 65, 67, 71, 139
\r
13037 Get Size of Partial Page Map Save Array 74, 76, 78
\r
13038 Get Status 5, 34, 37
\r
13046 Get Total Handles 35, 107
\r
13047 Get Unallocated Page Count 5, 22, 34, 40, 142
\r
13048 Get Unallocated Raw Page Count 36, 142, 189
\r
13049 Get Version 5, 34, 51
\r
13050 Get/Set Handle Attribute 9, 91, 92, 94, 96
\r
13051 Get/Set Handle Name 10, 98, 100
\r
13052 Get/Set Page Map 9, 13, 65, 67, 69, 71
\r
13053 Get/Set Partial Page Map 9, 13, 73, 76, 78
\r
13054 Handle Attribute 9, 35, 91-94, 96, 188
\r
13055 Handle Name 6, 7, 10, 35, 98, 100, 105, 106, 188, 198
\r
13056 Intel i, ii, 1, 5, 57, 58
\r
13057 Interrupt Vector 12, 15, 21, 30, 199, 204, 205
\r
13058 LIM 1, 7, 13, 19, 27, 53, 55, 138, 140, 206, 207
\r
13059 Logical Page 1, 5, 12, 16, 19, 23, 28, 31, 32, 46-48,
\r
13060 80-83, 85, 86, 88, 110, 111, 115, 116, 120, 122,
\r
13061 123, 125, 126, 128, 129, 131, 147, 194, 196, 207,
\r
13063 Logical Page/Physical Page Method 82
\r
13064 Logical Page/Segment Address Method 85
\r
13065 Lotus i, ii, 1, 5, 57, 58
\r
13066 Map Register 10, 13, 36, 53, 55, 151, 153-155, 157-159,
\r
13067 161, 163-168, 170, 173, 175, 179, 182, 190, 197,
\r
13069 Map/Unmap Handle Pages 46
\r
13070 Map/Unmap Multiple Handle Pages 9, 35, 80, 82, 85
\r
13071 Mapping and Unmapping Multiple Pages Simultaneously 80
\r
13072 Mapping Multiple Pages 6, 80
\r
13073 Microsoft i, ii, 1, 5, 14, 30, 42, 57, 58, 144, 148
\r
13074 Move Memory Region 35, 120, 121, 189
\r
13075 Move/Exchange Memory Region 7, 10, 120, 126
\r
13076 Open Handle 64, 102, 199, 200, 203, 204
\r
13077 Operating System 3, 8, 10-12, 42, 43, 59, 63, 107, 138,
\r
13078 139, 141, 142, 144-151, 153-159, 161-163, 165-171,
\r
13079 173-177, 179-183, 185, 186, 190, 191, 198, 206,
\r
13081 Page Frame 1-6, 14, 17-19, 24, 28, 31, 34, 38, 39, 47,
\r
13082 53, 55, 121, 128, 133, 187, 213
\r
13083 Page Map 7, 9, 10, 13, 34, 35, 50, 53, 55, 65, 67, 69,
\r
13084 71, 73-76, 78, 109, 113, 118, 139, 153-155, 158,
\r
13085 187, 188, 189, 211
\r
13086 Page Mapping Register I/O Array 57
\r
13087 Page Translation Array 58
\r
13088 Physical Page 1, 5, 6, 8, 10, 12, 16, 23, 28, 31, 35,
\r
13089 46, 47, 48, 80-83, 85, 109-112, 114-117, 132-134,
\r
13090 136, 138, 139, 142, 147, 188, 194, 207, 209, 213
\r
13091 Prepare Expanded Memory Hardware For Warm Boot 10, 177
\r
13092 Raw Handle 147, 149, 150, 206, 207
\r
13093 Raw Page 36, 142, 143, 147, 189, 206
\r
13094 Reallocate Pages 9, 35, 43, 88, 144, 145, 148, 208
\r
13095 Restore Page Map 9, 13, 34, 50, 53, 55
\r
13096 Return Access Key 185
\r
13097 Save Page Map 9, 13, 34, 50, 53, 55
\r
13105 Search For Named Handle 7, 35, 105
\r
13106 Set Alternate Map Register Set 36, 153-155, 157, 158,
\r
13108 Set Handle Attribute 9, 35, 91, 92, 94, 96
\r
13109 Set Handle Name 7, 10, 35, 98, 100
\r
13110 Set Page Map 9, 13, 35, 65, 67, 69, 71, 188
\r
13111 Set Partial Page Map 9, 13, 35, 73, 76, 78
\r
13112 Standard Handle 146
\r
13113 Standard Page 147
\r
13114 System DMA Capabilities 151
\r
13116 Unmapping Multiple Pages 6, 80
\r
13160 \1a \15Mµ
\14\ ep
\0\0ALLINFO.TXT
\0\0\r
13161 Following are BBSes that are members of DV-NET. DV-Net is an informal
\r
13162 network of BBS's that carry files that would be useful to DESQview users.
\r
13163 Not all BBSes that carry the DESQview conference are members of DV-Net.
\r
13165 All address are NetMail addresses.
\r
13167 ----------------------------------------------
\r
13168 DVNet DESQview Support File Network
\r
13169 ----------------------------------------------
\r
13170 DESQview is a trademark of Quarterdeck Office Systems
\r
13171 -----------------------------------------------------------
\r
13172 DVNet is not affiliated with Quarterdeck Office Systems
\r
13173 ----------------------------------------------------------------
\r
13175 Name, City and State NetAddress Telephone Maxbaud
\r
13176 ------------------------------- ---------- ------------ -------
\r
13177 *65'North, Fairbanks, AK 1:17/38 907-452-1460 9600HSTV32
\r
13178 Opus 386, Davis, CA 1:203/910 916-753-6321 2400
\r
13179 Carl's Corner, San Jose, CA 1:10/1 408-248-9704 9600HSTV32
\r
13180 Carl's Corner, San Jose, CA 1:10/2 408-248-0198 2400
\r
13181 SeaHunt BBS, Burlingame, CA 1:125/20 415-344-4348 9600HST
\r
13182 Stingray!, Clovis CA 1:205/12 209-298-9461 9600HST
\r
13183 SF PCUG BBS, San Francisco CA 1:1/310 415-621-2609 9600HSTV32RE
\r
13184 Bink of an Aye, Portland, OR 1:105/42 503-297-9043 9600PEPV32MO
\r
13185 P C Support, Portland, OR 1:105/66 503-297-9078 2400
\r
13186 Atarian BBS, Portland, OR 1:105/10 503-245-9730 9600HSTV32
\r
13187 Busker's BoneYard, Portland,OR 1:105/14 503-771-4773 9600PEP
\r
13188 Busker's Boneyard, Portland,OR 1:105/41 503-775-7926 9600HSTV32
\r
13189 Pacifier BBS, Vancouver, WA 1:105/103 206-253-9770 9600HSTV32
\r
13190 Puget Sound Gtwy., Puyallup, WA 1:138/3 206-566-8854 9600HST
\r
13191 Rampart General,Kansas City,MO 1:280/6 816-761-4039 9600HST
\r
13192 Oregon Trail XRoads, Casper WY 1:303/5 307-472-3615 9600H96
\r
13193 Dawg Byte, Nashville, TN 1:116/29 615-385-4268 9600HST
\r
13194 Dickson County, Dickson, TN 1:116/25 615-446-4475 2400
\r
13195 Programmers' Attic, Will., MI 1:159/850 517-655-3347 2400
\r
13196 Dark Side Of the Moon,Savoy IL 1:233/493 217-356-6922 9600HSTV32
\r
13197 Ecclesia Place, Monroeville, PA 1:129/75 412-373-8612 9600HST
\r
13198 The Other BBS, Harrisburg PA 1:270/101 717-657-2223 9600HST
\r
13199 IBM Tech Fido, Pepperell, MA 1:322/1 508-433-8452 9600HSTV32
\r
13200 Waystar BBS, Marlborough, MA 1:322/14 508-481-7147 9600HST
\r
13201 Andromeda Galaxy, Troy NY 1:267/167 518-273-8313 9600HST
\r
13202 Treasure Island, Danbury, CT 1:141/730 203-791-8532, 9600HST
\r
13203 Addict's Attic,Germantown MD 1:109/423 301-428-8998 9600HST
\r
13204 Maple Shade Opus,Maple Shade NJ 1:266/12 609-482-8604 9600HSTV32
\r
13205 Capital City , Burlington NJ 99:9230/1 609-386-1989 9600HSTV32
\r
13206 Capital City , Burlington NJ 8:950/10 609-386-1989 9600HSTV32
\r
13207 Southern Cross BBS, Miami FL 1:135/69 305-220-8752 9600HST
\r
13208 Software Designer, Albany, GA 1:3617/1 912-432-2440 9600HSTV32
\r
13209 Software Designer, Albany, GA 8:928/1 912-432-2440 9600HSTV32
\r
13210 Dragon's Lair, Galveston, TX 1:386/451 409-762-2761 9600HST
\r
13211 Dragon's Lair, Galveston, TX 1:386/1451 409-762-7456 2400MNP
\r
13212 Conch Opus, Houston, TX 1:106/357 713-667-7213 2400PCP
\r
13213 Inns of Court, Dallas, TX 1:124/6101 214-458-2620 9600HSTV32
\r
13214 Dallas Email, Dallas, TX 8:930/101 214-358-1205 9600HSTV32MO
\r
13215 Spare Parts, Bedford, TX 1:130/38 817-540-3527 9600HST
\r
13216 QE2, Austin TX 1:382/58 512-328-1229 2400
\r
13217 Ned's Opus HST Ottawa,ON Canada 1:163/211 613-523-8965 9600HST
\r
13218 Ned's Opus, Ottawa ON Canada 1:163/210 613-731-8132 2400
\r
13219 Imperial Terran, St Cath,ON 1:247/102 416-646-7105 9600HST
\r
13220 Arcane BBS, Laval PQ Canada 1:167/116 514-687-9586 9600HST
\r
13222 ------------------------------ --------- ------------- -------
\r
13223 The HEKOM Board (Netherlands) 2:286/3 31-3483-4072 2400MNP5
\r
13224 BBS_D.C.V.V., Maaseik (Belgium) 2:295/26 32-11-568620