📄 instruction.cpp
字号:
/*
FileName: instruction.cpp
Author: LiWen
Create: 2005-12-20
Last Modified: 2005-12-24
Discription: 代码表管理模块
*/
#include "compiler.h"
INSTRUCTION codelist[CXMAX]; //代码表
char strcode[8][4]={"LIT","LOD","STO","CAL","INT","JMP","JPC","OPR"}; //命令字串,输出用
int cx; //当前代码
/*=======================================================
函数:transform
参数:PCODE的三个元素f,l,a
描述:根据输入添加的代码表中
返回:当前指针
========================================================*/
int transform(enum instruction f,int l,int a){
codelist[cx].f = f;
codelist[cx].l = l;
codelist[cx].a = a;
return cx++;
}
/*=======================================================
函数:instructioninit
参数:无
描述:代码模块初始化
返回:无
========================================================*/
void instructioninit(){
cx = 0;
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -