home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19065 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.4 KB

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!nigel.msen.com!hela.iti.org!cs.widener.edu!dsinc!bagate!cbmvax!mks
  2. From: mks@cbmvax.commodore.com (Michael Sinz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Determing if an address is in chip mem.
  5. Message-ID: <38710@cbmvax.commodore.com>
  6. Date: 21 Jan 93 15:30:16 GMT
  7. References: <C15w6v.7zH@gabriel.keele.ac.uk>
  8. Reply-To: mks@cbmvax.commodore.com (Michael Sinz)
  9. Organization: Commodore, West Chester, PA
  10. Lines: 31
  11.  
  12. u0g78@keele.ac.uk (Martin Steed) writes:
  13. >
  14. >Hi there,
  15. >
  16. >Is there an easy way to determine if a given data reference is in chip or
  17. >fast ram.
  18.  
  19. Yes.  It is the EXEC call TypeOfMem().
  20.  
  21. So...
  22.  
  23.     if (TypeOfMem(address) & MEMF_CHIP)
  24.     {
  25.         /* We are in CHIP memory */
  26.     }
  27.     else
  28.     {
  29.         /* We are not in CHIP memory */
  30.     }
  31.  
  32. See AutoDOC for more information.  TypeOfMem() returns the memory attributes
  33. for the memory range given.  TypeOfMem() will return 0 is the address is
  34. not in the memory lists.
  35.  
  36. /----------------------------------------------------------------------\
  37. |      /// Michael Sinz  -  Senior Amiga Systems Engineer              |
  38. |     ///                   Operating System Development Group         |
  39. |    ///   BIX:  msinz      UUNET:  mks@cbmvax.commodore.com           |
  40. |\\\///                                                                |
  41. | \XX/                      Eloquence is vehement simplicity           |
  42. \----------------------------------------------------------------------/
  43.