mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
Add hello world test ROM
This commit is contained in:
parent
36453629d5
commit
7dc2b37c5a
3 changed files with 231 additions and 2 deletions
20
test_roms/HelloWorldSVC/source/main.c
Normal file
20
test_roms/HelloWorldSVC/source/main.c
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue