📄 start.s
字号:
;******************************************************************************
; uC/OS-II
; The Real-Time Kernel
;
; (c) Copyright 1998, Jean J. Labrosse, Plantation, FL
; All Rights Reserved
;
; 68HC12 Startup Code
;
; Filename : START.S
; Programmer : Jean J. Labrosse
;******************************************************************************
;
;/*$PAGE*/
;******************************************************************************
; PUBLIC DECLARATIONS
;******************************************************************************
xdef _Startup
;******************************************************************************
; EXTERNAL DECLARATIONS
;******************************************************************************
xref _main
;/*$PAGE*/
;******************************************************************************
; _Startup
;
; Description : This is the function that is called to initialize the system
; when a RESET occurs. The stack pointer is set to the top of
; the stack, the C function 'AppMain()' defined in the
; application software is called.
; Arguments : None.
; Returns : None.
;******************************************************************************
_Startup:
; Target microprocessor startup code
sei ; Disable interrupts.
lds #$0BFF ; Initialize stack pointer to the top of the stack.
LDAA #$0D0 ; CCR code - STOP disabled, XIRQ disabled, and general interrupts disabled.
TAP ; Transfer to CCR.
; bit7 = S -> STOP disable.
; bit6 = X -> XIRQ disable.
; bit5 = H -> half carry.
; bit4 = I -> interrupt disable.
; bit3 = N -> negative.
; bit2 = Z -> zero.
; bit1 = V -> overflow.
; bit0 = C -> carry.
; clra ; Set all RAM to 0
; ldx #$0800
;_StartupClearRAM:
; staa 0,X
; inx
; cpx #1024 ; 68HC12 has 1024 bytes of RAM
; bne _StartupClearRAM
jmp _main ; Execute 'main()' in application software.
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -