                        .module delay.c
                        .area text(rom, con, rel)
 0000                   .dbfile E:\¿ÌÂ¼µÄ\µç×Ó¼¼Êõ\ÏîÄ¿\Çý¶¯³ÌÐò\LCD1602ËÄÏß½Ó¿ÚÓ¦ÓÃ·¶Àý\delay.c
 0000                   .dbfunc e delay_1ms _delay_1ms fV
 0000           ;              i -> R16,R17
                        .even
 0000           _delay_1ms::
 0000                   .dbline -1
 0000                   .dbline 5
 0000           ; #include <iom8v.h>
 0000           ; #include <macros.h>
 0000           ; //8MHzÊ±ÖÓÏÂ
 0000           ; void delay_1ms(void)//1msÑÓÊ±º¯Êý
 0000           ; {
 0000                   .dbline 7
 0000           ;   unsigned int i;
 0000           ;   asm("nop");
 0000 0000              nop
 0002                   .dbline 8
 0002           ;   for (i=0;i<1139;i++)
 0002 0027              clr R16
 0004 1127              clr R17
 0006 02C0              rjmp L5
 0008           L2:
 0008                   .dbline 9
 0008                   .dbline 10
 0008           L3:
 0008                   .dbline 8
 0008 0F5F              subi R16,255  ; offset = 1
 000A 1F4F              sbci R17,255
 000C           L5:
 000C                   .dbline 8
 000C 0337              cpi R16,115
 000E E4E0              ldi R30,4
 0010 1E07              cpc R17,R30
 0012 D0F3              brlo L2
 0014                   .dbline -2
 0014           L1:
 0014                   .dbline 0 ; func end
 0014 0895              ret
 0016                   .dbsym r i 16 i
 0016                   .dbend
 0016                   .dbfunc e delay_nms _delay_nms fV
 0016           ;              i -> R20,R21
 0016           ;              n -> R22,R23
                        .even
 0016           _delay_nms::
 0016 00D0              rcall push_gset2
 0018 B801              movw R22,R16
 001A                   .dbline -1
 001A                   .dbline 14
 001A           ;   {  
 001A           ;   } 
 001A           ; }
 001A           ; 
 001A           ; void delay_nms(unsigned int n)//ÑÓÊ±nºÁÃë
 001A           ; {
 001A                   .dbline 16
 001A           ;   unsigned int i;
 001A           ;   for (i=0;i<n;i++)//Ö´ÐÐn´Î1ºÁÃëÑÓÊ±
 001A 4427              clr R20
 001C 5527              clr R21
 001E 03C0              rjmp L10
 0020           L7:
 0020                   .dbline 17
 0020 EFDF              rcall _delay_1ms
 0022           L8:
 0022                   .dbline 16
 0022 4F5F              subi R20,255  ; offset = 1
 0024 5F4F              sbci R21,255
 0026           L10:
 0026                   .dbline 16
 0026 4617              cp R20,R22
 0028 5707              cpc R21,R23
 002A D0F3              brlo L7
 002C                   .dbline -2
 002C           L6:
 002C 00D0              rcall pop_gset2
 002E                   .dbline 0 ; func end
 002E 0895              ret
 0030                   .dbsym r i 20 i
 0030                   .dbsym r n 22 i
 0030                   .dbend
 0030                   .dbfunc e delay_nus _delay_nus fV
 0030           ;              i -> R20,R21
 0030           ;              n -> R16,R17
                        .even
 0030           _delay_nus::
 0030 00D0              rcall push_gset1
 0032                   .dbline -1
 0032                   .dbline 21
 0032           ;   delay_1ms(); 
 0032           ; }
 0032           ; 
 0032           ; void delay_nus(unsigned int n)//ÑÓÊ±NÎ¢Ãë,N>=5  ¾§Õñ:8MHz
 0032           ; {
 0032                   .dbline 23
 0032           ;   unsigned int i;
 0032           ;   for (i=5;i<n;i++)
 0032 45E0              ldi R20,5
 0034 50E0              ldi R21,0
 0036 04C0              rjmp L15
 0038           L12:
 0038                   .dbline 24
 0038                   .dbline 25
 0038 0000              nop
 003A                   .dbline 26
 003A 0000              nop
 003C                   .dbline 27
 003C           L13:
 003C                   .dbline 23
 003C 4F5F              subi R20,255  ; offset = 1
 003E 5F4F              sbci R21,255
 0040           L15:
 0040                   .dbline 23
 0040 4017              cp R20,R16
 0042 5107              cpc R21,R17
 0044 C8F3              brlo L12
 0046                   .dbline -2
 0046           L11:
 0046 00D0              rcall pop_gset1
 0048                   .dbline 0 ; func end
 0048 0895              ret
 004A                   .dbsym r i 20 i
 004A                   .dbsym r n 16 i
 004A                   .dbend
