Cygwin: access: Fix X_OK behaviour for backup operators and admins
[newlib-cygwin.git] / newlib / libc / sys / h8500hms / crt0.c
blobfa7d1b93c9b38b4f1d07e708118b4b055a2146f4
2 extern char _start_bss;
3 extern char end;
4 extern char stack;
6 static zeroandrun();
7 #pragma noprolog
9 start()
11 asm("mov.w #%off(_stack),sp");
12 /* asm("ldc.w #0x700,sr");*/
13 asm("ldc.b #%page(_stack),tp");
14 asm("ldc.b #%page(_stack),dp");
15 asm("ldc.b #%page(_stack),ep");
16 /* Can't have anything else in here, since the fp won't be set up
17 so local variables won't work */
18 zeroandrun();
21 static
22 zeroandrun()
24 char *p;
25 p = &_start_bss;
26 while (p < &end)
28 *p++ = 0;
30 main();
31 _exit();