Und so sieht das aus wenn man "Hallo Welt" für PC bzw. PSP in der Programmiersprache C schreibt!
Beispiel für PC
/* main.c */
#include < stdio.h >int main (void) {
printf("Hallo Welt\n");
return 0;
}
Beispiel für PSP
/* main.c */
#include < pspdebug.h >
#include < pspkernel.h > // pspkernel Bibliothek ( Ist immer notwendig!)PSP_MODULE_INFO("Hello World", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);#define printf pspDebugScreenPrintf
int main() { //hiermit beginnt das Hauptprogramm
pspDebugScreenInit();
printf("Hallo Welt\n"); //Ausgabe von "Hallo Welt" auf dem Bildschirm
sceKernelSleepThread();
return 0; //dieser Code sorgt dass sich das Programm beendet
} //hiermit endet das Hauptprogramm
/* Makefile */
TARGET = Hallo
OBJS = main.oINCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)LIBS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hallo Welt
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
EDIT: Beschreibung der Codes folgt!