📄 amview.h
字号:
// AMView.h : interface of the CAMView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_AMVIEW_H__8C22F4C6_2105_4AFF_89C6_1E49264B7273__INCLUDED_)
#define AFX_AMVIEW_H__8C22F4C6_2105_4AFF_89C6_1E49264B7273__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include"CMPL.h"
#include"STARTDLG.h"
class CAMView : public CFormView
{
protected: // create from serialization only
CAMView();
DECLARE_DYNCREATE(CAMView)
public:
//{{AFX_DATA(CAMView)
enum { IDD = IDD_AM_FORM };
CButton m_ModeRadio;
CScrollBar m_mem_scroll;
CString m_mem_addr;
CString m_mem_data;
CString m_r0;
CString m_r1;
CString m_r10;
CString m_r11;
CString m_r12;
CString m_r13;
CString m_r14;
CString m_r15;
CString m_r2;
CString m_r3;
CString m_r4;
CString m_r5;
CString m_r6;
CString m_r7;
CString m_r8;
CString m_r9;
CString m_q;
CString m_aport;
CString m_bport;
CString m_alu;
CString m_addr;
CString m_instruction;
CString m_map;
CString m_cmdata;
CString m_mpc;
CString m_mux;
CString m_input;
CString m_ouput;
CString m_pc;
CString m_explain;
CString m_bus;
CString m_operator;
short m_sta_s;
short m_sta_v;
short m_sta_z;
short m_sta_c;
short m_cy;
short m_f3;
short m_ov;
short m_zr;
CString m_sp;
CString m_ip;
//}}AFX_DATA
// Attributes
public:
CAMDoc* GetDocument();
private:
MCODE MicroInst;
// CString m_aport;
// CString m_bport;
// unsigned short AluOut;
// unsigned short MemAddr;
// CString m_map;
// CString MpcValue;
// CString m_mux;
// CString m_input;
// CString m_ouput;
int count;
LINE DataBus;
AU au;
CU cu;
MEM mem;
IO io;
//A口B口选择
unsigned short RA;
unsigned short RB;
unsigned short cc;
unsigned short memory[65536];
MCODE mcode[200];
INFO info[200];
CString maprom[70];
CPen * OldPen;
CFont * OldFont;
CBrush * OldBrush;
CPen Pen;
CFont Font;
CFont BigFont;
CBrush BusBrush;
CBrush BoxBrush;
CBrush ShineBrush;
CBrush SecBrush;
COLORREF BusColor;
COLORREF BoxColor;
COLORREF ShineColor;
COLORREF SecColor;
COLORREF TextColor;
CMPL* cmpl;
STARTDLG startdlg;
void DrawAU(CBrush& BusBrush,CPaintDC& dc);
void DrawCU(CBrush& BusBrush,CPaintDC& dc);
void DrawMEM(CBrush& BusBrush,CPaintDC& dc);
void DrawIO(CBrush& BusBrush,CPaintDC& dc);
void DrawBus(int x,int y,int w,int h,int type,int arrow1,int arrow2,CBrush& BusBrush);
void DrawBus(int x,int y,int w,int h,int type,int arrow1,int arrow2,CBrush& BusBrush,CPaintDC& dc);
void Draw(LINE line,CBrush& BusBrush);
void Draw(LINE line,CBrush& BusBrush,CPaintDC& dc);
void Draw(BOX box,CPaintDC& dc);
void DrawALU(CPaintDC& dc);
void cvrt(int num,char* string);
void MemValueCvrt(unsigned short* num,CString& words);
void sernum2cstr(int page,CString& words);
void short2CString(unsigned short num,CString& str);
unsigned short CString2short(CString& str);
unsigned short RegGetValue(unsigned short RegSelect);
void RegWrite(unsigned short RegSelect,unsigned short value);
void Run();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAMView)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CAMView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CAMView)
afx_msg void OnPaint();
afx_msg void OnButtonTime();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnButtonWrite();
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnRunButton();
afx_msg void OnStartButton();
afx_msg void OnStopButton();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in AMView.cpp
inline CAMDoc* CAMView::GetDocument()
{ return (CAMDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_AMVIEW_H__8C22F4C6_2105_4AFF_89C6_1E49264B7273__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -