For a school project, I want to get (very basic) assembly code to run on the 3DS. I'm not very familiar with C and I'm not sure how to implement in-line ASM without getting errors. Here's the Hello World C code I'm using:
Any ideas? I saw that the PastaCFW source code had external .asm files, but I'm not sure how they were called in the C code. Simply moving a value to eax would suffice!
Code:
#include <string.h>
#include <3ds.h>
#include <stdio.h>
int main()
{
gfxInitDefault();
consoleInit(GFX_TOP, NULL);
printf("Hello world\n");
// Main loop
while (aptMainLoop())
{
gspWaitForVBlank();
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_START)
break; //Break in order to return to hbmenu
// Flush and swap frame-buffers
gfxFlushBuffers();
gfxSwapBuffers();
}
gfxExit();
return 0;
}
Any ideas? I saw that the PastaCFW source code had external .asm files, but I'm not sure how they were called in the C code. Simply moving a value to eax would suffice!