📄 os_etos.dt
字号:
/*
*********************************************************************************************************
* Elan Micro-controller Program
*
* (c) Copyright 2007, Liu Wei Liang
* All Rights Reserved
*
* File : main.dt
* By : Liu Wei Liang
*********************************************************************************************************
*/
include "USER_REGDEF.DT"
include "OS_CPU.DT"
include "OS_CFG.DT"
if OS_IC_TYPE == 0
ORG 0X00
jmp start
ORG 0x08
jmp INT_TCC
endif
if OS_IC_TYPE == 1
ORG 0x01
jmp int_tcc
ORG 0x1f
jmp int_tcc
ORG 0x20
endif
if OS_IC_TYPE == 2
ORG 0X00
jmp start
ORG 0x03
jmp int_external
ORG 0x06
jmp int_p5_change
ORG 0x09
jmp int_tcc
ORG 0x0c
jmp int_ad
ORG 0x12
jmp int_hig_pulse
ORG 0x15
jmp int_low_pulse
ORG 0x18
jmp int_tcca
ORG 0x1b
jmp int_tccb
ORG 0x1e
jmp int_tccc
ORG 0x20
endif
IF OS_RES_DPY == 1
include "USER_DPYTABLE.DT"
ENDIF
include "OS_INTERRUPT.dt"
include "OS_INIT.dt"
include "OS_TASK.dt"
include "OS_TIME.dt"
include "USER_SUB.DT"
include "USER_TASK.DT"
;---------------------------MAIN PROGRAM------------------------------
start:
call OS_Init ; Initialize OS
call OSTaskCreat ; Creat Task
OSStart: ; OS Run
eni
wdtc
bank 0
page 0
call OSTimeSchedule
jmp OSTaskSchedule ; 减少堆栈深度
schedule_end:
jmp OSStart
;---------------------------------------------------
ORG 0x3ff
jmp start
ORG 0X400
IF (OS_PAGE_NUM == 2) || (OS_PAGE_NUM == 3) || (OS_PAGE_NUM == 4) ;是否有多个程序页面
include "USER_SUB_PAGE2.DT"
ENDIF
ORG 0X800
IF (OS_PAGE_NUM == 3) || (OS_PAGE_NUM == 4)
include "USER_SUB_PAGE3.DT"
ENDIF
ORG 0XC00
IF (OS_PAGE_NUM == 4)
include "USER_SUB_PAGE4.DT"
ENDIF
IF OS_IC_TYPE == 1
ORG 0X0fff
jmp start
ENDIF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -