home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / asm / 80x0393 / umb.txt < prev    next >
Encoding:
Text File  |  1993-05-27  |  1.8 KB  |  61 lines

  1. (7599)  Thu 20 May 93 11:25a
  2. By: Wilbert van Leijen
  3. To: Terry Carmen
  4. Re: high memory
  5. St: Rcvd                                                                  <5794
  6. ---------------------------------------------------------------------------
  7. @MSGID: 2:281/256.14 2bfb6b87
  8. @REPLY: 1:260/338@Fidonet 440ccf51
  9. @PID: GE 1/b8
  10. 16 May 93, Terry Carmen writes to All:
  11.  
  12.  TC> Does anybody know how to get a memory manager (QEMM, 386MAx, EMM386, etc.)
  13.  TC> to give the location or size of available high memory blocks?
  14.  
  15. Since these memory managers are also XMS servers, use the XMS interface via INT
  16. 2Fh, AH=43h.  Here's a snippet of code from a TSR I wrote:
  17.  
  18. ;  Check presence of an XMS driver
  19. ;  (such as HIMEM or QEMM386)
  20.  
  21. XMSCheck:  MOV     AX, 4300h
  22.            INT     2Fh
  23.            CMP     AL, 80h
  24.            JNE     NoXMS
  25.            MOV     AL, 10h
  26.            INT     2Fh
  27.            MOV     Word Ptr [XMSDriver], BX
  28.            MOV     Word Ptr [XMSDriver+2], ES
  29.  
  30. ;  Allocate upper memory block to store alternative font in
  31.  
  32.            MOV     AH, 10h
  33.            MOV     DX, 4096 / 16
  34.            CALL    [XMSDriver]
  35.            OR      AL, AL
  36.            JZ      NoXMS
  37.  
  38.            XOR     AX, AX
  39.            MOV     Word Ptr [NewORG+AltFontPtr], AX
  40.            MOV     Word Ptr [NewORG+AltFontPtr+2], BX
  41.            CLD
  42.  
  43. ;  Copy alternative font into the UMB
  44.  
  45.            MOV     SI, Offset NewORG+AltFont
  46.            MOV     ES, BX
  47.            XOR     DI, DI
  48.            MOV     CX, 4096 / 2
  49.            REP     MOVSW
  50.            MOV     [FontUpper], 1
  51.            JMP     Short Activate
  52.  
  53. NoXMS:
  54.  
  55. Wilbert
  56.  
  57. --- GEcho 1.00/beta
  58.  * Origin: Charge of the Light Bregade (2:281/256.14)
  59.  
  60. @PATH: 281/256 1 280/0 28/777 500/1 105/42 334 138/112 13/13 260/1
  61.