home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / rexx / mods.cpr < prev    next >
Encoding:
Text File  |  1996-12-24  |  650 b   |  24 lines

  1. /* Display system resident modules */
  2. address 'COMMAND'
  3. 'version >nil: exec.library 36 '
  4. lrc = rc
  5.  
  6. if (rc = 0) then
  7.   check = addlib('rexxsupport.library',0,-30,0) 
  8.  
  9. address
  10.  
  11. execbase = next("00000004"x)
  12. reslist  = import(offset(execbase,300),4)
  13. 'd "Address   Pri Type Name"'
  14. do forever
  15.    mod = import(reslist,4)
  16.    if mod = "00000000"x then leave
  17.    priority = right(c2d(import(offset(mod,13),1),1),4)
  18.    type     = right(c2d(import(offset(mod,12),1),1),3)
  19.    name     = import(import(offset(mod,18),4))
  20.    name     = strip(translate(name,"0a"x,"0d"x),'t', "0a"x)
  21.    'd "$'||c2x(mod) priority type name'"'
  22.    reslist = offset(reslist,4)
  23. end
  24. exit(0)