Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux 0.11 ÄÚºËѧϰ floppy.c£¬Çý¶¯ÄãµÄÈíÅÌ


/*
 *  linux/kernel/floppy.c
 *
 *  (C) 1991  Linus Torvalds
 */
/*
 * 02.12.91 - Changed to static variables to indicate need for reset
 * and recalibrate. This makes some things easier (output_byte reset
 * checking etc), and means less interrupt jumping in case of errors,
 * so the code is hopefully easier to understand.
 */
/*
 * This file is certainly a mess. I've tried my best to get it working,
 * but I don't like programming floppies, and I have only one anyway.
 * Urgel. I should check for more errors, and do more graceful error
 * recovery. Seems there are problems with several drives. I've tried to
 * correct them. No promises. 
 */
/*
 * As with hd.c, all routines within this file can (and will) be called
 * by interrupts, so extreme caution is needed. A hardware interrupt
 * handler may not sleep, or a kernel panic will happen. Thus I cannot
 * call "floppy-on" directly, but have to set a special timer interrupt
 * etc.
 *
 * Also, I'm not certain this works on more than 1 floppy. Bugs may
 * abund.
 */
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/fdreg.h> // ÈíÇýÍ·Îļþ£¬ÆäÖаüº¬ÈíÇýµÄ³£Óú¯ÊýµÄ¶¨Òå
#include <asm/system.h>
#include <asm/io.h>
#include <asm/segment.h>
#define MAJOR_NR 2 // ÈíÇýÖ÷É豸ºÅ
#include "blk.h"
/* È«¾Ö±êÖ¾±äÁ¿ */
static int recalibrate = 0; // ÐèÒªÖØÐÂУÕý
static int reset = 0; // ÐèÒªÖØÐÂÖÃλ
static int seek = 0; // Ñ°µÀ
extern unsigned char current_DOR; // ÔÚÎļþsched.cÖж¨Òå
#define immoutb_p(val,port) \ // ×Ö½ÚvalÖ±½ÓÊä³öµ½port
__asm__("outb %0,%1\n\tjmp 1f\n1:\tjmp 1f\n1:"::"a" ((char) (val)),"i" (port))
#define TYPE(x) ((x)>>2) // ÈíÇýÀàÐÍ£¬2--1.2MB£¬7--1.44MB
#define DRIVE(x) ((x)&0x03) // ÈíÇýÐòÁкÅ0-3¶ÔÓ¦A-D
/*
 * Note that MAX_ERRORS=8


Ïà¹ØÎĵµ£º

ËÄÖÖÖ÷ÒªLinux°æ±¾Ö®¼äµÄ±È½Ï

±¾ÎÄÎÒ½«±È½ÏËÄÖÖÖ÷ÒªµÄLinux°æ±¾—— Debian£¬Mandrake£¬Red Hat£¬ºÍSuSE—²¢ÌÖÂÛÈçºÎÖƶ©Ñ¡ÔñÊʺÏÌض¨ÉÌÒµ»·¾³Linux°æ±¾µÄ±ê×¼¡£
  ÎÒÃǺÜÄÑ´Ó´óÁ¿Linux°æ±¾ÖÐÑ¡ÔñÒ»¿îÕýºÃÊʺÏij¸öÌض¨»·¾³µÄ°æ±¾¡£Ã¿ Ò»¸ö°æ±¾¶¼ÓÐ×Ô¼ºµÄ²àÖص㣬ÓÐÒ»Ì××Ô¼ºµÄÎļþ£¬°²×°·½Ê½ºÍ×Ô¼ºµÄ
LinuxÄں˰汾¡£±¾ÎÄÎÒ½«±È½ÏË ......

VMwareÐéÄâ»úºÍËÞÖ÷»ú¹²ÏíÎļþ¼Ð(windows,linux)


ÔÚWindowsËÞÖ÷»úÖÐÌí¼Ó¹²ÏíÎļþ¼Ð
1.Ñ¡Ôñ ÐéÄâ»ú ¡µÉèÖÃ
2.Ñ¡Ôñ Ñ¡Ïî
3.µãÑ¡ ¹²ÏíÎļþ¼Ð
4.µã»÷Add°´Å¥ ´ò¿ª¹²ÏíÎļþ¼ÐÏòµ¼ ²¢µãÏÂÒ»²½
5.ÊäÈë¹²ÏíÎļþ¼ÐÃû×ÖºÍλÖà ²¢µãÏÂÒ»²½
   Name —— Õâ¸öÃû×Ö½«³öÏÖÔÚÐéÄâ»úÄÚ
   Host folder —— ÔÚËÞÖ÷»úÖÐÄãÏë¹²ÏíµÄÎļþ¼Ð· ......

½Ì´ó¼ÒÈçºÎʵÏÖÓ²ÅÌ°²×°linuxϵͳ

×÷Õß: Óð·É | ·¢²¼Ê±¼ä: ÐÇÆÚÌì, 01/24/2010 - 16:23
ÔÚÍøÉÏÕÒÒ²ºÃ¶à¹ØÓÚÕâ·½ÃæµÄ×ÊÁÏ£¬µ«¶¼Ã»ÓÐÒ»¸ö¿ÉÒÔÓõģ¬
 
×Ô¼ºÑо¿ÁËһϣ¬ÍêÈ«¿ÉÒÔʵÏÖ£¬Ö»Òª°´ÕÕÒÔϲ½Öè×öÁË£¬°üÄãÄÜ°ÑCentOSÇë»Ø¼Ò
ƽ̨Windows XP£»     ËùÐèÈí¼þgrub4dos-0.4.3.zip£»  CentOS¾µÏñÎļþDVD¡£
1.ÔÚWindows X ......

Linux·þÎñÆ÷ÈÕÖ¾¹ÜÀíÏê½â

ÈÕÖ¾¶ÔÓÚ°²È«À´Ëµ£¬·Ç³£ÖØÒª£¬Ëû¼Ç¼ÁËϵͳÿÌì·¢ÉúµÄ¸÷ÖÖ¸÷ÑùµÄÊÂÇ飬Äã¿ÉÒÔͨ¹ýËûÀ´¼ì²é´íÎó·¢ÉúµÄÔ­Òò£¬»òÕßÊܵ½¹¥»÷ʱ¹¥»÷ÕßÁôϵĺۼ£¡£ÈÕÖ¾Ö÷ÒªµÄ¹¦ÄÜÓУºÉó¼ÆºÍ¼à²â¡£Ëû»¹¿ÉÒÔʵʱµÄ¼à²âϵͳ״̬£¬¼à²âºÍ×·×ÙÇÖÈëÕߵȵȡ£
¡¡¡¡ÔÚLinuxϵͳÖУ¬ÓÐÈý¸öÖ÷ÒªµÄÈÕÖ¾×Óϵͳ£º
¡¡¡¡Á¬½Óʱ¼äÈÕÖ¾--Óɶà¸ö³ÌÐòÖ´ÐУ¬°Ñ¼ ......

LinuxÏÂÇý¶¯Ó²¼þ°²×°½Ì³Ì

¶ÔÓÚÓ²¼þ£¬ÓеÄÐÂÊÖµÜÐÖ¿ÉÄÜ»¹ÊDz»Ì«Ã÷°×ÔÚLinuxÏÂÇý¶¯Ó²¼þ£¬ÓÈÆäÔÚ¸Õ½Ó´¥Linuxʱ£¬Çý¶¯µÄ°²×°ÍùÍùÊÇ×îÁîÈËÍ·Í´µÄÒ»¼þÊÂÁË¡£
Ò»¡¢ ¶ÔϵͳÇý¶¯°²×°µÄÒ»µã³£Ê¶¡£
1£® ¿ª·¢¹¤¾ßÊDZØÐë°²×°£º
Èç¹ûÄúÊÇÐÂÊÖ£¬ÎÒ»¹Êǽ¨ÒéÄú°ÑϵͳÍêÈ«°²×°£¬ÒòΪÔÚ°²×°ÆäËüµÄÈí¼þ»áÓõ½Ò»Ð©£¬ÎÒÃDz»Ì«Ã÷°×µÄ¿âÎļþÒÔ¼°¿ª·¢¹¤¾ß¡£±ÈÈçmake gcc au ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ