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

  1. /* Display the Devices in the system */
  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. liboff = 350
  13. nodebase = import(offset(execbase, liboff), 4)
  14.  
  15. 'd "  Address NT Pri Open Name"'
  16. do while(import(nodebase,4) ~= "00000000"x)
  17.    nt      = right(c2d(import(offset(nodebase,8),1),1),3)
  18.    pri     = right(c2d(import(offset(nodebase,9),1),1),4)
  19.    namestr = import(import(offset(nodebase,10),4))
  20.    opencnt = right(c2d(import(offset(nodebase,32),2),2),5)
  21.    'd "$'||c2x(nodebase)||nt||pri||opencnt||' \"'||namestr||'\""'
  22.    nodebase = import(nodebase,4)
  23. end
  24.