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

📄 test_pc10_main.s

📁 AVR单片机开发中
💻 S
📖 第 1 页 / 共 4 页
字号:
	ldi R16,592
	ldi R17,2
	xcall _inp
	sbrc R16,7
	rjmp L113
	.dbline 592
; 		       xy_set(0x11);
	ldi R16,17
	xcall _xy_set
L113:
	.dbline 594
; 		       //printf_str("         ");
; 			   delay_nms(50);
	ldi R16,50
	ldi R17,0
	xcall _delay_nms
	.dbline 596
; 			   //xy_set(0x11);
; 		       printf_hex(inp(0x250));
	ldi R16,592
	ldi R17,2
	xcall _inp
	xcall _printf_hex
	.dbline 597
; 			   if ((len_test <= gowhere)&(j<777))
	lds R2,_len_test
	lds R3,_len_test+1
	ldd R0,y+0
	ldd R1,y+1
	cp R0,R2
	cpc R1,R3
	brlt L117
	ldi R24,1
	ldi R25,0
	movw R14,R24
	xjmp L118
L117:
	clr R14
	clr R15
L118:
	cpi R20,9
	ldi R30,3
	cpc R21,R30
	brge L119
	ldi R24,1
	ldi R25,0
	movw R12,R24
	xjmp L120
L119:
	clr R12
	clr R13
L120:
	movw R2,R14
	and R2,R12
	and R3,R13
	tst R2
	brne X5
	tst R3
	breq L115
X5:
	.dbline 598
; 		       outp(0x250,0xff);
	ldi R18,255
	ldi R16,592
	ldi R17,2
	xcall _outp
L115:
	.dbline 599
; 		  }
L109:
	.dbline 601
L95:
	.dbline 538
	xjmp L94
X6:
	.dbline -2
	.dbline 603
; 		
; 	 }
;     
; }
L86:
	adiw R28,4
	xcall pop_gset5
	.dbline 0 ; func end
	ret
	.dbsym r k 22 I
	.dbsym r j 20 I
	.dbsym l speed 2 I
	.dbsym l gowhere 0 I
	.dbsym r i 10 I
	.dbend
	.dbfunc e test_relay _test_relay fV
;            key -> R20,R21
	.even
_test_relay::
	xcall push_gset1
	.dbline -1
	.dbline 607
; 
; 
; void test_relay(void)
; {
	.dbline 609
;    int key;
;   outp(0x250,0x00);
	clr R18
	ldi R16,592
	ldi R17,2
	xcall _outp
	xjmp L123
L122:
	.dbline 611
	.dbline 612
	ldi R16,1
	xcall _xy_set
	.dbline 613
	ldi R16,<L125
	ldi R17,>L125
	xcall _printf_str
	.dbline 614
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 615
	ldi R16,33
	xcall _xy_set
	.dbline 616
	ldi R16,<L82
	ldi R17,>L82
	xcall _printf_str
	.dbline 617
	ldi R16,33
	xcall _xy_set
	.dbline 618
	xcall _scanf_int
	movw R20,R16
	.dbline 619
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 620
	mov R18,R20
	ldi R16,592
	ldi R17,2
	xcall _outp
	.dbline 621
	ldi R16,49
	xcall _xy_set
	.dbline 622
	ldi R16,592
	ldi R17,2
	xcall _inp
	xcall _printf_hex
	.dbline 623
L123:
	.dbline 610
;   while(1)
	xjmp L122
X7:
	.dbline 623
;   {
;      xy_set(0x01);
; 	 printf_str(" inp retry:");
; 	 delay_nms(100);
; 	 xy_set(0x21);
; 	 printf_str("        ");
; 	 xy_set(0x21);
; 	 key=scanf_int();
; 	 delay_nms(100);
; 	 outp(0x250,key);
; 	 xy_set(0x31);
;      printf_hex(inp(0x250));
;   };
	.dbline -2
	.dbline 624
; }
L121:
	xcall pop_gset1
	.dbline 0 ; func end
	ret
	.dbsym r key 20 I
	.dbend
	.dbfunc e test_wsad _test_wsad fV
;              i -> R20,R21
	.even
_test_wsad::
	xcall push_gset1
	.dbline -1
	.dbline 626
; void test_wsad()
; {
L127:
	.dbline 628
;   int i;
; do{
	.dbline 629
;   i=scanf_int();
	xcall _scanf_int
	movw R20,R16
	.dbline 630
;   if((i&0x00ff)==0x88)
	movw R24,R20
	andi R25,0
	cpi R24,136
	ldi R30,0
	cpc R25,R30
	brne L130
	.dbline 631
;    {
	.dbline 632
;    xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 633
;    printf_str(" W");
	ldi R16,<L132
	ldi R17,>L132
	xcall _printf_str
	.dbline 634
;    }
	xjmp L131
L130:
	.dbline 635
;    else if((i&0x00ff)==0x66)
	movw R24,R20
	andi R25,0
	cpi R24,102
	ldi R30,0
	cpc R25,R30
	brne L133
	.dbline 636
;    {
	.dbline 637
;    xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 638
;    printf_str(" D");
	ldi R16,<L135
	ldi R17,>L135
	xcall _printf_str
	.dbline 639
;    }
	xjmp L134
L133:
	.dbline 640
;   else if((i&0x00ff)==0x44)
	movw R24,R20
	andi R25,0
	cpi R24,68
	ldi R30,0
	cpc R25,R30
	brne L136
	.dbline 641
;    {
	.dbline 642
;    xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 643
;    printf_str(" A");
	ldi R16,<L138
	ldi R17,>L138
	xcall _printf_str
	.dbline 644
;    }
	xjmp L137
L136:
	.dbline 645
;    else if((i&0x00ff)==0x22)
	movw R24,R20
	andi R25,0
	cpi R24,34
	ldi R30,0
	cpc R25,R30
	brne L139
	.dbline 646
;    {
	.dbline 647
;    xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 648
;    printf_str(" S");
	ldi R16,<L141
	ldi R17,>L141
	xcall _printf_str
	.dbline 649
;    }
	xjmp L140
L139:
	.dbline 650
;    else if((i&0x00ff)==0x55)
	movw R24,R20
	andi R25,0
	cpi R24,85
	ldi R30,0
	cpc R25,R30
	brne L142
	.dbline 651
;    {
	.dbline 652
;    xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 653
;    printf_str(" stop");
	ldi R16,<L144
	ldi R17,>L144
	xcall _printf_str
	.dbline 654
;    }
	xjmp L143
L142:
	.dbline 656
;    else 
;    {
	.dbline 657
;    xy_set(0x21);
	ldi R16,33
	xcall _xy_set
	.dbline 658
;    printf_str(" got the mun is");
	ldi R16,<L145
	ldi R17,>L145
	xcall _printf_str
	.dbline 659
;    xy_set(0x31);
	ldi R16,49
	xcall _xy_set
	.dbline 660
;    printf_int(i);
	movw R16,R20
	xcall _printf_int
	.dbline 661
;    }
L143:
L140:
L137:
L134:
L131:
	.dbline 662
L128:
	.dbline 662
	xjmp L127
X8:
	.dbline -2
	.dbline 663
;    }while(1);
; }
L126:
	xcall pop_gset1
	.dbline 0 ; func end
	ret
	.dbsym r i 20 I
	.dbend
	.dbfunc e test_pwm _test_pwm fV
;          frequ -> R20,R21
	.even
_test_pwm::
	xcall push_gset1
	.dbline -1
	.dbline 668
; 
; 
; 
; void test_pwm(void)
; {    
L147:
	.dbline 670
;      int frequ;
; 	do{
	.dbline 671
;      xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 672
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 674
; 	
; 	 printf_str(" inp frequ:");
	ldi R16,<L150
	ldi R17,>L150
	xcall _printf_str
	.dbline 675
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 676
; 	 xy_set(0x21);
	ldi R16,33
	xcall _xy_set
	.dbline 677
; 	 printf_str("           ");
	ldi R16,<L151
	ldi R17,>L151
	xcall _printf_str
	.dbline 678
; 	 xy_set(0x21);
	ldi R16,33
	xcall _xy_set
	.dbline 679
;      delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 680
; 	 frequ=scanf_int();
	xcall _scanf_int
	movw R20,R16
	.dbline 682
; 	 
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 683
; 	 mainboard_pwm1( frequ);
	movw R16,R20
	xcall _mainboard_pwm1
	.dbline 684
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 685
; 	 }
L148:
	.dbline 686
	xjmp L147
X9:
	.dbline -2
	.dbline 687
;      while(1);
; }
L146:
	xcall pop_gset1
	.dbline 0 ; func end
	ret
	.dbsym r frequ 20 I
	.dbend
	.dbfunc e test_touluo _test_touluo fV
;         touluo -> R20,R21
	.even
_test_touluo::
	xcall push_gset1
	sbiw R28,2
	.dbline -1
	.dbline 690
; 
; void test_touluo(void)
; {
L153:
	.dbline 693
;      int touluo;
; 	 
;      do{
	.dbline 694
;      xy_set(0x01);
	ldi R16,1
	xcall _xy_set
	.dbline 695
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 697
; 	
; 	 printf_str(" inp touluo:");
	ldi R16,<L156
	ldi R17,>L156
	xcall _printf_str
	.dbline 698
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 699
; 	 xy_set(0x21);
	ldi R16,33
	xcall _xy_set
	.dbline 700
; 	 printf_str("           ");
	ldi R16,<L151
	ldi R17,>L151
	xcall _printf_str
	.dbline 701
; 	 xy_set(0x21);
	ldi R16,33
	xcall _xy_set
	.dbline 702
;      delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 703
; 	 touluo=scanf_int();
	xcall _scanf_int
	movw R20,R16
	.dbline 705
; 	 
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 706
; 	 mainboard_pwm(touluo,touluo,touluo);
	std y+0,R20
	std y+1,R21
	movw R18,R20
	movw R16,R20
	xcall _mainboard_pwm
	.dbline 707
; 	 delay_nms(100);
	ldi R16,100
	ldi R17,0
	xcall _delay_nms
	.dbline 708
; 	 }
L154:
	.dbline 709
	xjmp L153
X10:
	.dbline -2
	.dbline 711
;      while(1);
; 
; }
L152:
	adiw R28,2
	xcall pop_gset1
	.dbline 0 ; func end
	ret
	.dbsym r touluo 20 I
	.dbend
	.dbfunc e main _main fV
	.even
_main::
	.dbline -1
	.dbline 715
; 
; 
; void main()
; {  
	.dbline 717
;  
;    init_devices();
	xcall _init_devices
	.dbline 721
;    
;    //motor_pwm(12288,12288);
;    //outp(0x250,0x00);
;    test_motor_pwm();
	xcall _test_motor_pwm
	.dbline 722
;    test_relay();
	xcall _test_relay
L158:
	.dbline 731
L159:
	.dbline 731
	xjmp L158
X11:
	.dbline -2
	.dbline 732
;     // test_wsad();
;     // test_motor_pwm();
;     //test_isp_cnt();
; 	//gogo();
; 	//test_isp_cnt();
; 	//test_pwm();
;    //test_touluo();
;   // test_isp_cnt();
; 	while (1);
; }
L157:
	.dbline 0 ; func end
	ret
	.dbend
	.area bss(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
_len::
	.blkb 4
	.dbsym e len _len L
_right::
	.blkb 2
	.dbsym e right _right I
_left::
	.blkb 2
	.dbsym e left _left I
_rec0::
	.blkb 1
	.dbsym e rec0 _rec0 c
_send_buffer::
	.blkb 20
	.dbsym e send_buffer _send_buffer A[20:20]c
_kk::
	.blkb 2
	.dbsym e kk _kk X
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L156:
	.blkb 13
	.area idata
	.byte 32,'i,'n,'p,32,'t,'o,'u,'l,'u,'o,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L151:
	.blkb 12
	.area idata
	.byte 32,32,32,32,32,32,32,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L150:
	.blkb 12
	.area idata
	.byte 32,'i,'n,'p,32,'f,'r,'e,'q,'u,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L145:
	.blkb 16
	.area idata
	.byte 32,'g,'o,'t,32,'t,'h,'e,32,'m,'u,'n,32,'i,'s,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L144:
	.blkb 6
	.area idata
	.byte 32,'s,'t,'o,'p,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L141:
	.blkb 3
	.area idata
	.byte 32,'S,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L138:
	.blkb 3
	.area idata
	.byte 32,'A,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L135:
	.blkb 3
	.area idata
	.byte 32,'D,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L132:
	.blkb 3
	.area idata
	.byte 32,'W,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L125:
	.blkb 12
	.area idata
	.byte 32,'i,'n,'p,32,'r,'e,'t,'r,'y,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L112:
	.blkb 10
	.area idata
	.byte 32,'c,'o,'m,'p,'l,'e,'t,'e,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L107:
	.blkb 10
	.area idata
	.byte 32,'t,'o,'u,'c,'h,'e,'d,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L100:
	.blkb 10
	.area idata
	.byte 32,32,32,32,32,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L99:
	.blkb 8
	.area idata
	.byte 32,'s,'t,'o,'p,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L89:
	.blkb 14
	.area idata
	.byte 32,32,32,32,32,32,32,32,32,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L88:
	.blkb 10
	.area idata
	.byte 32,'i,'n,'p,32,'l,'e,'n,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L87:
	.blkb 14
	.area idata
	.byte 32,'i,'n,'p,32,32,'s,'p,'e,'e,'d,32,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L82:
	.blkb 9
	.area idata
	.byte 32,32,32,32,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L80:
	.blkb 15
	.area idata
	.byte 32,32,32,32,32,32,32,32,32,32,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L79:
	.blkb 14
	.area idata
	.byte 32,'i,'n,'p,32,32,'v,'a,'l,'u,'e,32,58,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
	.area lit(rom, con, rel)
L68:
	.word 0x6fad,0x452b
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c
L65:
	.blkb 7
	.area idata
	.byte 37,'d,32,32,32,32,0
	.area data(ram, con, rel)
	.dbfile H:\m128_test\test_pc10_main.c

⌨️ 快捷键说明

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