added concrete implementations of putc(), getc(), getchar() and gets()
[tangerine.git] / arch / .unmaintained / amiga / boot / showvecs.c
blobaeb859dfcc79c62c91b6e82c1a752e7feee1bc36
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: prints Kick Vector pointers
6 Lang: english
7 */
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>
15 #include <stdio.h>
17 extern struct ExecBase *SysBase;
19 const UBYTE ver[] = "$VER: showvecs 41.2 (14.3.1997)\n\r";
21 int main(void)
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)
30 ULONG *list;
32 Printf("Modules in use:\n");
34 list = SysBase->KickTagPtr;
36 while(*list)
38 if(*list & 0x80000000) list = (ULONG *)(*list & 0x7fffffff);
39 Printf("\t0x%08lx\t%s\n", *list, (ULONG)((struct Resident *)*list)->rt_IdString);
40 list++;
44 if(SysBase->KickMemPtr)
46 struct MemList *memlist;
48 Printf("MemLists in use:\n");
50 memlist = (struct MemList *)SysBase->KickMemPtr;
52 while(memlist)
54 struct MemEntry *me = &memlist->ml_ME[0];
55 UWORD i;
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;
70 else
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");
77 return(0);