#include UInt32 PilotMain(UInt16 cmd, void *cmdPBP, UInt16 launchFlags) { EventType event; if(cmd != sysAppLaunchCmdNormalLaunch) return 0; WinDrawChars("Hello, World!",13,50,50); do { EvtGetEvent(&event,evtWaitForever); SysHandleEvent(&event); /* ..... */ } while (event.eType != appStopEvent); }