compiler/clib: Remove usage of acb_environptr field outside __arosc_environ.c
[AROS.git] / test / clib / jmpbuf.c
blob84e0932f653b64614472ce586bba0af03607c1cd
1 #include <exec/tasks.h>
2 #include <proto/exec.h>
4 #include <setjmp.h>
5 #include <stdio.h>
7 jmp_buf buf;
9 static void HexDump(const UBYTE *data, ULONG count)
11 ULONG t, end;
13 end = (count + 15) & -16;
15 for (t=0; t<end; t++)
17 if ((t&15) == 0)
18 printf("0x%08X:", (unsigned)t);
20 if ((t&3) == 0)
21 printf(" ");
23 if (t < count)
24 printf("%02x", ((UBYTE *)data)[t]);
25 else
26 printf(" ");
28 if ((t&15) == 15)
30 printf("\n");
33 } /* hexdump */
35 int main(void)
37 struct Task *me;
39 setjmp(buf);
41 me = FindTask(NULL);
42 printf("Task 0x%p (%s), stack 0x%p - 0x%p\n", me, me->tc_Node.ln_Name, me->tc_SPLower, me->tc_SPUpper);
43 printf("Function at 0x%p\n", main);
44 printf("Buffer at 0x%p (%u bytes)\n", buf, (unsigned int)sizeof(buf));
46 HexDump((const UBYTE *)buf, sizeof(buf));
48 return 0;