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

📄 kaos.c

📁 KaOS is a real-time operating system that has been implemented with the basic real-time constraints
💻 C
字号:
#include <Mega32.h>
#include <delay.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "os.h"

// This trick puts all the non spm/lpm code
// right at the end of main flash, but not in the bootloader.
// We do this so that the OS can exceed 2048 words.

#asm
.cseg
.equ bootloader=pc
.org 0x003500
#endasm

#include "initialize.c"
#include "os.c"
#include "interrupts.c"
#include "thread.c"
#include "semaphore.c"
#include "message.c"
#include "mmc.c"
//#include "filesystem.c"
#include "osthreads.c"

#asm
.equ mainflash=pc
.org bootloader
#endasm

// make sure SPM methods are inside bootloader
#include "spm.c"

void main(void)
{
	os_initialize();
	while(1) #asm("nop");
}

⌨️ 快捷键说明

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