#include <mil.h>
int MosMain(void)
{
MIL_ID MilApplication,
MilSystem,
MilDisplay,
MilImage;
MappAllocDefault(M_DEFAULT, &MilApplication, &MilSystem,
&MilDisplay, M_NULL, &MilImage);
if (!MappGetError(M_GLOBAL, M_NULL))
{
MgraColor(M_DEFAULT, 0xF0);
MgraFont(M_DEFAULT, M_FONT_DEFAULT_LARGE);
MgraText(M_DEFAULT, MilImage, 160L, 230L, MIL_TEXT(" Welcome to MIL !!! "));
MgraColor(M_DEFAULT, 0xC0);
MgraRect(M_DEFAULT, MilImage, 100L, 150L, 530L, 340L);
MgraRect(M_DEFAULT, MilImage, 120L, 170L, 510L, 320L);
MgraRect(M_DEFAULT, MilImage, 140L, 190L, 490L, 300L);
MosPrintf(MIL_TEXT("\nSYSTEM ALLOCATION:\n"));
MosPrintf(MIL_TEXT("------------------\n\n"));
MosPrintf(MIL_TEXT("System allocation successful.\n\n"));
MosPrintf(MIL_TEXT(" \"Welcome to MIL !!!\"\n\n"));
}
else
MosPrintf(MIL_TEXT("System allocation error !\n\n"));
MosPrintf(MIL_TEXT("Press <Enter> to end.\n"));
MosGetch();
MappFreeDefault(MilApplication, MilSystem, MilDisplay, M_NULL, MilImage);
return 0;
}