资源简介
Minix原来是荷兰阿姆斯特丹的Vrije大学计算机科学系的Andrew S. Tanenbaum教授所发展的一个类Unix操作系统。全部的程序码共约12,000行,并置于他的著作Operating Systems: Design and Implementation(ISBN 0-13-637331-3)的附录里作为范例。Minix的系统要求在当时来说非常简单,只要三片磁片就可以启动。
全套Minix除了起动的部份以汇编语言编写以外,其他大部份都是纯粹用C语言编写。分为:内核、内存管理及档案管理三部份。
Minix原始是设计给1980年代到1990年代的IBM PC和IBM PC/AT兼容电脑上执行。1.5版也有移植到已Motorola 68000系列CPU为基础的电脑上(如Atari ST,Amiga,和早期的Apple Macintosh)和以SPARC为基础的机器(如升阳sun公司的工作站)。2.0版则只有x86架构的版本。

代码片段和文件信息
/* boot 2.5.0 - Load and start Minix. Author: Kees J. Bot
* 27 Dec 1991
*
* Copyright 1996 Kees J. Bot All rights reserved.
* This package may be freely used and modified except that changes that
* do not increase the functionality or that are incompatible with the
* original may not be released to the public without permission from the
* author. Use of so called “C beautifiers“ is explicitly prohibited.
*/
char version[]= “2.5“;
#define nil 0
#define _POSIX_SOURCE 1
#define _MINIX 1
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include “rawfs.h“
#undef EXTERN
#define EXTERN /* Empty */
#include “boot.h“
#define arraysize(a) (sizeof(a) / sizeof((a)[0]))
#define arraylimit(a) ((a) + arraysize(a))
#define between(a c z) ((unsigned) ((c) - (a)) <= ((z) - (a)))
void printk(char *fmt ...);
#define printf printk
char *bios_err(int err)
/* Translate BIOS error code to a readable string. (This is a rare trait
* known as error checking and reporting. Take a good look at it you won‘t
* see it often.)
*/
{
static struct errlist {
short err;
char *what;
} errlist[] = {
#if !DOS
{ 0x00 “No error“ }
{ 0x01 “Invalid command“ }
{ 0x02 “Address mark not found“ }
{ 0x03 “Disk write-protected“ }
{ 0x04 “Sector not found“ }
{ 0x05 “Reset failed“ }
{ 0x06 “Floppy disk removed“ }
{ 0x07 “Bad parameter table“ }
{ 0x08 “DMA overrun“ }
{ 0x09 “DMA crossed 64 KB boundary“ }
{ 0x0A “Bad sector flag“ }
{ 0x0B “Bad track flag“ }
{ 0x0C “Media type not found“ }
{ 0x0D “Invalid number of sectors on format“ }
{ 0x0E “Control data address mark detected“ }
{ 0x0F “DMA arbitration level out of range“ }
{ 0x10 “Uncorrectable CRC or ECC data error“ }
{ 0x11 “ECC corrected data error“ }
{ 0x20 “Controller failed“ }
{ 0x40 “Seek failed“ }
{ 0x80 “Disk timed-out“ }
{ 0xAA “Drive not ready“ }
{ 0xBB “Undefined error“ }
{ 0xCC “Write fault“ }
{ 0xE0 “Status register error“ }
{ 0xFF “Sense operation failed“ }
#else /* DOS */
{ 0x00 “No error“ }
{ 0x01 “Function number invalid“ }
{ 0x02 “File not found“ }
{ 0x03 “Path not found“ }
{ 0x04 “Too many open files“ }
{ 0x05 “I/O error“ }
{ 0x06 “Invalid handle“ }
{ 0x0C “Access code invalid“ }
#endif /* DOS */
};
struct errlist *errp;
for (errp= errlist; errp < arraylimit(errlist); errp++) {
if (errp->err == err) return errp->what;
}
return “Unknown error“;
}
char *unix_err(int err)
/* Translate the few errors rawfs can give. */
{
switch (err) {
case ENOENT: return “No
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
-rw-r--r-- 143 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\syslib.h
-rw-r--r-- 244 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_sigret.c
-rw-r--r-- 347 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_newmap.c
-rw-r--r-- 440 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_oldsig.c
-rw-r--r-- 206 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_sendsig.c
-rw-r--r-- 566 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_fork.c
-rw-r--r-- 585 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_fresh.c
-rw-r--r-- 346 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_abort.c
-rw-r--r-- 307 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_kill.c
-rw-r--r-- 497 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_exec.c
-rw-r--r-- 151 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_endsig.c
-rw-r--r-- 541 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_xit.c
-rw-r--r-- 1713 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\Makefile
-rw-r--r-- 461 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_times.c
-rw-r--r-- 347 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_getsp.c
-rw-r--r-- 325 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_trace.c
-rw-r--r-- 1038 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_copy.c
-rw-r--r-- 330 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\sys_getmap.c
-rw-r--r-- 464 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\syslib\taskcall.c
-rw-r--r-- 873 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\sqrt.c
-rw-r--r-- 318 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\fabs.c
-rw-r--r-- 582 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\fmod.c
-rw-r--r-- 455 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\ceil.c
-rw-r--r-- 566 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\log10.c
-rw-r--r-- 1446 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\exp.c
-rw-r--r-- 2041 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\localmath.h
-rw-r--r-- 1511 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\atan.c
-rw-r--r-- 890 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\atan2.c
-rw-r--r-- 457 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\floor.c
-rw-r--r-- 212 1996-10-01 20:00 Minix\MINIX2.0操作系统源码\lib\math\isnan.c
............此处省略1420个文件信息
- 上一篇:指令系统的自主和兼容视频截图版.pptx
- 下一篇:go开发实战
相关资源
- LINUX下命令行界面的C语言细胞游戏
- 尚观培训linux许巍老师关于c语言的课
- 《Linux程序设计》第四版pdf高清电子版
- linux 0.11内核代码
- linux ac108多麦方案驱动(ac108.c)
- 共享内存 读写
- 简易web服务器的设计与实现
- 《LINUX C编程从初学到精通》光盘源码
- Linux那些事儿之我是USB core
- Linux c语言 学生成绩管理系统
- Linux开发工具手册
- Linux操作系统下C语言编程从零开始
- 基于Linux下C语言开发的员工管理系统
- 超级玛丽c++源码win32Linux平台
- UNIX/LINUX下C语言中文短信UCS2编码和解
- 嵌入式工程师必知必会 (完整高清中
- linux-2.6.24.rar
- Linux下C语言操作静态ARP表,包括增加
- c语言 linux 贪吃蛇.doc
- Linux多线程服务端编程:使用muduo C+
- libstdc++.so.6.0.23_linux7
- libstdc++-devel-4.1.2-48.el5.x86_64
- C++版仿Linux文件管理系统
- 基于SDL的贪吃蛇游戏
- 链表栈的基本操作(C语言
- 基于linux C/C++和Qt的聊天程序
- Linux+gladeGTK++C语言+mysql的模仿QQ聊天工
- 嵌入式linuxC语言程序设计基础教程
- C Programming in Linux Linux下C语言
- Linux软件工程师(C语言)实用教程_
评论
共有 条评论