📄 main.c
字号:
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#pragma DATA_SEG MY_ZEROPAGE
char near DataZeroP;
#pragma DATA_SEG DEFAULT
char far DataAnyP;
void MCU_init(void); /* Device initialization function declaration */
void main(void) {
/* Uncomment this function call after using Device Initialization
to use the generated code */
/* MCU_init(); */
volatile char * far FarPointer;
volatile char * near NearPointer;
EnableInterrupts; /* enable interrupts */
/* Minimal Startup, No global copydown */
DataZeroP = 0x55;
DataAnyP = 0xAA;
/* include your code here */
FarPointer = &DataAnyP;
NearPointer = &DataAnyP;
FarPointer = &DataZeroP;
NearPointer = &DataZeroP;
for(;;) {
DataAnyP++;
DataZeroP++;
FarPointer++;
NearPointer++;
if(NearPointer == (volatile unsigned char *)0xFF)
{
asm("NOP");
}
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave this function */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -