kaos.c
来自「KaOS is a real-time operating system tha」· C语言 代码 · 共 41 行
C
41 行
#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 + =
减小字号Ctrl + -
显示快捷键?