- UID
- 345208
- 性别
- 男
|
Include derivative-specific definitions
INCLUDE 'derivative.inc'
; export symbols
XDEF _Startup, main
; we export both '_Startup' and 'main' as symbols. Either can
; be referenced in the linker .prm file or from C/C++ later on
XREF __SEG_END_SSTACK ; symbol defined by the linker for the end of the stack
; variable/data section
MY_ZEROPAGE: SECTION SHORT ; Insert here your data definition
; code section
MyCode: SECTION
Timeout:
[U]LDA #$00
STA PTBD[/U]
RTI
main:
_Startup:
LDHX #__SEG_END_SSTACK ; initialize the stack pointer
TXS
CLI ; enable interrupts
LDA #$FF
STA PTBDD
LDA #$0F
STA TPMSC
LDA #$7F
;中断溢出设置
STA TPMMODH
LDA #$FF
STA TPMMODL
mainLoop:
LDA #$F0
STA PTBD
; Insert your code here
NOP
feed_watchdog
BRA mainLoop
ORG $FFF0
FDB Timeout
加下划线部分编译错误,不知为什么?我试过其它的中断服务子程序,都不行,请高手指正 |
|