📄 misc.h
字号:
// misc.h: interface for the misc class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MISC_H__8CE59A6A_E529_4A68_BFA5_E0F13726D484__INCLUDED_)
#define AFX_MISC_H__8CE59A6A_E529_4A68_BFA5_E0F13726D484__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include <limits.h>
#define boolean int
#define bool int
#define true 1
#define false 0
#define TRUE 1
#define FALSE 0
#define maxint INT_MAX
#define MAXINSTUCTION 67 //虚拟机支持的最大机器指令数
#define MEMSIZE 256 //存储器容量
#define SYMTABLEN 50 //汇编器符号表的最大容量
#define MAXSYMLEN 32 //符号地址所允许的最大长度
//#define DEBUG //for debug purpose
#if __MSDOS__ || MSDOS || WIN32 || __WIN32__
# define pathsep '\\'
#else
# define pathsep '/'
#endif
static void logo()
{
printf("\nMYVM Virtual Machine Premiere, Version 0.11a \n");
printf("\tCopyright under GPL 2002,2003, Snallie@163.net\n\n");
}
static void newsuffix(char *oldstr, char *ext, char *newstr)
// 将oldstr所指源文件名PRIMARY.xxx 更改为PRIMARY.ext存放在newstr
{
int i;
char old[256];
strcpy(old, oldstr);
i = strlen(old);
while ((i > 0) && (old[i - 1] != '.') && (old[i - 1] != pathsep))
i--;
if ((i > 0) && (old[i - 1] == '.'))
old[i - 1] = 0;
if (ext[0] == '.')
sprintf(newstr, "%s%s", old, ext);
else
sprintf(newstr, "%s.%s", old, ext);
}
#endif // !defined(AFX_MISC_H__8CE59A6A_E529_4A68_BFA5_E0F13726D484__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -