led.asm

来自「这是TI的芯片TMS320LF2407的C板的测试程序」· 汇编 代码 · 共 86 行

ASM
86
字号
	.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
	
	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


	splk #55h,60h
	out 60h,100h
	splk #55h,60h
	out 60h,100h	        
	call	delay
	splk #0aah,60h
	out 60h,100h
	splk #0aah,60h
	out 60h,100h	        
	call	delay
	
	splk #0fh,60h
	out 60h,100h
	splk #0fh,60h
	out 60h,100h	        
	call	delay
	
	splk #0f0h,60h
	out 60h,100h
	splk #0f0h,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 + -
显示快捷键?