home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / debug / prot0 / Prot0 (.txt) next >
Encoding:
RISC OS BBC BASIC V Source  |  1993-02-25  |  549 b   |  20 lines

  1.  >Prot0
  2.  By Brian.Brunswick@uk.ac.cam.cl
  3.  Protects 'Zero Page' (0-&8000) on the Arc from user code
  4.  when your code locks up your machine - run Prot0, and then try again:
  5.  odds are you'll get an address exception, and your task will die
  6.  without taking the desktop with it.
  7. "OS_ReadMemMapInfo" 
  8.  pagesize,pages
  9.  p (pages+1)*12
  10.  I=0 
  11.  pages-1
  12. p!(I*12)=I
  13. p!(pages*12)=-1
  14. "OS_ReadMemMapEntries",p
  15.  I=0 
  16.  pages-1
  17.  p!(I*12+4)=0 
  18.  p!(I*12+8)=1
  19. "OS_SetMemMapEntries",p
  20.