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

📄 gs.lss

📁 基于AVR单片机(ATMega64)的辞别力拼图游戏
💻 LSS
📖 第 1 页 / 共 4 页
字号:
 622:	64 e3       	ldi	r22, 0x34	; 52
 624:	80 e0       	ldi	r24, 0x00	; 0
 626:	0e 94 30 02 	call	0x460 <w_lcd>
    for(j=0;j<32;j++)		//draw the down half piture
 62a:	00 e0       	ldi	r16, 0x00	; 0
 62c:	10 e0       	ldi	r17, 0x00	; 0
      {
	   w_lcd(com,0x80+j);		//Y address
 62e:	80 2f       	mov	r24, r16
 630:	80 58       	subi	r24, 0x80	; 128
 632:	68 2f       	mov	r22, r24
 634:	80 e0       	ldi	r24, 0x00	; 0
 636:	0e 94 30 02 	call	0x460 <w_lcd>
       w_lcd(com,0x80);			//X address
 63a:	60 e8       	ldi	r22, 0x80	; 128
 63c:	80 e0       	ldi	r24, 0x00	; 0
 63e:	0e 94 30 02 	call	0x460 <w_lcd>
 642:	cf e1       	ldi	r28, 0x1F	; 31
 644:	d0 e0       	ldi	r29, 0x00	; 0
       for(i=0;i<32;i++)
          w_lcd(dat,0);
 646:	60 e0       	ldi	r22, 0x00	; 0
 648:	81 e0       	ldi	r24, 0x01	; 1
 64a:	0e 94 30 02 	call	0x460 <w_lcd>
 64e:	21 97       	sbiw	r28, 0x01	; 1
 650:	d7 ff       	sbrs	r29, 7
 652:	f9 cf       	rjmp	.-14     	; 0x646 <clr+0x54>
 654:	0f 5f       	subi	r16, 0xFF	; 255
 656:	1f 4f       	sbci	r17, 0xFF	; 255
 658:	00 32       	cpi	r16, 0x20	; 32
 65a:	11 05       	cpc	r17, r1
 65c:	40 f3       	brcs	.-48     	; 0x62e <clr+0x3c>
      }
	}
 if(ty==8)		//clr dis buffer
 65e:	28 e0       	ldi	r18, 0x08	; 8
 660:	f2 16       	cp	r15, r18
 662:	51 f4       	brne	.+20     	; 0x678 <clr+0x86>
 664:	87 e7       	ldi	r24, 0x77	; 119
 666:	90 e0       	ldi	r25, 0x00	; 0
 668:	fc 01       	movw	r30, r24
   {
    for(i=0;i<1024;i++)
	  disbuf[i]=0;
 66a:	11 92       	st	Z+, r1
 66c:	01 96       	adiw	r24, 0x01	; 1
 66e:	24 e0       	ldi	r18, 0x04	; 4
 670:	86 37       	cpi	r24, 0x76	; 118
 672:	92 07       	cpc	r25, r18
 674:	d1 f3       	breq	.-12     	; 0x66a <clr+0x78>
 676:	c8 f3       	brcs	.-14     	; 0x66a <clr+0x78>
 678:	df 91       	pop	r29
 67a:	cf 91       	pop	r28
 67c:	1f 91       	pop	r17
 67e:	0f 91       	pop	r16
 680:	ff 90       	pop	r15
 682:	08 95       	ret

00000684 <lcd_ini>:
   }
   
}

void lcd_ini(void)
{
 set(1);
 684:	81 e0       	ldi	r24, 0x01	; 1
 686:	0e 94 44 02 	call	0x488 <set>
 clr(3); 
 68a:	83 e0       	ldi	r24, 0x03	; 3
 68c:	0e 94 f9 02 	call	0x5f2 <clr>
 clr(8);
 690:	88 e0       	ldi	r24, 0x08	; 8
 692:	0e 94 f9 02 	call	0x5f2 <clr>
 696:	08 95       	ret

00000698 <go>:
}

/*光标定位*/
void go(uchar xxx, uchar yyy)
{ w_lcd(com,0x32);
 698:	1f 93       	push	r17
 69a:	cf 93       	push	r28
 69c:	c8 2f       	mov	r28, r24
 69e:	16 2f       	mov	r17, r22
 6a0:	62 e3       	ldi	r22, 0x32	; 50
 6a2:	80 e0       	ldi	r24, 0x00	; 0
 6a4:	0e 94 30 02 	call	0x460 <w_lcd>
  if(yyy==0)  w_lcd(com,0x80+xxx);
 6a8:	11 23       	and	r17, r17
 6aa:	21 f4       	brne	.+8      	; 0x6b4 <go+0x1c>
 6ac:	c0 58       	subi	r28, 0x80	; 128
 6ae:	6c 2f       	mov	r22, r28
 6b0:	81 2f       	mov	r24, r17
 6b2:	0d c0       	rjmp	.+26     	; 0x6ce <go+0x36>
  else if(yyy==1) w_lcd(com,0x90+xxx);
 6b4:	11 30       	cpi	r17, 0x01	; 1
 6b6:	11 f4       	brne	.+4      	; 0x6bc <go+0x24>
 6b8:	c0 57       	subi	r28, 0x70	; 112
 6ba:	07 c0       	rjmp	.+14     	; 0x6ca <go+0x32>
  else if(yyy==2) w_lcd(com,0x88+xxx);
 6bc:	12 30       	cpi	r17, 0x02	; 2
 6be:	11 f4       	brne	.+4      	; 0x6c4 <go+0x2c>
 6c0:	c8 57       	subi	r28, 0x78	; 120
 6c2:	03 c0       	rjmp	.+6      	; 0x6ca <go+0x32>
  else if(yyy==3) w_lcd(com,0x98+xxx);
 6c4:	13 30       	cpi	r17, 0x03	; 3
 6c6:	29 f4       	brne	.+10     	; 0x6d2 <go+0x3a>
 6c8:	c8 56       	subi	r28, 0x68	; 104
 6ca:	6c 2f       	mov	r22, r28
 6cc:	80 e0       	ldi	r24, 0x00	; 0
 6ce:	0e 94 30 02 	call	0x460 <w_lcd>
 6d2:	cf 91       	pop	r28
 6d4:	1f 91       	pop	r17
 6d6:	08 95       	ret

000006d8 <wn>:
}
 
void wn(uchar num1,uchar num2)		//wtite nunbers or letters
{if(num1<10)
 6d8:	cf 93       	push	r28
 6da:	c6 2f       	mov	r28, r22
 6dc:	8a 30       	cpi	r24, 0x0A	; 10
 6de:	10 f4       	brcc	.+4      	; 0x6e4 <wn+0xc>
    w_lcd(dat,num1+0x30);
 6e0:	80 5d       	subi	r24, 0xD0	; 208
 6e2:	03 c0       	rjmp	.+6      	; 0x6ea <wn+0x12>
 else if(num1<16)
 6e4:	80 31       	cpi	r24, 0x10	; 16
 6e6:	08 f4       	brcc	.+2      	; 0x6ea <wn+0x12>
    w_lcd(dat,num1+0x37);
 6e8:	89 5c       	subi	r24, 0xC9	; 201
 else 
    w_lcd(dat,num1);
 6ea:	68 2f       	mov	r22, r24
 6ec:	81 e0       	ldi	r24, 0x01	; 1
 6ee:	0e 94 30 02 	call	0x460 <w_lcd>
 if(num2<10)
 6f2:	ca 30       	cpi	r28, 0x0A	; 10
 6f4:	10 f4       	brcc	.+4      	; 0x6fa <wn+0x22>
   w_lcd(dat,num2+0x30);
 6f6:	c0 5d       	subi	r28, 0xD0	; 208
 6f8:	03 c0       	rjmp	.+6      	; 0x700 <wn+0x28>
 else if(num2<16)
 6fa:	c0 31       	cpi	r28, 0x10	; 16
 6fc:	08 f4       	brcc	.+2      	; 0x700 <wn+0x28>
   w_lcd(dat,num2+0x37);
 6fe:	c9 5c       	subi	r28, 0xC9	; 201
 else
   w_lcd(dat,num2);
 700:	6c 2f       	mov	r22, r28
 702:	81 e0       	ldi	r24, 0x01	; 1
 704:	0e 94 30 02 	call	0x460 <w_lcd>
 708:	cf 91       	pop	r28
 70a:	08 95       	ret

0000070c <wc>:
}		//*/


void wc(uchar *chan)		//writer charter
{
 70c:	1f 93       	push	r17
 70e:	cf 93       	push	r28
 710:	df 93       	push	r29
 712:	ec 01       	movw	r28, r24
 uchar i;
 for(i=0;chan[i]!='\0';i++)
 714:	10 e0       	ldi	r17, 0x00	; 0
 716:	88 81       	ld	r24, Y
 718:	88 23       	and	r24, r24
 71a:	71 f0       	breq	.+28     	; 0x738 <wc+0x2c>
    w_lcd(dat,chan[i]);
 71c:	fe 01       	movw	r30, r28
 71e:	e1 0f       	add	r30, r17
 720:	f1 1d       	adc	r31, r1
 722:	60 81       	ld	r22, Z
 724:	81 e0       	ldi	r24, 0x01	; 1
 726:	0e 94 30 02 	call	0x460 <w_lcd>
 72a:	1f 5f       	subi	r17, 0xFF	; 255
 72c:	fe 01       	movw	r30, r28
 72e:	e1 0f       	add	r30, r17
 730:	f1 1d       	adc	r31, r1
 732:	80 81       	ld	r24, Z
 734:	88 23       	and	r24, r24
 736:	91 f7       	brne	.-28     	; 0x71c <wc+0x10>
 738:	df 91       	pop	r29
 73a:	cf 91       	pop	r28
 73c:	1f 91       	pop	r17
 73e:	08 95       	ret

00000740 <wh>:
}

void wh(uchar const *chan)	//write charter by look up table
{
 740:	1f 93       	push	r17
 742:	cf 93       	push	r28
 744:	df 93       	push	r29
 746:	ec 01       	movw	r28, r24
 uchar i;
 uchar ttp;
 ttp=pgm_read_byte(chan);
 748:	fc 01       	movw	r30, r24
 74a:	64 91       	lpm	r22, Z
 for(i=1;ttp!='\0';i++)
 74c:	11 e0       	ldi	r17, 0x01	; 1
 74e:	66 23       	and	r22, r22
 750:	51 f0       	breq	.+20     	; 0x766 <wh+0x26>
  {
   w_lcd(dat,ttp);
 752:	81 e0       	ldi	r24, 0x01	; 1
 754:	0e 94 30 02 	call	0x460 <w_lcd>
   ttp=pgm_read_byte(chan+i);
 758:	fe 01       	movw	r30, r28
 75a:	e1 0f       	add	r30, r17
 75c:	f1 1d       	adc	r31, r1
 75e:	64 91       	lpm	r22, Z
 760:	1f 5f       	subi	r17, 0xFF	; 255
 762:	66 23       	and	r22, r22
 764:	b1 f7       	brne	.-20     	; 0x752 <wh+0x12>
 766:	df 91       	pop	r29
 768:	cf 91       	pop	r28
 76a:	1f 91       	pop	r17
 76c:	08 95       	ret

0000076e <wu>:
  }
}

void wu (uchar const *ch0, uchar const *ch1, uchar const *ch2, uchar const *ch3)
{ 
 76e:	af 92       	push	r10
 770:	bf 92       	push	r11
 772:	cf 92       	push	r12
 774:	df 92       	push	r13
 776:	ef 92       	push	r14
 778:	ff 92       	push	r15
 77a:	0f 93       	push	r16
 77c:	1f 93       	push	r17
 77e:	8c 01       	movw	r16, r24
 780:	7b 01       	movw	r14, r22
 782:	6a 01       	movw	r12, r20
 784:	59 01       	movw	r10, r18
  clr(1);
 786:	81 e0       	ldi	r24, 0x01	; 1
 788:	0e 94 f9 02 	call	0x5f2 <clr>
  set(1);
 78c:	81 e0       	ldi	r24, 0x01	; 1
 78e:	0e 94 44 02 	call	0x488 <set>
  go(0,0);
 792:	60 e0       	ldi	r22, 0x00	; 0
 794:	86 2f       	mov	r24, r22
 796:	0e 94 4c 03 	call	0x698 <go>
  wh(ch0);		//write line 0
 79a:	c8 01       	movw	r24, r16
 79c:	0e 94 a0 03 	call	0x740 <wh>
  go(0,1);
 7a0:	61 e0       	ldi	r22, 0x01	; 1
 7a2:	80 e0       	ldi	r24, 0x00	; 0
 7a4:	0e 94 4c 03 	call	0x698 <go>
  wh(ch1);		//write line 1
 7a8:	c7 01       	movw	r24, r14
 7aa:	0e 94 a0 03 	call	0x740 <wh>
  go(0,2);
 7ae:	62 e0       	ldi	r22, 0x02	; 2
 7b0:	80 e0       	ldi	r24, 0x00	; 0
 7b2:	0e 94 4c 03 	call	0x698 <go>
  wh(ch2);
 7b6:	c6 01       	movw	r24, r12
 7b8:	0e 94 a0 03 	call	0x740 <wh>
  go(0,3);
 7bc:	63 e0       	ldi	r22, 0x03	; 3
 7be:	80 e0       	ldi	r24, 0x00	; 0
 7c0:	0e 94 4c 03 	call	0x698 <go>
  wh(ch3);
 7c4:	c5 01       	movw	r24, r10
 7c6:	0e 94 a0 03 	call	0x740 <wh>
 7ca:	1f 91       	pop	r17
 7cc:	0f 91       	pop	r16
 7ce:	ff 90       	pop	r15
 7d0:	ef 90       	pop	r14
 7d2:	df 90       	pop	r13
 7d4:	cf 90       	pop	r12
 7d6:	bf 90       	pop	r11
 7d8:	af 90       	pop	r10
 7da:	08 95       	ret

000007dc <wp>:
}


void wp(void)		//write piturn to lcd
{
 7dc:	0f 93       	push	r16
 7de:	1f 93       	push	r17
 7e0:	cf 93       	push	r28
 7e2:	df 93       	push	r29
 uchar i,j;
 w_lcd (com,0x34);		//切换到扩展指令
 7e4:	64 e3       	ldi	r22, 0x34	; 52
 7e6:	80 e0       	ldi	r24, 0x00	; 0
 7e8:	0e 94 30 02 	call	0x460 <w_lcd>
  for(j=0;j<32;j++)
 7ec:	00 e0       	ldi	r16, 0x00	; 0
    {
	 w_lcd (com,0x80+j);		//写Y地址
 7ee:	80 2f       	mov	r24, r16
 7f0:	80 58       	subi	r24, 0x80	; 128
 7f2:	68 2f       	mov	r22, r24
 7f4:	80 e0       	ldi	r24, 0x00	; 0
 7f6:	0e 94 30 02 	call	0x460 <w_lcd>
     w_lcd (com,0x88);			//写X地址
 7fa:	68 e8       	ldi	r22, 0x88	; 136
 7fc:	80 e0       	ldi	r24, 0x00	; 0
 7fe:	0e 94 30 02 	call	0x460 <w_lcd>
 802:	c0 e0       	ldi	r28, 0x00	; 0
 804:	d0 e0       	ldi	r29, 0x00	; 0
 806:	1f e0       	ldi	r17, 0x0F	; 15
     for(i=0;i<16;i++)
	   w_lcd(dat,disbuf[512+j*16+i]);// (dat,imge[j*16+i*2]);  //写数据
 808:	e0 2f       	mov	r30, r16
 80a:	ff 27       	eor	r31, r31
 80c:	b4 e0       	ldi	r27, 0x04	; 4
 80e:	ee 0f       	add	r30, r30
 810:	ff 1f       	adc	r31, r31
 812:	ba 95       	dec	r27
 814:	e1 f7       	brne	.-8      	; 0x80e <wp+0x32>
 816:	ec 0f       	add	r30, r28
 818:	fd 1f       	adc	r31, r29
 81a:	e9 58       	subi	r30, 0x89	; 137
 81c:	fd 4f       	sbci	r31, 0xFD	; 253
 81e:	60 81       	ld	r22, Z
 820:	81 e0       	ldi	r24, 0x01	; 1
 822:	0e 94 30 02 	call	0x460 <w_lcd>
 826:	11 50       	subi	r17, 0x01	; 1
 828:	21 96       	adiw	r28, 0x01	; 1
 82a:	17 ff       	sbrs	r17, 7
 82c:	ed cf       	rjmp	.-38     	; 0x808 <wp+0x2c>
 82e:	0f 5f       	subi	r16, 0xFF	; 255
 830:	00 32       	cpi	r16, 0x20	; 32
 832:	e8 f2       	brcs	.-70     	; 0x7ee <wp+0x12>
 834:	00 e0       	ldi	r16, 0x00	; 0
    }
  for(j=0;j<32;j++)
    {
	 w_lcd(com,0x80+j);		//Y address
 836:	80 2f       	mov	r24, r16
 838:	80 58       	subi	r24, 0x80	; 128
 83a:	68 2f       	mov	r22, r24
 83c:	80 e0       	ldi	r24, 0x00	; 0
 83e:	0e 94 30 02 	call	0x460 <w_lcd>
	 w_lcd(com,0x80);		//X address
 842:	60 e8       	ldi	r22, 0x80	; 128
 844:	80 e0       	ldi	r24, 0x00	; 0
 846:	0e 94 30 02 	call	0x460 <w_lcd>
 84a:	c0 e0       	ldi	r28, 0x00	; 0
 84c:	d0 e0       	ldi	r29, 0x00	; 0
 84e:	1f e0       	ldi	r17, 0x0F	; 15
	 for(i=0;i<16;i++)
	   w_lcd(dat,disbuf[j*16+i]);		//
 850:	e0 2f       	mov	r30, r16
 852:	ff 27       	eor	r31, r31
 854:	a4 e0       	ldi	r26, 0x04	; 4
 856:	ee 0f       	add	r30, r30
 858:	ff 1f       	adc	r31, r31
 85a:	aa 95       	dec	r26
 85c:	e1 f7       	brne	.-8      	; 0x856 <wp+0x7a>
 85e:	ec 0f       	add	r30, r28
 860:	fd 1f       	adc	r31, r29
 862:	e9 58       	subi	r30, 0x89	; 137
 864:	ff 4f       	sbci	r31, 0xFF	; 255
 866:	60 81       	ld	r22, Z
 868:	81 e0       	ldi	r24, 0x01	; 1
 86a:	0e 94 30 02 	call	0x460 <w_lcd>
 86e:	11 50       	subi	r17, 0x01	; 1
 870:	21 96       	adiw	r28, 0x01	; 1
 872:	17 ff       	sbrs	r17, 7
 874:	ed cf       	rjmp	.-38     	; 0x850 <wp+0x74>
 876:	0f 5f       	subi	r16, 0xFF	; 255
 878:	00 32       	cpi	r16, 0x20	; 32
 87a:	e8 f2       	brcs	.-70     	; 0x836 <wp+0x5a>
	}
  w_lcd(com,0x36);		//开显示
 87c:	66 e3       	ldi	r22, 0x36	; 54
 87e:	80 e0       	ldi	r24, 0x00	; 0
 880:	0e 94 30 02 	call	0x460 <w_lcd>
 884:	df 91       	pop	r29
 886:	cf 91       	pop	r28
 888:	1f 91       	pop	r17
 88a:	0f 91       	pop	r16
 88c:	08 95       	ret

0000088e <piture>:
} 


void piture(uchar const *imge)		//write a piture 
{
 88e:	27 e7       	ldi	r18, 0x77	; 119
 890:	30 e0       	ldi	r19, 0x00	; 0
 892:	fc 01       	movw	r30, r24
 894:	d9 01       	movw	r26, r18
 uint i;
 for(i=0;i<1024;i++)
   disbuf[i]=pgm_read_byte(imge+i);
 896:	84 91       	lpm	r24, Z
 898:	8d 93       	st	X+, r24
 89a:	2f 5f       	subi	r18, 0xFF	; 255
 89c:	3f 4f       	sbci	r19, 0xFF	; 255
 89e:	31 96       	adiw	r30, 0x01	; 1
 8a0:	84 e0       	ldi	r24, 0x04	; 4
 8a2:	26 37       	cpi	r18, 0x76	; 118
 8a4:	38 07       	cpc	r19, r24
 8a6:	b9 f3       	breq	.-18     	; 0x896 <piture+0x8>
 8a8:	b0 f3       	brcs	.-20     	; 0x896 <piture+0x8>
 wp();
 8aa:	0e 94 ee 03 	call	0x7dc <wp>
 8ae:	08 95       	ret

000008b0 <w16>:
}

void w16(void)
{
 8b0:	cf 92       	push	r12
 8b2:	df 92       	push	r13
 8b4:	ef 92       	push	r14
 8b6:	ff 92       	push	r15
 8b8:	0f 93       	push	r16
 8ba:	1f 93       	push	r17
 8bc:	cf 93       	push	r28
 8be:	df 93       	push	r29
 uchar i,j,k,t1;
 uint t2;
 for(i=0;i<4;i++)
 8c0:	60 e0       	ldi	r22, 0x00	; 0
   {
    for(j=0;j<4;j++)
 8c2:	50 e0       	ldi	r21, 0x00	; 0
 8c4:	86 2f       	mov	r24, r22
 8c6:	99 27       	eor	r25, r25
 8c8:	7c 01       	movw	r14, r24
 8ca:	ee 0c       	add	r14, r14
 8cc:	ff 1c       	adc	r15, r15
 8ce:	ee 0c       	add	r14, r14
 8d0:	ff 1c       	adc	r15, r15
 8d2:	8c 01       	movw	r16, r24
 8d4:	16 95       	lsr	r17
 8d6:	10 2f       	mov	r17, r16
 8d8:	00 27       	eor	r16, r16
 8da:	17 95       	ror	r17
 8dc:	07 95       	ror	r16
 8de:	85 2f       	mov	r24, r21
 8e0:	99 27       	eor	r25, r25
 8e2:	e7 01       	movw	r28, r14
 8e4:	c8 0f       	add	r28, r24
 8e6:	d9 1f       	adc	r29, r25
 8e8:	c9 59       	subi	r28, 0x99	; 153
 8ea:	df 4f       	sbci	r29, 0xFF	; 255
 8ec:	d8 01       	movw	r26, r16
 8ee:	a8 0f       	add	r26, r24
 8f0:	b9 1f       	adc	r27, r25

⌨️ 快捷键说明

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