コード例 #1
0
ファイル: SHELL.C プロジェクト: KimZhou/HelloX_Kernel
//
//Entry point of the text mode shell.
//
DWORD ShellEntryPoint(LPVOID pData)
{
	__KERNEL_THREAD_MESSAGE KernelThreadMessage;
	
	s_hHiscmdInoObj = His_CreateHisObj(HISCMD_MAX_COUNT);
	
	StrCpy(DEF_PROMPT_STR,&s_szPrompt[0]);

	CD_PrintString(VERSION_INFO,FALSE);
	CD_SetCursorPos(0,SHELL_INPUT_START_Y_FIRST);
	PrintPrompt();

	while(TRUE)
	{
		if(GetMessage(&KernelThreadMessage))
		{
			if(KERNEL_MESSAGE_TERMINAL == KernelThreadMessage.wCommand)
			{
				break;
			}
			DispatchMessage(&KernelThreadMessage,EventHandler);
		}
	}

	//When reach here,it means the shell thread will terminate.We will reboot
	//the system in current version's implementation,since there is no interact
	//mechanism between user and computer in case of no shell.
	//NOTE:System clean up operations should be put here if necessary.
#ifdef __I386__
	BIOSReboot();
#endif
	return 0;
}
コード例 #2
0
ファイル: SHELL.C プロジェクト: KimZhou/HelloX_Kernel
//Entry point of reboot.
VOID Reboot(LPSTR pstr)
{
	ClsHandler(NULL); //Clear screen first.
#ifdef __I386__
	BIOSReboot();
#endif
}
コード例 #3
0
ファイル: SHELL.C プロジェクト: KimZhou/HelloX_STM32
//
//Entry point of the text mode shell.
//
DWORD ShellEntryPoint(LPVOID pData)
{
	__KERNEL_THREAD_MESSAGE KernelThreadMessage;

	//Print out version and author information.
	//GotoHome();
	//ChangeLine();
	//PrintStr(VERSION_INFO);
	GotoHome();
	ChangeLine();

	PrintPrompt();
	while(TRUE)
	{
		if(GetMessage(&KernelThreadMessage))
		{
			if(KERNEL_MESSAGE_TERMINAL == KernelThreadMessage.wCommand)
			{
				break;
			}
			DispatchMessage(&KernelThreadMessage,EventHandler);
		}
	}

	//When reach here,it means the shell thread will terminate.We will reboot
	//the system in current version's implementation,since there is no interact
	//mechanism between user and computer in case of no shell.
	//NOTE:System clean up operations should be put here if necessary.
#ifdef __I386__
	BIOSReboot();
#endif
	return 0;
}
コード例 #4
0
ファイル: SHELL.C プロジェクト: jdsm81/HelloX_Kernel
//Entry point of reboot.
DWORD Reboot(__CMD_PARA_OBJ* pCmdParaObj)
{
	ClsHandler(NULL); //Clear screen first.
#ifdef __I386__
	BIOSReboot();
#endif
	return SHELL_CMD_PARSER_SUCCESS;
}
コード例 #5
0
ファイル: SHELL.C プロジェクト: AlexShiLucky/HelloX_STM32
//Entry point of the text mode shell.
//
DWORD ShellEntryPoint(LPVOID pData)
{			
	StrCpy(DEF_PROMPT_STR,&s_szPrompt[0]);

	CD_PrintString(VERSION_INFO,TRUE);
	CD_SetCursorPos(0,SHELL_INPUT_START_Y_FIRST);
	
	Shell_Msg_Loop(s_szPrompt,CommandParser,QueryCmdName);

	//When reach here,it means the shell thread will terminate.We will reboot
	//the system in current version's implementation,since there is no interact
	//mechanism between user and computer in case of no shell.
	//NOTE:System clean up operations should be put here if necessary.
#ifdef __I386__
	BIOSReboot();
#endif

	return 0;
}
コード例 #6
0
ファイル: SHELL.C プロジェクト: hellox-project/HelloX_OS
/* Entry point of the text mode shell. */
DWORD ShellEntryPoint(LPVOID pData)
{
	StrCpy(DEF_PROMPT_STR,&s_szPrompt[0]);
	_hx_printf("\r\n");
	_hx_printf("%s\r\n",HELLOX_VERSION_INFO);
	_hx_printf("\r\n");
	
	Shell_Msg_Loop(s_szPrompt,CommandParser,QueryCmdName);

	/*
	 * When reach here,it means the shell thread will terminate.We will reboot
	 * the system in current version's implementation,since there is no interact
	 * mechanism between user and computer in case of no shell.
	 * NOTE:System clean up operations should be put here if necessary.
	 */
#ifdef __I386__
	BIOSReboot();
#endif

	return 0;
}