📄 dotled.lst
字号:
##############################################################################
# #
# 31/Jul/2008 14:36:59 #
# IAR Atmel AVR C/C++ Compiler V4.20A/W32, Evaluation Version #
# Copyright 1996-2006 IAR Systems. All rights reserved. #
# #
# Source file = E:\HanLin\My_Design\DotLed\IAR\DotLed.c #
# Command line = E:\HanLin\My_Design\DotLed\IAR\DotLed.c --cpu=m8 -ms #
# -o E:\HanLin\My_Design\DotLed\IAR\Release\Obj\ -D #
# NDEBUG -lC E:\HanLin\My_Design\DotLed\IAR\Release\List\ #
# -lA E:\HanLin\My_Design\DotLed\IAR\Release\List\ #
# --initializers_in_flash -z6 --no_inline #
# --no_cross_call --no_tbaa -DENABLE_BIT_DEFINITIONS -e #
# -I "D:\Software\Embedded Workbench 4.0 #
# Evaluation\avr\INC\" -I "D:\Software\Embedded #
# Workbench 4.0 Evaluation\avr\INC\DLIB\" --eeprom_size #
# 512 --dlib_config "D:\Software\Embedded Workbench 4.0 #
# Evaluation\avr\LIB\DLIB\dlAVR-1s-ec_mul-n.h" #
# List file = E:\HanLin\My_Design\DotLed\IAR\Release\List\DotLed.lst #
# Object file = E:\HanLin\My_Design\DotLed\IAR\Release\Obj\DotLed.r90 #
# #
# #
##############################################################################
E:\HanLin\My_Design\DotLed\IAR\DotLed.c
1 #include "config.h"
\ In segment ABSOLUTE, at 0x33
\ union <unnamed> volatile __io _A_PINC
\ _A_PINC:
\ 00000000 DS 1
\ In segment ABSOLUTE, at 0x34
\ union <unnamed> volatile __io _A_DDRC
\ _A_DDRC:
\ 00000000 DS 1
\ In segment ABSOLUTE, at 0x35
\ union <unnamed> volatile __io _A_PORTC
\ _A_PORTC:
\ 00000000 DS 1
\ In segment ABSOLUTE, at 0x37
\ union <unnamed> volatile __io _A_DDRB
\ _A_DDRB:
\ 00000000 DS 1
\ In segment ABSOLUTE, at 0x38
\ union <unnamed> volatile __io _A_PORTB
\ _A_PORTB:
\ 00000000 DS 1
2
3 #define DOTLED_LINE_PORT PORTB
4 #define DOTLED_LINE_DDR DDRB
5 #define DOTLED_LINE_PIN PINB
6
7 #define DOTLED_LINE_SCKT PB1
8 #define DOTLED_LINE_SCKH PB5
9 #define DOTLED_LINE_SDA PB3
10
11 #define DOTLED_ROW_PORT PORTC
12 #define DOTLED_ROW_DDR DDRC
13 #define DOTLED_ROW_PIN PINC
14
15 #define DOTLED_ROW_A0 PC0
16 #define DOTLED_ROW_A1 PC1
17 #define DOTLED_ROW_A2 PC2
18 #define DOTLED_ROW_A3 PC3
19 #define DOTLED_ROW_E PC4
20
21
22
\ In segment NEAR_I, align 1, keep-with-next
\ 00000000 REQUIRE `?<Segment init: NEAR_I>`
23 uint8 font[] = {
\ font:
\ 00000000 DS 32
\ 00000020 REQUIRE `?<Initializer for font>`
24 /*-- 调入了一幅图像:这是您新建的图像 --*/
25 /*-- 宽度x高度=16x16 --*/
26 0x00,0x00,0x00,0x00,0x08,0x38,0x18,0x44,0x08,0x44,0x08,0x04,0x08,0x08,0x08,0x10,
27 0x08,0x20,0x08,0x40,0x08,0x40,0x08,0x40,0x3E,0x7C,0x00,0x00,0x00,0x00,0x00,0x00
28 };
29
30
31
32 static void TransmitByte(uint8 byte);
33 static void SelectRow(uint8 row);
34 static void FlipLatchLine(void);
35
36
\ In segment CODE, align 2, keep-with-next
37 static void TransmitByte(uint8 byte)
\ TransmitByte:
38 {
\ 00000000 2F30 MOV R19, R16
39 uint8 i;
40
41 for(i = 0 ; i < 8 ; i ++)
\ 00000002 E020 LDI R18, 0
\ 00000004 C004 RJMP ??TransmitByte_0
42 {
43 if(byte & (1 << i))
44 {
45 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);
46 }
47 else
48 {
49 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SDA);
\ ??TransmitByte_1:
\ 00000006 98C3 CBI 0x18, 0x03
50 }
51 //__delay_cycles(100);
52 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKH);
\ ??TransmitByte_2:
\ 00000008 9AC5 SBI 0x18, 0x05
53 //__delay_cycles(100);
54 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKH);
\ 0000000A 98C5 CBI 0x18, 0x05
\ 0000000C 9523 INC R18
\ ??TransmitByte_0:
\ 0000000E 3028 CPI R18, 8
\ 00000010 F440 BRCC ??TransmitByte_3
\ 00000012 E001 LDI R16, 1
\ 00000014 E010 LDI R17, 0
\ 00000016 2F42 MOV R20, R18
\ 00000018 .... RCALL ?S_SHL_L02
\ 0000001A 2303 AND R16, R19
\ 0000001C F3A1 BREQ ??TransmitByte_1
\ 0000001E 9AC3 SBI 0x18, 0x03
\ 00000020 CFF3 RJMP ??TransmitByte_2
55 //__delay_cycles(100);
56 }
57 }
\ ??TransmitByte_3:
\ 00000022 9508 RET
58
\ In segment CODE, align 2, keep-with-next
59 static void SelectRow(uint8 row)
\ SelectRow:
60 {
61 //row -= 1;
62 row |= DOTLED_ROW_PIN & 0xe0;
\ 00000000 B313 IN R17, 0x13
\ 00000002 7E10 ANDI R17, 0xE0
\ 00000004 2B01 OR R16, R17
63 DOTLED_ROW_PORT = row;
\ 00000006 BB05 OUT 0x15, R16
64 }
\ 00000008 9508 RET
65
\ In segment CODE, align 2, keep-with-next
66 static void FlipLatchLine(void)
\ FlipLatchLine:
67 {
68 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SCKT);
\ 00000000 9AC1 SBI 0x18, 0x01
69 DOTLED_LINE_PORT &= ~_BV(DOTLED_LINE_SCKT);
\ 00000002 98C1 CBI 0x18, 0x01
70 }
\ 00000004 9508 RET
71
\ In segment CODE, align 2, keep-with-next
72 void InitDotLedPort(void)
\ InitDotLedPort:
73 {
74 DOTLED_LINE_PORT &= ~(_BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH));
\ 00000000 B308 IN R16, 0x18
\ 00000002 7D0D ANDI R16, 0xDD
\ 00000004 BB08 OUT 0x18, R16
75 DOTLED_LINE_PORT |= _BV(DOTLED_LINE_SDA);
\ 00000006 9AC3 SBI 0x18, 0x03
76 DOTLED_LINE_DDR |= _BV(DOTLED_LINE_SCKT) | _BV(DOTLED_LINE_SCKH) | _BV(DOTLED_LINE_SDA);
\ 00000008 B307 IN R16, 0x17
\ 0000000A 620A ORI R16, 0x2A
\ 0000000C BB07 OUT 0x17, R16
77
78 DOTLED_ROW_PORT |= 0x1f;
\ 0000000E B305 IN R16, 0x15
\ 00000010 610F ORI R16, 0x1F
\ 00000012 BB05 OUT 0x15, R16
79 DOTLED_ROW_PORT &= 0xf0;
\ 00000014 B305 IN R16, 0x15
\ 00000016 7F00 ANDI R16, 0xF0
\ 00000018 BB05 OUT 0x15, R16
80 DOTLED_ROW_DDR |= 0x1f;
\ 0000001A B304 IN R16, 0x14
\ 0000001C 610F ORI R16, 0x1F
\ 0000001E BB04 OUT 0x14, R16
81 }
\ 00000020 9508 RET
\ In segment CODE, align 2, keep-with-next
82 void EnableRow(boolean IsEnable)
\ EnableRow:
83 {
84 if(IsEnable)
\ 00000000 2300 TST R16
\ 00000002 F011 BREQ ??EnableRow_0
85 {
86 DOTLED_ROW_PORT &= ~_BV(DOTLED_ROW_E);
\ 00000004 98AC CBI 0x15, 0x04
\ 00000006 9508 RET
87 }
88 else
89 {
90 DOTLED_ROW_PORT |= _BV(DOTLED_ROW_E);
\ ??EnableRow_0:
\ 00000008 9AAC SBI 0x15, 0x04
91 }
92 }
\ 0000000A 9508 RET
\ In segment CODE, align 2, keep-with-next
93 void PrintDotLed(uint8 * buffer)
\ PrintDotLed:
94 {
\ 00000000 .... RCALL ?PROLOGUE4_L09
\ 00000002 01D8 MOVW R27:R26, R17:R16
95 uint8 i , tmp;
96
97 for(i = 0 ; i < 16 ; i ++)
\ 00000004 E080 LDI R24, 0
\ 00000006 C00A RJMP ??PrintDotLed_0
98 {
99 tmp = *buffer ++;
\ ??PrintDotLed_1:
\ 00000008 910D LD R16, X+
100 TransmitByte(~tmp);
\ 0000000A 9500 COM R16
\ 0000000C .... RCALL TransmitByte
101 tmp = *buffer ++;
\ 0000000E 910D LD R16, X+
102 TransmitByte(~tmp);
\ 00000010 9500 COM R16
\ 00000012 .... RCALL TransmitByte
103 SelectRow(i);
\ 00000014 2F08 MOV R16, R24
\ 00000016 .... RCALL SelectRow
104 FlipLatchLine();
\ 00000018 .... RCALL FlipLatchLine
105 }
\ 0000001A 9583 INC R24
\ ??PrintDotLed_0:
\ 0000001C 3180 CPI R24, 16
\ 0000001E F3A0 BRCS ??PrintDotLed_1
106 }
\ 00000020 E0E4 LDI R30, 4
\ 00000022 .... RJMP ?EPILOGUE_B4_L09
\ In segment CODE, align 2, keep-with-next
107 void main(void)
\ main:
108 {
109 InitDotLedPort();
\ 00000000 .... RCALL InitDotLedPort
110
111 EnableRow(TRUE);
\ 00000002 E001 LDI R16, 1
\ 00000004 .... RCALL EnableRow
112
113 while(1)
114 {
115 PrintDotLed(font);
\ ??main_0:
\ 00000006 .... LDI R16, LOW(font)
\ 00000008 .... LDI R17, (font) >> 8
\ 0000000A .... RCALL PrintDotLed
116 __delay_cycles(5000);
\ 0000000C EE01 LDI R16, 225
\ 0000000E E014 LDI R17, 4
\ 00000010 5001 SUBI R16, 1
\ 00000012 4010 SBCI R17, 0
\ 00000014 F7E9 BRNE $-4
\ 00000016 C000 RJMP $+2
\ 00000018 0000 NOP
\ 0000001A CFF5 RJMP ??main_0
117 }
118
119 }
\ In segment NEAR_ID, align 1, keep-with-next
\ `?<Initializer for font>`:
\ 00000000 000000003808 DB 0, 0, 0, 0, 8, 56, 24, 68, 8, 68, 8, 4, 8, 8, 8, 16, 8, 32, 8, 64, 8
\ 441844080408
\ 080810082008
\ 400808
\ 00000015 08403E40007C DB 64, 8, 64, 62, 124, 0, 0, 0, 0, 0, 0
\ 0000000000
120
121
122
Maximum stack usage in bytes:
Function CSTACK RSTACK
-------- ------ ------
EnableRow 0 2
FlipLatchLine 0 2
InitDotLedPort 0 2
PrintDotLed 4 2
-> TransmitByte 4 2
-> TransmitByte 4 2
-> SelectRow 4 2
-> FlipLatchLine 4 2
SelectRow 0 2
TransmitByte 0 4
main 0 2
-> InitDotLedPort 0 2
-> EnableRow 0 2
-> PrintDotLed 0 2
Segment part sizes:
Function/Label Bytes
-------------- -----
_A_PINC 1
_A_DDRC 1
_A_PORTC 1
_A_DDRB 1
_A_PORTB 1
font 32
TransmitByte 36
SelectRow 10
FlipLatchLine 6
InitDotLedPort 34
EnableRow 12
PrintDotLed 36
main 28
?<Initializer for font> 32
Others 6
5 bytes in segment ABSOLUTE
162 bytes in segment CODE
6 bytes in segment INITTAB
32 bytes in segment NEAR_I
32 bytes in segment NEAR_ID
194 bytes of CODE memory (+ 6 bytes shared)
32 bytes of DATA memory (+ 5 bytes shared)
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -