单片机开发资料光盘-双龙-686M.zip
源代码在线查看: jaggedwave.s
.module JaggedWave.c
.area text
.dbfile E:\grc\licc\例子10.4.1\JaggedWave.c
.dbfunc s delay _delay fI
.even
_delay::
.dbline 4{
; #include
; #define uchar unsigned char
; void delay(void)
; {
.dbline 5}
; }
L1:
ret
.dbfunc s main _main fI
; c -> R20
.even
_main::
.dbline 7{
; void main(void)
; {
.dbline 9
; uchar c;
; DDRA=0xff;
ldi R24,255
out 0x1a,R24
.dbline 10
; for (;;)
L3:
.dbline 11
; {
.dbline 12
; PORTA=c++;
mov R2,R20
subi R20,255 ; addi 1
out 0x1b,R2
.dbline 13
; delay();
rcall _delay
.dbline 14
; }
.dbline 10
.dbline 10
rjmp L3
X0:
L2:
ret
.dbline 11}
.dbsym r c 20 c