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

📄 strcpy.s

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 S
字号:
/************************************************************* * File: lib/strcpy.s * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: *	970304	Start of revision history */#include <regdef.h>/* Note that the Algorithmics assembler generates 2 warnings for this * file.  This is because the assembler considers the load instructions * are not save in the delay slot of a branch.  You can safely ignore  * the warnings.   */#ifndef CYGNUS/*** strcpy(dst,src)**    Copy source string to destination.**    Neither the source nor destination need be word aligned.*/        .globl strcpy        .ent strcpystrcpy: # a0=dst a1=src        # byte lengths in comments include terminating null        move    v0,a0        .set noreorder1:    	lb      t0,0(a1)        ulw     t4,(a1)        beq     t0,zero,one         lb     t1,1(a1)        usw     t4,(a0)        beq     t1,zero,two	 nop        lb      t2,2(a1)        addu    a1,4        beq     t2,zero,three         lb     t3,-1(a1)        addu    a0,4        bne     t3,zero,1b         nop        j       ra	 nopthree:  sb      t2,2(a0)two:    sb      t1,1(a0)one:    sb      t0,(a0)        j       ra	 nop        .end strcpy#endif

⌨️ 快捷键说明

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