led2.asm

来自「基于TMS320LF240 外接led」· 汇编 代码 · 共 65 行

ASM
65
字号
	.sect	".vectors"
	b	start
	.text
	.include "x24x_app.h"
	.global	start
start:
	ldp #0e0h
	splk #6fh,WDCR
	splk #5555h,WDKEY
	splk #0AAAAh,WDKEY	
loop_main
	ldp	 #0
	splk #1,60h
	out 60h,100h
	splk #1,60h
	out 60h,100h
	call	delay
	splk #2,60h
	out 60h,100h
	splk #2,60h
	out 60h,100h		        
	call	delay
	splk #4,60h
	out 60h,100h
	splk #4,60h
	out 60h,100h	        
	call	delay
	splk #8,60h
	out 60h,100h
	splk #8,60h
	out 60h,100h	        
	call	delay

	splk #10h,60h
	out 60h,100h
	splk #10h,60h
	out 60h,100h
	call	delay
	splk #20h,60h
	out 60h,100h
	splk #20h,60h
	out 60h,100h		        
	call	delay
	splk #40h,60h
	out 60h,100h
	splk #40h,60h
	out 60h,100h	        
	call	delay
	splk #80h,60h
	out 60h,100h
	splk #80h,60h
	out 60h,100h	        
	call	delay

	b	loop_main
delay:
	lar	ar1,#1A00h
loop:
	rpt #255
	nop
	banz	loop,ar1
	ret
				
 

⌨️ 快捷键说明

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