main.c

来自「简单的虚拟机」· C语言 代码 · 共 41 行

C
41
字号
#include <stdio.h>#include <stdlib.h>#include <stdbool.h>/*#include "enenv.h"*/#include "dbgdata.h"#include "init.h"#include "run.h"int main(int argc, char* argv[]){	struct CmdLine cl; /* cmdline.h*/		/*1) handle command line arguments	*/	cl = handleArguments(argc,argv);	if(cl.ok==false)	{		printf("main(): argument error!\n");		exit(1);	}	/*2) init execution environment and load bytecode */	cpu.ram = NULL; /* enenv.h */	if(initcpu(cl)==false)	{		printf("main(): init cpu error!\n");		exit(1);	}		/*3) begin execution */	printf("main(): beginning to run...\n");	printf("==================================================\n");	run();		/*4) safe shutdown */		shutDown();
	return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?