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

📄 memorysegment.h

📁 这个也是我们的毕业设计课题
💻 H
字号:

#if !defined(AFX_MEMORY_H__FA575AEA_1879_4F97_BDBE_AEC4EA1878E3__INCLUDED_)
#define AFX_MEMORY_H__FA575AEA_1879_4F97_BDBE_AEC4EA1878E3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "type.h"
#include "MainFrm.h"
#include "OutputWindow.h"
//MemorySegment.h
//The simulate Memory defination
//class Memory defination
class BUSSystem;
class Memory
{
private:
	UNSHORT* m_lpuMemorySegAddr;//memory segment address
	UNSHORT m_uMemorySegSize;//memory segment size
	BUSSystem* _busSystem;
	BOOL m_bIOWrite;//it means Write if it is FALSE
	BOOL m_bIORead;//it means Read if it is FALSE
public:
	void ReportState(CString strState);
	//construction/destruction
	Memory(UNSHORT wSegSize);//initiallized a segment , the size is 
							//specified by wSegSize
	Memory();
	~Memory();
	//attribute
	void SetIORead(BOOL bState){m_bIORead=bState;}//it will be called by the 
											//IOBUS's SetIORead() function
	void SetIOWrite(BOOL bState){m_bIOWrite=bState;}//it will be called by the 
											//IOBUS's SetIOWrite() function
	//operation
	void SetBUSSystem(BUSSystem* lpBUSSystem){_busSystem=lpBUSSystem;}
	void SetSegSize(UNSHORT uSegSize);
	void Release();
	void AccessMemory();
	void WriteMemory(UNSHORT uAddr,WORD wData);
	void ReadMemory(UNSHORT uAddr,WORD& wData);
	UNSHORT GetSegSize(){return m_uMemorySegSize;}
};
#endif // !defined(AFX_MEMORY_H__FA575AEA_1879_4F97_BDBE_AEC4EA1878E3__INCLUDED_)

⌨️ 快捷键说明

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