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

📄 record.s

📁 mega128+VS1003做的mp3的程序 可以用WINAVR编译
💻 S
📖 第 1 页 / 共 2 页
字号:
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,255
	.byte 255,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 2,2
	.byte 63,0
	.byte 32,32
	.byte 17,10
	.byte 4,10
	.byte 17,16
	.byte 48,16
	.byte 0,1
	.byte 0,0
	.byte 0,63
	.byte 2,2
	.byte 2,2
	.byte 34,63
	.byte 0,0
	.byte 0,0
	.byte 32,32
	.byte 32,16
	.byte 16,8
	.byte 5,2
	.byte 5,8
	.byte 8,16
	.byte 48,16
	.byte 0,0
	.byte 0,63
	.byte 0,1
	.byte 1,1
	.byte 1,1
	.byte 63,1
	.byte 1,1
	.byte 1,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,0
	.byte 0,255
	.byte 255,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,128
	.byte 128,255
	.dbsym e nofile _nofile A[768:768]kc
	.area text(rom, con, rel)
	.dbfile E:\software\MP3程序\Record/./record.h
	.dbfile E:\software\MP3程序\Record\record.c
	.dbfunc e Play_record _Play_record fV
;           data -> <dead>
;             ii -> R20
	.even
_Play_record::
	xcall push_gset3
	sbiw R28,8
	.dbline -1
	.dbline 12
; #include <iom64v.h>
; #include <macros.h>
; #include <string.h>
; #include <stdio.h>
; #include "./record.h"
; #include "../Keyboard/key.h"
; #define uchar unsigned char
; #define uint unsigned int
; extern uchar keybuf;
; extern uchar Filename[40];	  	   //保持选择的文件名称
; void Play_record(void)
;  {
	.dbline 15
;    uchar ii;
;    uchar data;
;    ii = 0;
	clr R20
	xjmp L3
L2:
	.dbline 16
; 			while(1){
	.dbline 17
; 					 show_clear();
	xcall _show_clear
	.dbline 18
;  					 show_lcd(0, 56, 80, 2, &show_record[0],0);  
	clr R2
	clr R3
	std y+7,R3
	std y+6,R2
	ldi R24,<_show_record
	ldi R25,>_show_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	clr R16
	clr R17
	xcall _show_lcd
	.dbline 19
;  					 show_lcd(3, 56, 80, 2, &new_record[0],0);  
	clr R2
	clr R3
	std y+7,R3
	std y+6,R2
	ldi R24,<_new_record
	ldi R25,>_new_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	ldi R16,3
	ldi R17,0
	xcall _show_lcd
	.dbline 20
;  					 show_lcd(6, 56, 80, 2, &del_record[0], 0); 
	clr R2
	clr R3
	std y+7,R3
	std y+6,R2
	ldi R24,<_del_record
	ldi R25,>_del_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	ldi R16,6
	ldi R17,0
	xcall _show_lcd
	.dbline 21
;  					 switch(ii)
	mov R22,R20
	clr R23
	cpi R22,0
	cpc R22,R23
	breq L8
X0:
	cpi R22,1
	ldi R30,0
	cpc R23,R30
	breq L9
	cpi R22,2
	ldi R30,0
	cpc R23,R30
	breq L10
	xjmp L5
X1:
	.dbline 22
;   						{
L8:
	.dbline 23
;    						case 0: show_lcd(0, 56, 80, 2, &show_record[0],1);
	ldi R24,1
	ldi R25,0
	std y+7,R25
	std y+6,R24
	ldi R24,<_show_record
	ldi R25,>_show_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	clr R16
	clr R17
	xcall _show_lcd
	.dbline 24
;    		   				break;
	xjmp L6
L9:
	.dbline 25
;    						case 1: show_lcd(3, 56, 80, 2, &new_record[0],1);
	ldi R24,1
	ldi R25,0
	std y+7,R25
	std y+6,R24
	ldi R24,<_new_record
	ldi R25,>_new_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	ldi R16,3
	ldi R17,0
	xcall _show_lcd
	.dbline 26
;    		   				break;
	xjmp L6
L10:
	.dbline 27
;    						case 2: show_lcd(6, 56, 80, 2, &del_record[0],1);
	ldi R24,1
	ldi R25,0
	std y+7,R25
	std y+6,R24
	ldi R24,<_del_record
	ldi R25,>_del_record
	std y+5,R25
	std y+4,R24
	ldi R24,2
	ldi R25,0
	std y+3,R25
	std y+2,R24
	ldi R24,80
	std y+1,R25
	std y+0,R24
	ldi R18,56
	ldi R19,0
	ldi R16,6
	ldi R17,0
	xcall _show_lcd
	.dbline 28
;    		   				}
L5:
L6:
	.dbline 29
; 					 KEYBUF_NULL;
	clr R2
	sts _keybuf,R2
	.dbline 29
L11:
	.dbline 30
L12:
	.dbline 30
; 					 while(keybuf == NULL);
	lds R2,_keybuf
	tst R2
	breq L11
	.dbline 31
	mov R24,R2
	cpi R24,1
	brne L14
	.dbline 31
	.dbline 31
	mov R24,R20
	subi R24,255    ; addi 1
	mov R20,R24
	cpi R20,3
	brne L17
	clr R20
	xjmp L17
L17:
	.dbline 31
; 					 if(keybuf == K_DOWN){(++ii == 3) ? (ii = 0) : 0;}
L14:
	.dbline 32
	lds R24,_keybuf
	cpi R24,3
	brne L18
	.dbline 32
	.dbline 32
	mov R24,R20
	subi R24,1
	mov R20,R24
	cpi R20,255
	brne L21
	ldi R20,2
	xjmp L21
L21:
	.dbline 32
; 					 if(keybuf == K_UP){(--ii == 255) ? (ii = 2) : 0;}
L18:
	.dbline 33
; 					 if(keybuf == K_ESC) break;
	lds R24,_keybuf
	cpi R24,5
	brne L22
	.dbline 33
	xjmp L4
L22:
	.dbline 34
; 					 if(keybuf != K_ENTER) continue;
	lds R24,_keybuf
	cpi R24,4
	breq L24
	.dbline 34
	xjmp L3
L24:
	.dbline 35
; 					 switch(ii)
	mov R10,R20
	clr R11
	tst R10
	brne X2
	tst R11
	breq L29
X2:
	movw R24,R10
	cpi R24,1
	ldi R30,0
	cpc R25,R30
	breq L31
	cpi R24,2
	ldi R30,0
	cpc R25,R30
	breq L34
	xjmp L26
X3:
	.dbline 36
;   						{
L29:
	.dbline 37
;    						case 0: adjust_cheng(1);  //打开MP3通道
	ldi R16,1
	ldi R17,0
	xcall _adjust_cheng
	.dbline 38
; 						        Play_xuanzhe("\\RECORD\\*",0);
	clr R18
	clr R19
	ldi R16,<L30
	ldi R17,>L30
	xcall _Play_xuanzhe
	.dbline 39
; 								adjust_cheng(0);  //恢复原来通道
	clr R16
	clr R17
	xcall _adjust_cheng
	.dbline 40
;    		   					    break;
	xjmp L27
L31:
	.dbline 42
;    						case 1: 
; 							 	RecordAdpcm1003();
	xcall _RecordAdpcm1003
	.dbline 43
;    		   					 	break;
	xjmp L27
L33:
	.dbline 45
;    						case 2: while(1)
; 							 	{Play_xuanzhe("\\RECORD\\*",1);
	.dbline 45
	ldi R18,1
	ldi R19,0
	ldi R16,<L30
	ldi R17,>L30
	xcall _Play_xuanzhe
	.dbline 46
; 							     if(keybuf == K_ESC) break;								   
	lds R24,_keybuf
	cpi R24,5
	brne L36
	.dbline 46
	xjmp L27
L36:
	.dbline 47
; 							 	 if(Filename[0] == 0x00) break;
	lds R2,_Filename
	tst R2
	brne L38
	.dbline 47
	xjmp L27
L38:
	.dbline 48
	ldi R16,<_Filename
	ldi R17,>_Filename
	xcall _del_file
	.dbline 49
L34:
	.dbline 44
	xjmp L33
X4:
	.dbline 50
; 								 del_file(&Filename[0]);
; 								} 
; 							    break;
L26:
L27:
	.dbline 52
	clr R2
	sts _keybuf,R2
	.dbline 52
	.dbline 53
L3:
	.dbline 16
	xjmp L2
L4:
	.dbline -2
L1:
	adiw R28,8
	xcall pop_gset3
	.dbline 0 ; func end
	ret
	.dbsym l data 9 c
	.dbsym r ii 20 c
	.dbend
	.area data(ram, con, rel)
	.dbfile E:\software\MP3程序\Record\record.c
L30:
	.blkb 10
	.area idata
	.byte 92,'R,'E,'C,'O,'R,'D,92,42,0
	.area data(ram, con, rel)
	.dbfile E:\software\MP3程序\Record\record.c

⌨️ 快捷键说明

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