?? code.h
字號:
#if !defined(AFX_CODE_H__A5B4FA95_3436_43BC_9D7B_89095274AB6B__INCLUDED_)
#define AFX_CODE_H__A5B4FA95_3436_43BC_9D7B_89095274AB6B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Code.h : header file
//
enum fct {lit,opr,lod,sto,cal,intint,jmp,jpc};
#define CODE_SIZE 200
#define RUN_STACK_SIZE 500
/////////////////////////////////////////////////////////////////////////////
// CCode window
struct instruction
{
fct f; //fuction code
int l; //level
int a; //displacement addr
};
#include "Compiler.h"
class CCode : public CWnd
{
// Construction
public:
CCode();
CCode(CCompiler *);
// Attributes
public:
CCompiler *mCompiler;
int cx;
int b;
int s[RUN_STACK_SIZE];
instruction code[CODE_SIZE];
// Operations
public:
void Gen(fct f,int l,int a);
int Base(int l);
void Interpret();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCode)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CCode();
// Generated message map functions
protected:
//{{AFX_MSG(CCode)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CODE_H__A5B4FA95_3436_43BC_9D7B_89095274AB6B__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -