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

📄 avrx.lss

📁 AVR单片机专用的操作系统AVRX
💻 LSS
📖 第 1 页 / 共 3 页
字号:
		}
		else if(!(PINC & 0x20))
 27a:	9d 99       	sbic	0x13, 5	; 19
 27c:	04 c0       	rjmp	.+8      	; 0x286 <Key_DOWN+0x2e>
		{
			return (i<<2)+2;
 27e:	99 0f       	add	r25, r25
 280:	99 0f       	add	r25, r25
 282:	9e 5f       	subi	r25, 0xFE	; 254
 284:	0b c0       	rjmp	.+22     	; 0x29c <Key_DOWN+0x44>
		}
		else if(!(PINC & 0x40))
 286:	9e 99       	sbic	0x13, 6	; 19
 288:	04 c0       	rjmp	.+8      	; 0x292 <Key_DOWN+0x3a>
		{
			return (i<<2)+3;
 28a:	99 0f       	add	r25, r25
 28c:	99 0f       	add	r25, r25
 28e:	9d 5f       	subi	r25, 0xFD	; 253
 290:	05 c0       	rjmp	.+10     	; 0x29c <Key_DOWN+0x44>
		}
		else if(!(PINC & 0x80))
 292:	9f 99       	sbic	0x13, 7	; 19
 294:	06 c0       	rjmp	.+12     	; 0x2a2 <Key_DOWN+0x4a>
		{
			return (i<<2)+4;
 296:	99 0f       	add	r25, r25
 298:	99 0f       	add	r25, r25
 29a:	9c 5f       	subi	r25, 0xFC	; 252
 29c:	89 2f       	mov	r24, r25
 29e:	99 27       	eor	r25, r25
 2a0:	08 95       	ret
		}
		PORTC=(PORTC<<1) | 1;
 2a2:	85 b3       	in	r24, 0x15	; 21
 2a4:	88 0f       	add	r24, r24
 2a6:	81 60       	ori	r24, 0x01	; 1
 2a8:	85 bb       	out	0x15, r24	; 21
 2aa:	2f 5f       	subi	r18, 0xFF	; 255
 2ac:	3f 4f       	sbci	r19, 0xFF	; 255
 2ae:	24 30       	cpi	r18, 0x04	; 4
 2b0:	31 05       	cpc	r19, r1
 2b2:	c9 f6       	brne	.-78     	; 0x266 <Key_DOWN+0xe>
 2b4:	80 e0       	ldi	r24, 0x00	; 0
 2b6:	90 e0       	ldi	r25, 0x00	; 0
	}
	return 0;
}
 2b8:	08 95       	ret

000002ba <Key>:

unsigned char Key(void)
{
 2ba:	1f 93       	push	r17
 	unsigned char t=0;
  	if(Key_DOWN()>0)     //检测到按键
 2bc:	0e 94 2c 01 	call	0x258	; 0x258 <Key_DOWN>
 2c0:	88 23       	and	r24, r24
 2c2:	91 f0       	breq	.+36     	; 0x2e8 <Key+0x2e>
	{
	  t=Key_DOWN();
 2c4:	0e 94 2c 01 	call	0x258	; 0x258 <Key_DOWN>
 2c8:	18 2f       	mov	r17, r24
 */
void
_delay_loop_2(uint16_t __count)
{
	__asm__ volatile (
 2ca:	80 e0       	ldi	r24, 0x00	; 0
 2cc:	9c e6       	ldi	r25, 0x6C	; 108
 2ce:	01 97       	sbiw	r24, 0x01	; 1
 2d0:	f1 f7       	brne	.-4      	; 0x2ce <Key+0x14>
	  _delay_ms(10);
	  if(t==Key_DOWN())  //确定有键按下
 2d2:	0e 94 2c 01 	call	0x258	; 0x258 <Key_DOWN>
 2d6:	18 17       	cp	r17, r24
 2d8:	39 f4       	brne	.+14     	; 0x2e8 <Key+0x2e>
	  {
	 	while(t==Key_DOWN()); //等待释放按键
 2da:	0e 94 2c 01 	call	0x258	; 0x258 <Key_DOWN>
 2de:	18 17       	cp	r17, r24
 2e0:	e1 f3       	breq	.-8      	; 0x2da <Key+0x20>
		return t;
 2e2:	81 2f       	mov	r24, r17
 2e4:	99 27       	eor	r25, r25
 2e6:	02 c0       	rjmp	.+4      	; 0x2ec <Key+0x32>
 2e8:	80 e0       	ldi	r24, 0x00	; 0
 2ea:	90 e0       	ldi	r25, 0x00	; 0
 2ec:	1f 91       	pop	r17
 2ee:	08 95       	ret

000002f0 <SendChar>:
#include "includes.h"

void SendChar(char c)//发送一个字符
{
	while(!(UCSR0A & (1<<UDRE0)));
 2f0:	5d 9b       	sbis	0x0b, 5	; 11
 2f2:	fe cf       	rjmp	.-4      	; 0x2f0 <SendChar>
	UDR0=c;
 2f4:	8c b9       	out	0x0c, r24	; 12
 2f6:	08 95       	ret

000002f8 <SendString>:
}

void SendString(char *str)//发送字符串
{
 2f8:	fc 01       	movw	r30, r24
 2fa:	04 c0       	rjmp	.+8      	; 0x304 <SendString+0xc>
	unsigned int i=0;
	while(str[i]!='\0')
	{
		while(!(UCSR0A & (1<<UDRE0)));
 2fc:	5d 9b       	sbis	0x0b, 5	; 11
 2fe:	fe cf       	rjmp	.-4      	; 0x2fc <SendString+0x4>
		UDR0=str[i]; 
 300:	81 91       	ld	r24, Z+
 302:	8c b9       	out	0x0c, r24	; 12
 304:	80 81       	ld	r24, Z
 306:	88 23       	and	r24, r24
 308:	c9 f7       	brne	.-14     	; 0x2fc <SendString+0x4>
 30a:	08 95       	ret

0000030c <GetChar>:
		i++;
	}
} 	

char GetChar(void)           //接收一个字符                 
{
	while(!(UCSR0A & (1<<RXC1)));
 30c:	5f 9b       	sbis	0x0b, 7	; 11
 30e:	fe cf       	rjmp	.-4      	; 0x30c <GetChar>
	return UDR0;
 310:	8c b1       	in	r24, 0x0c	; 12
}
 312:	99 27       	eor	r25, r25
 314:	08 95       	ret

00000316 <IntProlog>:
 316:	df 93       	push	r29
 318:	cf 93       	push	r28
 31a:	bf 93       	push	r27
 31c:	af 93       	push	r26
 31e:	9f 93       	push	r25
 320:	d2 e0       	ldi	r29, 0x02	; 2
 322:	c8 e3       	ldi	r28, 0x38	; 56
 324:	9f b7       	in	r25, 0x3f	; 63
 326:	ae 81       	ldd	r26, Y+6	; 0x06
 328:	af 5f       	subi	r26, 0xFF	; 255
 32a:	ae 83       	std	Y+6, r26	; 0x06
 32c:	60 f0       	brcs	.+24     	; 0x346 <SaveContext>
 32e:	aa 81       	ldd	r26, Y+2	; 0x02
 330:	bb 81       	ldd	r27, Y+3	; 0x03
 332:	ba 2b       	or	r27, r26
 334:	41 f4       	brne	.+16     	; 0x346 <SaveContext>
 336:	cd b7       	in	r28, 0x3d	; 61
 338:	de b7       	in	r29, 0x3e	; 62
 33a:	fe 81       	ldd	r31, Y+6	; 0x06
 33c:	ef 81       	ldd	r30, Y+7	; 0x07
 33e:	29 96       	adiw	r28, 0x09	; 9
 340:	cd bf       	out	0x3d, r28	; 61
 342:	de bf       	out	0x3e, r29	; 62
 344:	09 94       	ijmp

00000346 <SaveContext>:
 346:	8f 93       	push	r24
 348:	7f 93       	push	r23
 34a:	6f 93       	push	r22
 34c:	5f 93       	push	r21
 34e:	4f 93       	push	r20
 350:	3f 93       	push	r19
 352:	2f 93       	push	r18
 354:	1f 93       	push	r17
 356:	0f 93       	push	r16
 358:	ff 92       	push	r15
 35a:	ef 92       	push	r14
 35c:	df 92       	push	r13
 35e:	cf 92       	push	r12
 360:	bf 92       	push	r11
 362:	af 92       	push	r10
 364:	9f 92       	push	r9
 366:	8f 92       	push	r8
 368:	7f 92       	push	r7
 36a:	6f 92       	push	r6
 36c:	5f 92       	push	r5
 36e:	4f 92       	push	r4
 370:	3f 92       	push	r3
 372:	2f 92       	push	r2
 374:	1f 92       	push	r1
 376:	0f 92       	push	r0
 378:	9f 93       	push	r25
 37a:	cd b7       	in	r28, 0x3d	; 61
 37c:	de b7       	in	r29, 0x3e	; 62
 37e:	9b 8d       	ldd	r25, Y+27	; 0x1b
 380:	39 a1       	ldd	r19, Y+33	; 0x21
 382:	48 a1       	ldd	r20, Y+32	; 0x20
 384:	e8 a3       	std	Y+32, r30	; 0x20
 386:	f9 a3       	std	Y+33, r31	; 0x21
 388:	70 f0       	brcs	.+28     	; 0x3a6 <AlreadyInKernel>
 38a:	f2 e0       	ldi	r31, 0x02	; 2
 38c:	e8 e3       	ldi	r30, 0x38	; 56
 38e:	d3 81       	ldd	r29, Z+3	; 0x03
 390:	c2 81       	ldd	r28, Z+2	; 0x02
 392:	be b7       	in	r27, 0x3e	; 62
 394:	ad b7       	in	r26, 0x3d	; 61
 396:	bd 83       	std	Y+5, r27	; 0x05
 398:	ac 83       	std	Y+4, r26	; 0x04
 39a:	24 81       	ldd	r18, Z+4	; 0x04
 39c:	2d bf       	out	0x3d, r18	; 61
 39e:	25 81       	ldd	r18, Z+5	; 0x05
 3a0:	2e bf       	out	0x3e, r18	; 62
 3a2:	ca 2f       	mov	r28, r26
 3a4:	db 2f       	mov	r29, r27

000003a6 <AlreadyInKernel>:
 3a6:	11 24       	eor	r1, r1
 3a8:	e3 2f       	mov	r30, r19
 3aa:	f4 2f       	mov	r31, r20
 3ac:	09 94       	ijmp

000003ae <Epilog>:
 3ae:	ef 91       	pop	r30
 3b0:	ef 91       	pop	r30

000003b2 <_Epilog>:
 3b2:	e8 e3       	ldi	r30, 0x38	; 56
 3b4:	f2 e0       	ldi	r31, 0x02	; 2
 3b6:	f8 94       	cli
 3b8:	06 81       	ldd	r16, Z+6	; 0x06
 3ba:	0a 95       	dec	r16
 3bc:	06 83       	std	Z+6, r16	; 0x06
 3be:	54 f4       	brge	.+20     	; 0x3d4 <SkipTaskSwap>
 3c0:	d1 81       	ldd	r29, Z+1	; 0x01
 3c2:	c0 81       	ld	r28, Z
 3c4:	d3 83       	std	Z+3, r29	; 0x03
 3c6:	c2 83       	std	Z+2, r28	; 0x02
 3c8:	20 96       	adiw	r28, 0x00	; 0
 3ca:	39 f1       	breq	.+78     	; 0x41a <_IdleTask>
 3cc:	bd 81       	ldd	r27, Y+5	; 0x05
 3ce:	ac 81       	ldd	r26, Y+4	; 0x04
 3d0:	ad bf       	out	0x3d, r26	; 61
 3d2:	be bf       	out	0x3e, r27	; 62

000003d4 <SkipTaskSwap>:
 3d4:	0f 90       	pop	r0
 3d6:	0f be       	out	0x3f, r0	; 63
 3d8:	0f 90       	pop	r0
 3da:	1f 90       	pop	r1
 3dc:	2f 90       	pop	r2
 3de:	3f 90       	pop	r3
 3e0:	4f 90       	pop	r4
 3e2:	5f 90       	pop	r5
 3e4:	6f 90       	pop	r6
 3e6:	7f 90       	pop	r7
 3e8:	8f 90       	pop	r8
 3ea:	9f 90       	pop	r9
 3ec:	af 90       	pop	r10
 3ee:	bf 90       	pop	r11
 3f0:	cf 90       	pop	r12
 3f2:	df 90       	pop	r13
 3f4:	ef 90       	pop	r14
 3f6:	ff 90       	pop	r15
 3f8:	0f 91       	pop	r16
 3fa:	1f 91       	pop	r17
 3fc:	2f 91       	pop	r18
 3fe:	3f 91       	pop	r19
 400:	4f 91       	pop	r20
 402:	5f 91       	pop	r21
 404:	6f 91       	pop	r22
 406:	7f 91       	pop	r23
 408:	8f 91       	pop	r24
 40a:	9f 91       	pop	r25
 40c:	af 91       	pop	r26
 40e:	bf 91       	pop	r27
 410:	cf 91       	pop	r28
 412:	df 91       	pop	r29
 414:	ef 91       	pop	r30
 416:	ff 91       	pop	r31
 418:	18 95       	reti

0000041a <_IdleTask>:
 41a:	78 94       	sei
 41c:	88 95       	sleep

0000041e <snooze>:
 41e:	fd cf       	rjmp	.-6      	; 0x41a <_IdleTask>

00000420 <AvrXSetKernelStack>:
 420:	ff 91       	pop	r31
 422:	ef 91       	pop	r30
 424:	80 50       	subi	r24, 0x00	; 0
 426:	90 40       	sbci	r25, 0x00	; 0
 428:	11 f4       	brne	.+4      	; 0x42e <sks1>
 42a:	8d b7       	in	r24, 0x3d	; 61
 42c:	9e b7       	in	r25, 0x3e	; 62

0000042e <sks1>:
 42e:	80 93 3c 02 	sts	0x023C, r24
 432:	90 93 3d 02 	sts	0x023D, r25
 436:	09 94       	ijmp

00000438 <AvrXRunTask>:
 438:	01 d0       	rcall	.+2      	; 0x43c <AvrXInitTask>
 43a:	23 c0       	rjmp	.+70     	; 0x482 <AvrXResume>

0000043c <AvrXInitTask>:
 43c:	e8 2f       	mov	r30, r24
 43e:	f9 2f       	mov	r31, r25
 440:	1d d0       	rcall	.+58     	; 0x47c <lpm_inc>
 442:	a0 2d       	mov	r26, r0
 444:	1b d0       	rcall	.+54     	; 0x47c <lpm_inc>
 446:	b0 2d       	mov	r27, r0
 448:	19 d0       	rcall	.+50     	; 0x47c <lpm_inc>
 44a:	0c 92       	st	X, r0
 44c:	17 d0       	rcall	.+46     	; 0x47c <lpm_inc>
 44e:	0e 92       	st	-X, r0
 450:	40 e0       	ldi	r20, 0x00	; 0
 452:	40 e0       	ldi	r20, 0x00	; 0
 454:	51 e2       	ldi	r21, 0x21	; 33

00000456 <PushRegisters>:
 456:	4e 93       	st	-X, r20
 458:	5a 95       	dec	r21
 45a:	e9 f7       	brne	.-6      	; 0x456 <PushRegisters>
 45c:	11 97       	sbiw	r26, 0x01	; 1
 45e:	0e d0       	rcall	.+28     	; 0x47c <lpm_inc>
 460:	80 2d       	mov	r24, r0
 462:	0c d0       	rcall	.+24     	; 0x47c <lpm_inc>
 464:	90 2d       	mov	r25, r0
 466:	0a d0       	rcall	.+20     	; 0x47c <lpm_inc>
 468:	e8 2f       	mov	r30, r24
 46a:	f9 2f       	mov	r31, r25
 46c:	a4 83       	std	Z+4, r26	; 0x04
 46e:	b5 83       	std	Z+5, r27	; 0x05
 470:	03 82       	std	Z+3, r0	; 0x03
 472:	a0 e6       	ldi	r26, 0x60	; 96
 474:	a2 83       	std	Z+2, r26	; 0x02
 476:	41 83       	std	Z+1, r20	; 0x01
 478:	40 83       	st	Z, r20
 47a:	08 95       	ret

0000047c <lpm_inc>:
 47c:	c8 95       	lpm
 47e:	31 96       	adiw	r30, 0x01	; 1
 480:	08 95       	ret

00000482 <AvrXResume>:
 482:	f8 94       	cli
 484:	48 df       	rcall	.-368    	; 0x316 <IntProlog>
 486:	78 94       	sei
 488:	e8 2f       	mov	r30, r24
 48a:	f9 2f       	mov	r31, r25
 48c:	22 81       	ldd	r18, Z+2	; 0x02
 48e:	2f 7d       	andi	r18, 0xDF	; 223
 490:	22 83       	std	Z+2, r18	; 0x02
 492:	26 ff       	sbrs	r18, 6
 494:	03 c0       	rjmp	.+6      	; 0x49c <ar00>
 496:	2f 7b       	andi	r18, 0xBF	; 191
 498:	22 83       	std	Z+2, r18	; 0x02
 49a:	01 d0       	rcall	.+2      	; 0x49e <_QueuePid>

0000049c <ar00>:
 49c:	8a cf       	rjmp	.-236    	; 0x3b2 <_Epilog>

0000049e <_QueuePid>:
 49e:	e8 2f       	mov	r30, r24
 4a0:	f9 2f       	mov	r31, r25
 4a2:	3f ef       	ldi	r19, 0xFF	; 255
 4a4:	22 81       	ldd	r18, Z+2	; 0x02

⌨️ 快捷键说明

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