Пример #1
0
void main()
{
  int x = 1;
  int y = do2(x);
  assert(y==1);
  x = -x;
  int z = do1(x);
  assert(-1<=z && z<=1);
}
Пример #2
0
u8 internet_access(u8 upDown, int slot, t_stinf *state, u8 *dest, u8 timeout)
{
	Result ret;
	ret=fsInit();
	sdmcArchive=(FS_archive){0x00000009, (FS_path){PATH_EMPTY, 1, (u8*)""}};
	FSUSER_OpenArchive(NULL, &sdmcArchive);
	ret=SOC_Initialize((u32*)memalign(0x1000, 0x100000), 0x100000);
	sprintf(currentPath, "/");
	currentIP=(u32)gethostid();
	listenfd=-1;
        u8 do1(u8 upDown, int slot, t_stinf *state, u8 *dest, u8 timeout);
        return do1(upDown, slot, state, dest, timeout);
}
Пример #3
0
cDo()
{
	printf(str3,0x0b14,41);
	while (buffer1 < 9)
	{	
		getch(&order[buffer1]);
		if (order[buffer1] == '1' || order[buffer1] == '2' || order[buffer1] == '3' || order[buffer1] == '4'|| order[buffer1] == '5'|| order[buffer1] == '6'|| order[buffer1] == '7'|| order[buffer1] == '8' || order[buffer1] == '9')
		{
			putch(order[buffer1]);
			buffer1++;	
		}
		else if (order[buffer1] == '\r') break;
	}

	for (; j < buffer1; j++)
	{
		if (order[j] == '1')
		{
			cls();
			load(0x1000,1,12);
			do1();
		}
		
		else if (order[j] == '2')
		{
			cls();
			load(0x2000,1,13);
			do2();
		}
		else if (order[j] == '3')
		{
			cls();
			load(0x3000,1,14);
			do3();
		}
		else if (order[j] == '4')
		{
			cls();
			load(0x4000,1,15);
			do4();
		}
		else if (order[j] == '5')
		{
			cls();
			load(0x5000,1,16);
			do5();
		}
		else if (order[j] == '6')
		{
			cls();
			load(0x6000,2,17);
			do6();
		}
		else if (order[j] == '7')
		{
			cls();
			load(0x7000,1,19);
			do7();
		}
		else if (order[j] == '8')
		{
			cls();
			load(0x8000,1,20);
			do8();
		}
		else if (order[j] == '9')
		{
			cls();
			freeAll();
			Program_Num = 1;
			CurrentPCBno = 1;
			load(0x9000,2,21);
			init(&pcb_list[0],0,0x7e00);
			init(&pcb_list[1],0x9000,0x100);
			setClock();
			do9();
			Program_Num = 0;
		}
	}
	cls();
	printf(str4,0x0a20,17);
	printf("Press any key to return...",0x0c15,26);
	buffer1 = 0;
	getch(&ret);
	return;
}