Created
October 30, 2018 00:11
-
-
Save thrimbor/f917c9476fc787351d812626d3023891 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Expected output: | |
// r=0 | |
// r=1 | |
#include <xboxrt/debug.h> | |
#include <pbkit/pbkit.h> | |
#include <hal/xbox.h> | |
#include "stdio.h" | |
#include <setjmp.h> | |
void test() | |
{ | |
jmp_buf buf; | |
int r = setjmp(buf); | |
debugPrint("r=%d\n", r); | |
if (r == 0) | |
longjmp(buf, 0); | |
} | |
void main(void) | |
{ | |
int i; | |
switch(pb_init()) | |
{ | |
case 0: break; | |
default: | |
XSleep(2000); | |
XReboot(); | |
return; | |
} | |
pb_show_debug_screen(); | |
test(); | |
while(1) { | |
XSleep(2000); | |
} | |
pb_kill(); | |
XReboot(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment