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

📄 cmpl.cpp

📁 本软件实现了模拟cpu的基本工作原理和工作过程
💻 CPP
字号:
// CMPL.cpp : implementation file
//

#include "stdafx.h"
#include "AM.h"
#include "CMPL.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMPL dialog


CMPL::CMPL(CWnd* pParent /*=NULL*/)
	: CDialog(CMPL::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMPL)
	m_code = _T("");
	//}}AFX_DATA_INIT
}


void CMPL::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMPL)
	DDX_Text(pDX, IDC_CODE_EDIT, m_code);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMPL, CDialog)
	//{{AFX_MSG_MAP(CMPL)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMPL message handlers

void CMPL::OnOK() 
{
	lines.clear();
	int len=m_code.GetLength();

	char* temp=new char[len+1];
	strcpy(temp,m_code.GetBuffer(10));

	int i=0,j=0;
	char* ptr=temp;
	while(1){
		if(temp[i]==13){
			temp[i]=0;
			lines.insert(j++,*ptr);
			i+=2;
			ptr=&temp[i];
		}
		else if(temp[i]==0)break;
		else i++;
	}
	CDialog::OnOK();
}
int CMPL::compile()
{
	for(int i=0;i<lines.size();i++){
		
	}
	return 0;
}


⌨️ 快捷键说明

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