2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 #include <exec/execbase.h>
7 #include <exec/resident.h>
13 extern struct ExecBase
*SysBase
;
15 const UBYTE ver
[] = "$VER: printresmodules 41.2 (15.3.1997)\n\r";
16 const UBYTE nul
[] = "(null)";
25 for(i
= 1, ptr
= SysBase
->ResModules
; *ptr
; i
++, ptr
++)
27 if(*ptr
& 0x80000000) ptr
= (ULONG
*)(*ptr
& 0x7fffffff);
30 struct Resident
*res
= (struct Resident
*)*ptr
;
32 Printf("%2lu: 0x%08lx %4ld ", i
, *ptr
, res
->rt_Pri
);
33 ResType(res
->rt_Flags
);
34 Printf("%s\n", (ULONG
)res
->rt_Name
? (ULONG
)res
->rt_Name
: (ULONG
)&nul
);
41 void ResType(UBYTE type
)
45 if (type
== RTF_AUTOINIT
)
47 PutStr(" RTF_AUTOINIT "); i
++;
50 if (type
== RTF_SINGLETASK
)
52 PutStr(" RTF_SINGLETASK "); i
++;
56 if (type
& RTF_COLDSTART
) { PutStr("RTF_COLDSTART "); i
++; }
57 if (type
& RTF_AUTOINIT
) { PutStr("RTF_AUTOINIT "); i
++; }
58 if (type
& RTF_AFTERDOS
) { PutStr("RTF_AFTERDOS "); i
++; }
59 if (type
& RTF_SINGLETASK
) { PutStr("RTF_SINGLETASK "); i
++; }