home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c222 / 1.ddi / SOURCE / IBMLIB / DX86_O / MODEL.M < prev    next >
Encoding:
Text File  |  1990-05-01  |  1.4 KB  |  59 lines

  1. ; Set the memory model here.
  2. ; 1. Chose Small_code or Large_code.
  3. ; 2. Choose Small_data or Large_data.
  4. ; 3. IF YOU CHOSE Large_data, choose DS_grouped or not.
  5.  
  6. ;Use next line if Small_code; use 2nd if Large.
  7. Large_code    equ    1    ; Many CSs.
  8. ;Small_code    equ    1    ; CS is fixed.
  9.  
  10. ; This defines the memory model:  small vs. large data.
  11. ; For large data, use the next line; for small, the second.
  12. ;Large_data    equ    1    ; ES & SS separate; DS may or may not vary.
  13. Small_data    equ    1    ; DS=SS=ES.
  14.  
  15. ifdef    Small_data
  16. DS_grouped    equ    1
  17. else
  18. ; Is DS grouped or does it vary?    Choose this only in Large_data model.
  19. ; You choose, in large data case, whether DS is grouped.
  20. ;DS_grouped    equ    1
  21. endif
  22.  
  23. ; Provide the appropriate external definition:
  24. ifdef    Small_code
  25.     ifdef    Small_data
  26.             extrn    SMALL?:near
  27.     else
  28.         ifdef    DS_grouped
  29.             extrn    COMPACT?:near
  30.         else
  31.             extrn    UNSUPPORTED_MODEL?:near
  32.         endif
  33.     endif
  34. else
  35.     ifdef    Small_data
  36.             extrn    MEDIUM?:near
  37.     else
  38.         ifdef    DS_grouped
  39.             extrn    BIG?:near
  40.         else
  41.             extrn    LARGE?:near
  42.         endif
  43.     endif
  44. endif
  45.  
  46. ; There are 6 possible libraries:
  47. ; 1 CS        1 DS    1 SS=ES=DS    ; Small
  48. ; Many CS    1 DS    1 SS=ES=DS      ; Medium
  49. ; 1 CS        1 DS    1 SS,Many ES    ; Compact
  50. ; Many CS    1 DS    1 SS,Many ES    ; Big
  51. ; 1 CS        Many DS    1 SS,Many ES    ; Semi-Giant; strange; support?
  52. ; Many CS    Many DS    1 SS,Many ES    ; Giant
  53. ; Not supported:
  54. ; 1 CS        1 DS    1 SS,1 ES    ; No one supports this.
  55. ; Many CS    1 DS    1 SS,1 ES    ; " "
  56.  
  57.     include    macros
  58.  
  59.