Skip to content

bzero.c源码注释

bzero函数的作用是向一个字符串写入某个指定字节的空字符’\0’,一般用于把一个字符串置0。类似memset。函数原型为: SYNOPSIS #include void bzero(void *b, size_t len); DESCRIPTION The bzero() function writes len zero bytes to the string b. If len is zero, bzero() does nothing. 源代码: #if !defined(_KERNEL) && !defined(_STANDALONE) #include #else #include <lib/libkern/libkern.h> #endif /* * bzero…

Read more

read CAT source file

我学习cat命令的源码及注释。 /*    $OpenBSD: cat.c,v 1.20 2009/10/27 23:59:19 deraadt Exp $    */ /*    $NetBSD: cat.c,v 1.11 1995/09/07 06:12:54 jtc Exp $    */ /* * Copyright (c) 1989, 1993 *    The Regents of the University of California.  All rights reserved. * *…

Read more

mbr.S

更新: 还有一个更正的注释版本,里面有流程图,不适合这里展示。放在网盘上供大家下载: https://pan.baidu.com/s/1jGQGifs /* copy right info removed due to display issues – Nov. 2011 */ .file “mbr.S” #include #include /* * Memory layout: * * 0x07C00 -> 0x07DFF BIOS loads us here (at 31k) * 0x07E00 -> 0x17BFC our…

Read more
Sidebar