exp04.c

来自「DSP基于ccs2.0 的语言程序」· C语言 代码 · 共 53 行

C
53
字号
#include <stdio.h>
interrupt void timer();
void time();
void initial();
void daout();
void closetime();
int i=0;
int temp=0;
int flag=0;
interrupt void timer()
{
	temp++;
	if(temp==5) 
	{  temp=0;
		if(i==63)
		{asm(" nop");
		 flag=1;
		}
		else
		{	asm(" nop");
			asm(" nop");
			asm(" nop");
			asm(" nop");
			asm(" nop");
			asm(" nop");
			asm(" nop");
			asm(" nop");
	    	asm(" portr 00h,*ar1+");
	     i++;
		}
	}   
	return;
} 

main()
{
	initial();
	while(1)
	{;
	if(flag==1)
  		{
  		closetime();
     break;
       	}
	}
	while(1){
	daout();}
	
}



⌨️ 快捷键说明

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