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

📄 delay.asm

📁 e1c0df5d-c8bc-48a5-bc02-a2b7c51c0dbf是做mp3的源代码
💻 ASM
字号:
/* ***************************************************************************  Copyright (C) 2002  Jesper Hansen <jesperh@telia.com> and **			Romuald Bialy (MIS) <romek_b@o2.pl>.******  Yampp-7/USB - low level support library*********************************************************************************   This file is part of the yampp system.****  This program is free software; you can redistribute it and/or**  modify it under the terms of the GNU General Public License**  as published by the Free Software Foundation; either version 2**  of the License, or (at your option) any later version.****  This program is distributed in the hope that it will be useful,**  but WITHOUT ANY WARRANTY; without even the implied warranty of**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the**  GNU General Public License for more details.****  You should have received a copy of the GNU General Public License**  along with this program; if not, write to the Free Software Foundation, **  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.*******************************************************************************  Revision History****  when         what  who	why****  2002-09-22   1.0   MIS      initial public release************************************************************************* */;********************************************************************;*;*  Delay stuff;*  Fixed for a 7.3728 MHz xtal on the yampp-3 and;*  for a 4.000 MHz crystal on yampp-7;*;********************************************************************;			r25/r24;void delay(u16 us).global delaydelay:		nop		nop		nop		sbiw	r24,1		; 	2 cycles 		brne	delay		; 	2 (1) cycle;		nop;		nop 		ret					; + 7 cycles for call and ret.global delay10delay10:		clr r25		ldi r24,10		rjmp delay;			r25/r24;void delayms(u16 ms).global delaymsdelayms:		push 	r24		push	r25 		ldi 	r25,hi8(1000) 		ldi 	r24,lo8(1000) 		rcall 	delay 		wdr		pop	r25		pop	r24 		sbiw	r24,1 		brne	delayms		ret

⌨️ 快捷键说明

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