PAlib
Text/Normal/HelloWorld/source/main.c
// Hello World Program //
// Lines starting with two slashes are ignored by the compiler
// Basically you can use them to comment what are you doing
// In fact, this kind of lines are called comments :P
// Include PAlib so that you can use it
#include <PA9.h>
int main(){
// Initialize PAlib
PA_Init();
// Load the default text font
PA_LoadDefaultText(1, // Top screen
2); // Background #2
// Write the text "Hello World"
PA_OutputSimpleText(1, // Top screen
1, // X position 1*8 = 8
1, // Y position 1*8 = 8
"Hello World");
// Infinite loop to keep the program running
while(true){
// Wait until the next frame.
// The DS runs at 60 frames per second.
}
}
static void PA_WaitForVBL()
Wait for the VBlank to occur.
Definition PA_General.h:286
u16 PA_OutputSimpleText(u8 screen, u16 x, u16 y, const char *text)
Output simple text on the DS screen. Works only in modes 0-2. Much faster than PA_OutputText,...
void PA_LoadDefaultText(u8 screen, u8 bg_select)
Load and initialize the default text. Works only in modes 0-2.