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

📄 all.h

📁 一个简单的虚拟机和虚拟操作系统
💻 H
字号:
#define MEM_SIZE         1024    //the size of the memory
#define REG_SIZE         24      //the number of the common registers
#define MAX_RUN_TIME     3       //max time that a process can run
#define MAX_PRS_NUM      10      //max number of processes
#define CPU_CYC          1000    //the CPU instruction cycle
#define INS_NUM          17
#define COMPUTERATE      5
#define DISK_SIZE        1024*64  //the size of disk is 64k
#define BLOCK_SIZE       64       //the size of a block is 64byte
#define BLOCK_NUM        DISK_SIZE/BLOCK_SIZE
#define MAX_BLOCK        32       //the max number of blocks that a file can have
#define FILE_NUM         12

#define PRI_MAX          2
#define PRI_MID          1
#define PRI_MIN          0

#define STATE_ACTIVE     0
#define STATE_READY      1
#define STATE_WAIT       2

#define IRQA             0
#define IRQB             1
#define IRQ_TIMEA        30
#define IRQ_TIMEB        10

//errors and exceptions
#define OUT_OF_MEM       0
#define DIVIDED_BY_ZERO  1
#define BAD_INS          2
#define BAD_REG          3
#define BAD_ADDRESS      4
#define TOO_MANY_PRS     5
#define INDEX_OUT        6
#define BAD_CODE         7
#define BAD_ID           8
#define UNKNOWNERR       9
#define BAD_PRI          10
#define OUT_OF_DISK      11
#define TOO_BIG_FILE     12

#define BAD_NAME         1
#define NAME_EXIST       2
#define DICT_OUT         3
#define PASTE_FATHER     4

⌨️ 快捷键说明

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