⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.h

📁 < 虚拟机设计与实现> 的source code, linux版本
💻 H
字号:
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+                                                                   +
+ init     - loads bytecode off of disk and into physical memory    +
+                                                                   +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

#ifndef _INIT_H
#define _INIT_H

#include <stdio.h>

#include "common.h"
#include "cmdline.h"
#include "exenv.h"
#include "error.h"

#ifdef OS_WIN
#include "win32.h"
#else
#include "linux.h"
#endif

#define	APPLICATION		0xDEED	/* identifies an executable file (magic number) */

//#define DBG_INIT		1

#ifdef DBG_INIT
#define DBG_INIT0(str);				printf("initHEC(): "); printf(str);
#define DBG_INIT1(str,arg1);		printf("initHEC(): "); printf(str,arg1);
#define DBG_INIT2(str,arg1,arg2);	printf("initHEC(): "); printf(str,arg1,arg2);
#define PRINT_SYM_TBL();			printDebugData(&debugData);	
#else
#define DBG_INIT0(str);
#define DBG_INIT1(str,arg1);
#define DBG_INIT2(str,arg1,arg2); 
#define PRINT_SYM_TBL();	
#endif

#define SIZE_HEADER		26		/* byte size of executable header */

struct HeaderRec
{
	U2 magic;		/*should be magic number 0xDEED */
	U8 szSymTbl;	/*size of symbol table*/
	U8 szStrTbl;	/*size of string table*/
	U8 szByteCode;  /*size of bytecode*/
};

U1 initHEC(struct CmdLine cl);
void closeHEC();

#endif

⌨️ 快捷键说明

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