Add hello world test ROM

This commit is contained in:
wheremyfoodat 2022-09-18 04:54:34 +03:00
parent 36453629d5
commit 7dc2b37c5a
3 changed files with 231 additions and 2 deletions

View file

@ -0,0 +1,20 @@
#include <3ds.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv) {
// Put the string on the heap to make sure heap initialization works
const char* buffer = calloc(6969, sizeof(char));
strcpy(buffer, "Hello world\n");
svcOutputDebugString(buffer, strlen(buffer));
// I hate C's UB rules around infinite loops
while (true) {
__asm__ volatile ("" ::: "memory");
}
return 0;
}