📄 bootsec.c
字号:
/****************************************************************************/
//
// BootLoader stub
// Created by Strong Embeded Studio
// www.8800.org
// If there are any concerns on the code
// go to www.8800.org for discussion
//
/****************************************************************************/
// This routine copies the BootLoader into dram memory for execution
/****************************************************************************/
//***************************************************************************
#include "inc\44b.h"
#include "inc\option.h"
//***************************************************************************
typedef (*FUNC)(void);
FUNC fp;
void Main(void)
{
unsigned int *org;
unsigned int *dst;
unsigned int len;
unsigned int i;
//
//8K Cachable
//
rSYSCFG = CACHECFG;
//
// I/O range uncachable
//
rNCACHBE0 = 0xc0002000;
//
// Write the LED (00)
//
*(volatile short *)(0x6080000) = 0x4848;
//
// Move the BootLoader to DRAM
//
org = (unsigned int *)0x00001000;
dst = (unsigned int *)0x0C000000;
fp = (FUNC)dst;
len = (0x10000)>>2;
for (i=0;i<len;i++) *dst++ = *org++;
//
// Go there for execution
//
(*fp)();
}
//***************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -