This repository has been archived on 2025-02-12. You can view files and clone it, but cannot push or open issues or pull requests.
pic32-newlib/newlib/libgloss/mt/exit-ms2.c
2009-02-02 03:03:19 +00:00

12 lines
289 B
C

#include <_ansi.h>
#include <sys/types.h>
#include <sys/stat.h>
void _exit (n)
{
// Set bit #0 in the _DEBUG_HALT_REG to trigger program exit to
// the simulator. (The simulator will return a SIGQUIT signal.)
asm("ori r1, r0, #$1\n");
asm("stw r1, r0, #$fffff300\n");
} // exit