2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: prints Kick Vector pointers
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <exec/resident.h>
12 #include <exec/memory.h>
13 #include <proto/dos.h>
14 #include <proto/exec.h>
17 extern struct ExecBase
*SysBase
;
19 const UBYTE ver
[] = "$VER: showvecs 41.2 (14.3.1997)\n\r";
23 Printf("KickTagPtr = 0x%08lx\nKickMemPtr = 0x%08lx\nKickChkSum = 0x%08lx\n",
24 (ULONG
)SysBase
->KickTagPtr
, (ULONG
)SysBase
->KickMemPtr
, (ULONG
)SysBase
->KickCheckSum
);
26 if(SumKickData() == (ULONG
)SysBase
->KickCheckSum
)
28 if(SysBase
->KickTagPtr
)
32 Printf("Modules in use:\n");
34 list
= SysBase
->KickTagPtr
;
38 if(*list
& 0x80000000) list
= (ULONG
*)(*list
& 0x7fffffff);
39 Printf("\t0x%08lx\t%s\n", *list
, (ULONG
)((struct Resident
*)*list
)->rt_IdString
);
44 if(SysBase
->KickMemPtr
)
46 struct MemList
*memlist
;
48 Printf("MemLists in use:\n");
50 memlist
= (struct MemList
*)SysBase
->KickMemPtr
;
54 struct MemEntry
*me
= &memlist
->ml_ME
[0];
57 Printf("ml_NumEntries = %ld\n", memlist
->ml_NumEntries
);
59 for(i
= 0; i
< memlist
->ml_NumEntries
; i
++)
61 Printf("ml_ME[%2ld] = 0x%08lx size 0x%08lx (%8ld)\n",
62 i
, (ULONG
)me
->me_Addr
, me
->me_Length
, me
->me_Length
);
63 me
= (struct MemEntry
*)((ULONG
)me
+ (ULONG
)sizeof(struct MemEntry
));
66 memlist
= (struct MemList
*)memlist
->ml_Node
.ln_Succ
;
72 /* Don't print message if all vectors are NULL */
73 if(SysBase
->KickMemPtr
|| SysBase
->KickTagPtr
|| SysBase
->KickCheckSum
)
74 Printf("Vectors have incorrect checksum.\n");