|
Last change
on this file was
444,
checked in by satin@…, 7 years ago
|
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
|
File size:
342 bytes
|
| Line | |
|---|
| 1 | #include "setarch.h" |
|---|
| 2 | |
|---|
| 3 | /* `sleep' is passed an argument in r0 that indicates the reason |
|---|
| 4 | the program is exiting. The format of r0 is defined in |
|---|
| 5 | devo/include/wait.h. */ |
|---|
| 6 | |
|---|
| 7 | /* extern void _exit (int rc); */ |
|---|
| 8 | |
|---|
| 9 | .section .text |
|---|
| 10 | .align 2 |
|---|
| 11 | .global __exit |
|---|
| 12 | __exit: |
|---|
| 13 | mov.w #0xdead,r1 |
|---|
| 14 | mov.w #0xbeef,r2 |
|---|
| 15 | mov.b r0l,r0h |
|---|
| 16 | sub.b r0l,r0l |
|---|
| 17 | sleep |
|---|
Note: See
TracBrowser
for help on using the repository browser.