vcs.h

来自「用VC编写的一个微型操作系统」· C头文件 代码 · 共 65 行

H
65
字号
// VCS.h: interface for the CVCS class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VCS_H__5B741F7D_0EFE_4BAF_8A53_53AEFD315B31__INCLUDED_)
#define AFX_VCS_H__5B741F7D_0EFE_4BAF_8A53_53AEFD315B31__INCLUDED_

#include "Mos_UI.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

const int RUN = 1;
const int SLEEP = 2;
const int READY = 3;
const int KB = 1;
const int PRT = 2;
const int DSK = 3;
const int USERMODE = 0;
const int KERNELMODE = 1;
const int IDLE = 2;
const int FREE = 0;
const int BUSY = 1;

struct word{
	        char op1,op2,op3,op4;
	};
class CVCS  
{
public:
	int kerneltime;
	int turnovertimes;
	int totaljob;
	int usertime;
	int io;
	CVCS();
	virtual ~CVCS();
	struct word memory[300];
	char C,PC[2],R[4];
	int PI,SI,TI,IOI;
	struct word PTR;
	int rtime,time,idletime;
	int CHST[3],CHCOUNT[3];
	int MODE;
	bool FatalError;
	void GT();
	void clock();
	BOOL Test();
	bool mapy(int &a);
	void VCS();
protected:
	void BU(int &addr);
	void BN(int &addr);
	void SU(int &addr);
	void AD(int &addr);
	void BT(int &addr);
	void CR(int &addr);
	void SR(int &addr);
	void LR(int &addr);
private:
	CMos_UI m_UI;
};

#endif // !defined(AFX_VCS_H__5B741F7D_0EFE_4BAF_8A53_53AEFD315B31__INCLUDED_)

⌨️ 快捷键说明

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