aboutsummaryrefslogtreecommitdiff
path: root/libgloss/mt/exit-ms2.c
blob: 93a3f852b2c2e93e4aec3f4979ab2402bf2ad4fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#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