📄 vm51_init.c
字号:
/*
Name: emu51_init
Copyright: rockins
Author: rockins
Date: 06-08-05 22:07
Description: this module initial the circumstance
*/
#include "vm51.h"
#include <stdio.h>
#include <stdlib.h>
int VM51_init(void)
{
#ifdef __VM51_DEBUG__
printf("init environment...\n");
#endif
PC = 0x0000;
ACC = 0x00;
PSW = 0x00;
SP = 0x07;
DPL = 0x00;
DPH = 0x00;
P0 = 0xFF;
P1 = 0xFF;
P2 = 0xFF;
P3 = 0xFF;
IP = 0x00;
IE = 0x00;
TMOD = 0x00;
TCON = 0x00;
TL0 = 0x00;
TH0 = 0x00;
TL1 = 0x00;
TH1 = 0x00;
SCON = 0x00;
SBUF = 0x00;
PCON = 0x00;
tick = 0;
debug = OFF;
#ifdef __VM51_DEBUG__
VM51_output_reg();
VM51_output_mem();
#endif
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -