home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / doc / ems / disk3 / emm28_e.asm < prev    next >
Assembly Source File  |  1989-11-29  |  4KB  |  82 lines

  1. ;-----------------------------------------------------------------------------;
  2. ;      MODULE NAME:   EMM28_E.ASM                                             ;
  3. ;                                                                             ;
  4. ; OS FUNCTION NAME:   dealloc_alt_reg_set                                     ;
  5. ;                                                                             ;
  6. ;      DESCRIPTION:   This function returns the alternate map register set to ;
  7. ;                     the memory manager for future use.  The memory manager  ;
  8. ;                     may then reallocate the alternate map register set when ;
  9. ;                     needed.  This function also makes the mapping context   ;
  10. ;                     of the alternate map register specified unavailable for ;
  11. ;                     reading or writing (unmapping). This protects the pages ;
  12. ;                     previously mapped in an alternate map register set by   ;
  13. ;                     making them inaccessible.  Note that the current        ;
  14. ;                     alternate map register set cannot be deallocated.  This ;
  15. ;                     makes all memory which was currently mapped into        ;
  16. ;                     conventional and expanded memory inaccessible.          ;
  17. ;                                                                             ;
  18. ;           PASSED:   alt_reg_set:                                            ;
  19. ;                        is the number of the alternate map register set to   ;
  20. ;                        deallocate.  Map register set zero cannot be         ;
  21. ;                        allocated or deallocated.  However, if alternate map ;
  22. ;                        register set zero is specified and this function is  ;
  23. ;                        invoked, no error will be returned.  The function    ;
  24. ;                        invocation is ignored in this case.                  ;
  25. ;                                                                             ;
  26. ;         RETURNED:   status:                                                 ;
  27. ;                        is the status EMM returns from the call.  All other  ;
  28. ;                        returned results are valid only if the status        ;
  29. ;                        returned is zero.  Otherwise they are undefined.     ;
  30. ;                                                                             ;
  31. ; C USE CONVENTION:   unsigned int status;                                    ;
  32. ;                     unsigned int alt_reg_set;                               ;
  33. ;                                                                             ;
  34. ;                     status = dealloc_alt_reg_set (alt_reg_set);             ;
  35. ;-----------------------------------------------------------------------------;
  36. .XLIST
  37. PAGE    60,132
  38.  
  39. IFDEF SMALL
  40.    .MODEL SMALL, C
  41. ENDIF
  42. IFDEF MEDIUM
  43.    .MODEL MEDIUM, C
  44. ENDIF
  45. IFDEF LARGE
  46.    .MODEL LARGE, C
  47. ENDIF
  48. IFDEF COMPACT
  49.    .MODEL COMPACT, C
  50. ENDIF
  51. IFDEF HUGE
  52.    .MODEL HUGE, C
  53. ENDIF
  54.  
  55. INCLUDE emmlib.equ
  56. INCLUDE emmlib.str
  57. INCLUDE emmlib.mac
  58. .LIST
  59. .CODE
  60.  
  61. dealloc_alt_reg_set    PROC                                                  \
  62.             alt_reg_set:WORD
  63.  
  64.     ;---------------------------------------------------------------------;
  65.     ;   do;                                                               ;
  66.     ;   .   deallocate an alternate map register set previously           ;
  67.     ;   .   allocated from EMM;                                           ;
  68.     ;---------------------------------------------------------------------;
  69.     MOVE        AX, deallocate_alt_map_regs_fcn
  70.     MOVE        BX, alt_reg_set
  71.     INT         EMM_int
  72.  
  73.     ;---------------------------------------------------------------------;
  74.     ;   .   return (EMM status);                                          ;
  75.     ;   end;                                                              ;
  76.     ;---------------------------------------------------------------------;
  77.     RET_EMM_STAT    AH
  78.  
  79. dealloc_alt_reg_set        ENDP
  80.  
  81. END
  82.