单片机开发资料光盘-双龙-686M.zip

源代码在线查看: ladderwave.s

软件大小: 574027 K
上传用户: rllfllef
关键词: 686 zip 单片机 光盘
下载地址: 免注册下载 普通下载 VIP

相关代码

					.module LadderWave.c
					.area text
					.dbfile E:\grc\licc\例子10.4.3\LadderWave.c
					.dbfunc s delay _delay fI
				;              i -> R20
				;              t -> R16
					.even
				_delay::
					rcall push_gset1
					.dbline 5{
				; #include            
				; #define uchar unsigned char
				; #define uint unsigned int
				; void delay(uchar t)           
				; {
					.dbline 7
				;  uchar i;
				;  for (i=0;i					clr R20
					rjmp L5
				L2:
					.dbline 8
				L3:
					.dbline 7
					inc R20
				L5:
					.dbline 7
					cp R20,R16
					brlo L2
					.dbline 9}
				;     ;
				; }
				L1:
					rcall pop_gset1
					ret
					.dbsym r i 20 c
					.dbsym r t 16 c
					.dbfunc s main _main fI
				;              c -> R20
					.even
				_main::
					.dbline 11{
				; void main(void)               
				; {
					.dbline 13
				;  uchar c;
				;  DDRA=0xff;                   
					ldi R24,255
					out 0x1a,R24
					.dbline 14
				;  for (;;)
				L7:
					.dbline 15
				;    {
					.dbline 16
				;     for (c=0x00;c					clr R20
					rjmp L14
				L11:
					.dbline 17
					out 0x1b,R20
				L12:
					.dbline 16
					inc R20
				L14:
					.dbline 16
					cpi R20,255
					brlo L11
					.dbline 18
				;         PORTA=c;             
				;     delay(255);              
					ldi R16,255
					rcall _delay
					.dbline 19
				;     for (c=0xff;c>0x00;c--)  
					ldi R20,255
					rjmp L18
				L15:
					.dbline 20
					out 0x1b,R20
				L16:
					.dbline 19
					dec R20
				L18:
					.dbline 19
					clr R2
					cp R2,R20
					brlo L15
					.dbline 21
				;         PORTA=c;             
				;     delay(255);              
					ldi R16,255
					rcall _delay
					.dbline 22
				;     }                        
					.dbline 14
					.dbline 14
					rjmp L7
				X0:
				L6:
					ret
					.dbline 15}
					.dbsym r c 20 c
							

相关资源