⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.lss

📁 atmega16L输入捕获经典试验已经通过验证
💻 LSS
📖 第 1 页 / 共 5 页
字号:

main.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000dec  00000000  00000000  00000094  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .data         0000008e  00800060  00000dec  00000e80  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000000e  008000ee  008000ee  00000f0e  2**0
                  ALLOC
  3 .noinit       00000000  008000fc  008000fc  00000f0e  2**0
                  CONTENTS
  4 .eeprom       00000000  00810000  00810000  00000f0e  2**0
                  CONTENTS
  5 .stab         00000b1c  00000000  00000000  00000f10  2**2
                  CONTENTS, READONLY, DEBUGGING
  6 .stabstr      00000796  00000000  00000000  00001a2c  2**0
                  CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:

00000000 <__vectors>:
   0:	0c 94 2a 00 	jmp	0x54
   4:	0c 94 45 00 	jmp	0x8a
   8:	0c 94 45 00 	jmp	0x8a
   c:	0c 94 45 00 	jmp	0x8a
  10:	0c 94 45 00 	jmp	0x8a
  14:	0c 94 0e 01 	jmp	0x21c
  18:	0c 94 45 00 	jmp	0x8a
  1c:	0c 94 45 00 	jmp	0x8a
  20:	0c 94 45 00 	jmp	0x8a
  24:	0c 94 45 00 	jmp	0x8a
  28:	0c 94 45 00 	jmp	0x8a
  2c:	0c 94 45 00 	jmp	0x8a
  30:	0c 94 45 00 	jmp	0x8a
  34:	0c 94 45 00 	jmp	0x8a
  38:	0c 94 45 00 	jmp	0x8a
  3c:	0c 94 45 00 	jmp	0x8a
  40:	0c 94 45 00 	jmp	0x8a
  44:	0c 94 45 00 	jmp	0x8a
  48:	0c 94 45 00 	jmp	0x8a
  4c:	0c 94 45 00 	jmp	0x8a
  50:	0c 94 45 00 	jmp	0x8a

00000054 <__ctors_end>:
  54:	11 24       	eor	r1, r1
  56:	1f be       	out	0x3f, r1	; 63
  58:	cf e5       	ldi	r28, 0x5F	; 95
  5a:	d4 e0       	ldi	r29, 0x04	; 4
  5c:	de bf       	out	0x3e, r29	; 62
  5e:	cd bf       	out	0x3d, r28	; 61

00000060 <__do_copy_data>:
  60:	10 e0       	ldi	r17, 0x00	; 0
  62:	a0 e6       	ldi	r26, 0x60	; 96
  64:	b0 e0       	ldi	r27, 0x00	; 0
  66:	ec ee       	ldi	r30, 0xEC	; 236
  68:	fd e0       	ldi	r31, 0x0D	; 13
  6a:	02 c0       	rjmp	.+4      	; 0x70

0000006c <.do_copy_data_loop>:
  6c:	05 90       	lpm	r0, Z+
  6e:	0d 92       	st	X+, r0

00000070 <.do_copy_data_start>:
  70:	ae 3e       	cpi	r26, 0xEE	; 238
  72:	b1 07       	cpc	r27, r17
  74:	d9 f7       	brne	.-10     	; 0x6c

00000076 <__do_clear_bss>:
  76:	10 e0       	ldi	r17, 0x00	; 0
  78:	ae ee       	ldi	r26, 0xEE	; 238
  7a:	b0 e0       	ldi	r27, 0x00	; 0
  7c:	01 c0       	rjmp	.+2      	; 0x80

0000007e <.do_clear_bss_loop>:
  7e:	1d 92       	st	X+, r1

00000080 <.do_clear_bss_start>:
  80:	ac 3f       	cpi	r26, 0xFC	; 252
  82:	b1 07       	cpc	r27, r17
  84:	e1 f7       	brne	.-8      	; 0x7e
  86:	0c 94 50 01 	jmp	0x2a0

0000008a <__bad_interrupt>:
  8a:	0c 94 00 00 	jmp	0x0

0000008e <LCD_en_write>:
  }
void LCD_en_write(void)  
{
  //LCD_wait_busy();
  LCD_EN_PORT|=LCD_EN;
  8e:	ab 9a       	sbi	0x15, 3	; 21
		__ticks = 1;
	else if (__tmp > 255)
		__ticks = 0;	/* i.e. 256 */
	else
		__ticks = (uint8_t)__tmp;
  90:	85 e3       	ldi	r24, 0x35	; 53
  92:	8a 95       	dec	r24
  94:	f1 f7       	brne	.-4      	; 0x92
{
  //LCD_wait_busy();
  LCD_EN_PORT|=LCD_EN;
  _delay_us(20);
  LCD_EN_PORT&=~LCD_EN;
  96:	ab 98       	cbi	0x15, 3	; 21
  98:	08 95       	ret

0000009a <LCD_write_char>:
}
void LCD_write_char(unsigned command,unsigned data) 
{
  9a:	0f 93       	push	r16
  9c:	1f 93       	push	r17
  9e:	cf 93       	push	r28
  a0:	df 93       	push	r29
  a2:	ec 01       	movw	r28, r24
  a4:	8b 01       	movw	r16, r22
		__ticks = 1;
	else if (__tmp > 255)
		__ticks = 0;	/* i.e. 256 */
	else
		__ticks = (uint8_t)__tmp;
  a6:	85 e3       	ldi	r24, 0x35	; 53
  a8:	8a 95       	dec	r24
  aa:	f1 f7       	brne	.-4      	; 0xa8
 unsigned command_temp,data_temp,temp;
 command_temp=command;
 data_temp=data;
 _delay_us(20);
 if(command==0)
  ac:	20 97       	sbiw	r28, 0x00	; 0
  ae:	b1 f4       	brne	.+44     	; 0xdc
 {
  LCD_RS_PORT|=LCD_RS;  //RS=1
  b0:	a9 9a       	sbi	0x15, 1	; 21
  temp=data_temp;
  data_temp=data_temp>>4;  
  b2:	9b 01       	movw	r18, r22
  b4:	94 e0       	ldi	r25, 0x04	; 4
  b6:	36 95       	lsr	r19
  b8:	27 95       	ror	r18
  ba:	9a 95       	dec	r25
  bc:	e1 f7       	brne	.-8      	; 0xb6
  LCD_DATA_PORT&=~LCD_DATA;
  be:	82 b3       	in	r24, 0x12	; 18
  c0:	80 7f       	andi	r24, 0xF0	; 240
  c2:	82 bb       	out	0x12, r24	; 18
  LCD_DATA_PORT|=data_temp&LCD_DATA;  
  c4:	92 2f       	mov	r25, r18
  c6:	9f 70       	andi	r25, 0x0F	; 15
  c8:	82 b3       	in	r24, 0x12	; 18
  ca:	89 2b       	or	r24, r25
  cc:	82 bb       	out	0x12, r24	; 18
  LCD_en_write();
  ce:	0e 94 47 00 	call	0x8e
  LCD_DATA_PORT&=~LCD_DATA;
  d2:	82 b3       	in	r24, 0x12	; 18
  d4:	80 7f       	andi	r24, 0xF0	; 240
  d6:	82 bb       	out	0x12, r24	; 18
  LCD_DATA_PORT|=temp&LCD_DATA;  //
  d8:	90 2f       	mov	r25, r16
  da:	15 c0       	rjmp	.+42     	; 0x106
  LCD_en_write();
 }
 else
 {
  LCD_RS_PORT&=~LCD_RS;   //RS=0
  dc:	a9 98       	cbi	0x15, 1	; 21
  temp=command_temp;
  command_temp=command_temp>>4;
  de:	9e 01       	movw	r18, r28
  e0:	84 e0       	ldi	r24, 0x04	; 4
  e2:	36 95       	lsr	r19
  e4:	27 95       	ror	r18
  e6:	8a 95       	dec	r24
  e8:	e1 f7       	brne	.-8      	; 0xe2
  LCD_DATA_PORT&=~LCD_DATA;
  ea:	82 b3       	in	r24, 0x12	; 18
  ec:	80 7f       	andi	r24, 0xF0	; 240
  ee:	82 bb       	out	0x12, r24	; 18
  LCD_DATA_PORT|=command_temp&LCD_DATA;  
  f0:	92 2f       	mov	r25, r18
  f2:	9f 70       	andi	r25, 0x0F	; 15
  f4:	82 b3       	in	r24, 0x12	; 18
  f6:	89 2b       	or	r24, r25
  f8:	82 bb       	out	0x12, r24	; 18
  LCD_en_write();
  fa:	0e 94 47 00 	call	0x8e
  LCD_DATA_PORT&=~LCD_DATA;
  fe:	82 b3       	in	r24, 0x12	; 18
 100:	80 7f       	andi	r24, 0xF0	; 240
 102:	82 bb       	out	0x12, r24	; 18
  LCD_DATA_PORT|=temp&LCD_DATA; 
 104:	9c 2f       	mov	r25, r28
 106:	9f 70       	andi	r25, 0x0F	; 15
 108:	82 b3       	in	r24, 0x12	; 18
 10a:	89 2b       	or	r24, r25
 10c:	82 bb       	out	0x12, r24	; 18
  LCD_en_write();
 10e:	0e 94 47 00 	call	0x8e
 112:	df 91       	pop	r29
 114:	cf 91       	pop	r28
 116:	1f 91       	pop	r17
 118:	0f 91       	pop	r16
 11a:	08 95       	ret

0000011c <LCD_set_xy>:
 11c:	98 2f       	mov	r25, r24
 11e:	66 23       	and	r22, r22
 120:	19 f4       	brne	.+6      	; 0x128
 122:	89 2f       	mov	r24, r25
 124:	80 58       	subi	r24, 0x80	; 128
 126:	02 c0       	rjmp	.+4      	; 0x12c
 128:	89 2f       	mov	r24, r25
 12a:	80 54       	subi	r24, 0x40	; 64
 12c:	60 e0       	ldi	r22, 0x00	; 0
 12e:	70 e0       	ldi	r23, 0x00	; 0
 130:	99 27       	eor	r25, r25
 132:	0e 94 4d 00 	call	0x9a
 136:	08 95       	ret

00000138 <LCD_init>:
 138:	cf 93       	push	r28
 13a:	df 93       	push	r29
 13c:	e0 e0       	ldi	r30, 0x00	; 0
 13e:	f0 e0       	ldi	r31, 0x00	; 0
 140:	c9 e0       	ldi	r28, 0x09	; 9
 142:	d0 e0       	ldi	r29, 0x00	; 0
 */
static __inline__ void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
 144:	cf 01       	movw	r24, r30
 146:	01 97       	sbiw	r24, 0x01	; 1
 148:	f1 f7       	brne	.-4      	; 0x146
void LCD_set_xy       (unsigned char x, unsigned char y);
void LCD_init(void) 
{
  unsigned int i=0; 
  for (i=0;i<10;i++)
 14a:	21 97       	sbiw	r28, 0x01	; 1
 14c:	d7 ff       	sbrs	r29, 7
 14e:	fa cf       	rjmp	.-12     	; 0x144
 150:	c3 e1       	ldi	r28, 0x13	; 19
 152:	d0 e0       	ldi	r29, 0x00	; 0
  _delay_ms(100); 
  for (i=0;i<20;i++) 
    { 
	LCD_write_char(0x28,0);  //4位显示
 154:	60 e0       	ldi	r22, 0x00	; 0
 156:	70 e0       	ldi	r23, 0x00	; 0
 158:	88 e2       	ldi	r24, 0x28	; 40
 15a:	90 e0       	ldi	r25, 0x00	; 0
 15c:	0e 94 4d 00 	call	0x9a
		__ticks = 1;
	else if (__tmp > 65535)
		__ticks = 0;	/* i.e. 65536 */
	else
		__ticks = (uint16_t)__tmp;
 160:	80 e3       	ldi	r24, 0x30	; 48
 162:	95 e7       	ldi	r25, 0x75	; 117
 164:	01 97       	sbiw	r24, 0x01	; 1
 166:	f1 f7       	brne	.-4      	; 0x164
{
  unsigned int i=0; 
  for (i=0;i<10;i++)
  _delay_ms(100); 
  for (i=0;i<20;i++) 
 168:	21 97       	sbiw	r28, 0x01	; 1
 16a:	d7 ff       	sbrs	r29, 7
 16c:	f3 cf       	rjmp	.-26     	; 0x154
    { 
	LCD_write_char(0x28,0);  //4位显示
    _delay_ms(15); 
    } 
 LCD_write_char(0x0c,0);  //显示开
 16e:	60 e0       	ldi	r22, 0x00	; 0
 170:	70 e0       	ldi	r23, 0x00	; 0
 172:	8c e0       	ldi	r24, 0x0C	; 12
 174:	90 e0       	ldi	r25, 0x00	; 0
 176:	0e 94 4d 00 	call	0x9a
		__ticks = 1;
	else if (__tmp > 65535)
		__ticks = 0;	/* i.e. 65536 */
	else
		__ticks = (uint16_t)__tmp;
 17a:	80 e1       	ldi	r24, 0x10	; 16
 17c:	97 e2       	ldi	r25, 0x27	; 39
 17e:	01 97       	sbiw	r24, 0x01	; 1
 180:	f1 f7       	brne	.-4      	; 0x17e
    _delay_ms(15); 
    } 
 LCD_write_char(0x0c,0);  //显示开
 _delay_ms(5); 
 LCD_write_char(0x01,0);  
 182:	60 e0       	ldi	r22, 0x00	; 0
 184:	70 e0       	ldi	r23, 0x00	; 0
 186:	81 e0       	ldi	r24, 0x01	; 1
 188:	90 e0       	ldi	r25, 0x00	; 0
 18a:	0e 94 4d 00 	call	0x9a
 18e:	df 91       	pop	r29
 190:	cf 91       	pop	r28
 192:	08 95       	ret

00000194 <LCD_putc>:
}

  void LCD_set_xy( unsigned char x, unsigned char y )  
  {
    unsigned char address;
    if (y == 0) address = 0x80 + x;
    else 
       address = 0xc0 + x;
    LCD_write_char( address, 0 );
  }
void LCD_en_write(void)  
{
  //LCD_wait_busy();
  LCD_EN_PORT|=LCD_EN;
  _delay_us(20);
  LCD_EN_PORT&=~LCD_EN;
}
void LCD_write_char(unsigned command,unsigned data) 
{
 unsigned command_temp,data_temp,temp;
 command_temp=command;
 data_temp=data;
 _delay_us(20);
 if(command==0)
 {
  LCD_RS_PORT|=LCD_RS;  //RS=1
  temp=data_temp;
  data_temp=data_temp>>4;  
  LCD_DATA_PORT&=~LCD_DATA;
  LCD_DATA_PORT|=data_temp&LCD_DATA;  
  LCD_en_write();
  LCD_DATA_PORT&=~LCD_DATA;
  LCD_DATA_PORT|=temp&LCD_DATA;  //
  LCD_en_write();
 }
 else
 {
  LCD_RS_PORT&=~LCD_RS;   //RS=0
  temp=command_temp;
  command_temp=command_temp>>4;
  LCD_DATA_PORT&=~LCD_DATA;
  LCD_DATA_PORT|=command_temp&LCD_DATA;  
  LCD_en_write();
  LCD_DATA_PORT&=~LCD_DATA;
  LCD_DATA_PORT|=temp&LCD_DATA; 
  LCD_en_write();
  }
}

int LCD_putc(unsigned char c)//标准输入流
{
 194:	cf 93       	push	r28
 196:	c8 2f       	mov	r28, r24
	if (c=='\n') //换行
 198:	8a 30       	cpi	r24, 0x0A	; 10
 19a:	49 f4       	brne	.+18     	; 0x1ae
	{Y^=1;
 19c:	80 91 ee 00 	lds	r24, 0x00EE
 1a0:	91 e0       	ldi	r25, 0x01	; 1
 1a2:	89 27       	eor	r24, r25
 1a4:	80 93 ee 00 	sts	0x00EE, r24
	 X=0;
 1a8:	10 92 ef 00 	sts	0x00EF, r1
 1ac:	13 c0       	rjmp	.+38     	; 0x1d4
	}
	else if (c=='\t') Y^=1;//下移一格
 1ae:	89 30       	cpi	r24, 0x09	; 9
 1b0:	39 f4       	brne	.+14     	; 0x1c0
 1b2:	80 91 ee 00 	lds	r24, 0x00EE
 1b6:	91 e0       	ldi	r25, 0x01	; 1
 1b8:	89 27       	eor	r24, r25
 1ba:	80 93 ee 00 	sts	0x00EE, r24
 1be:	0a c0       	rjmp	.+20     	; 0x1d4
	else if(c=='\v') X++;//左移一格
 1c0:	8b 30       	cpi	r24, 0x0B	; 11
 1c2:	31 f4       	brne	.+12     	; 0x1d0
 1c4:	80 91 ef 00 	lds	r24, 0x00EF
 1c8:	8f 5f       	subi	r24, 0xFF	; 255
 1ca:	80 93 ef 00 	sts	0x00EF, r24
 1ce:	02 c0       	rjmp	.+4      	; 0x1d4
	if (c<32) return 1;
 1d0:	80 32       	cpi	r24, 0x20	; 32
 1d2:	18 f4       	brcc	.+6      	; 0x1da
 1d4:	81 e0       	ldi	r24, 0x01	; 1

⌨️ 快捷键说明

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