Ch 32 µwºÐ (1) ¤À³Î°Ï

²{¦b¤@ÁûµwºÐ®e¶q´X¥G³£¦b 80G ¥H¤W¡A³o»ò¤jªºµwºÐºÞ²z¤W¬O¤£¤Ó®e©ö¡C¤p¤ì°¸²ßºD¤W¬O§â¥L¤À¦¨¦n´X­Ó¤À³Î¡A¦A¸Ë¤J¦n´XºØ§@·~¨t²Î¡A¦p DOS 6.20¡BWindows 98 SE¡BWindows XP¡BMandrake Linux ¨Ï¥Î¡C´¿¸g¦³¤@«×¡A¤]¦w¸Ë¹L OS/2 Warp T 3.0 ¨Ï¥Î¹L¡A¥i±¤¦]³nÅé¤Ó¤Ö¡A©Ò¥HµL©`¦a¦A«×¨Ï¥Î Windows §@·~¨t²Î¡C

¨C­ÓµwºÐ³Ì¦h¥i¥H¤À³Î¦¨¤T­Ó¥D­n¤À³Î ( primary partition ) ¤Î¤@­ÓÂX¥R¤À³Î ( extended partition )¡A¦ÓÂX¥R¤À³ÎÁÙ¥i¥H¦A¤À¦¨¼Æ­ÓÅÞ¿èµwºÐ¡C¥H DOS/Windows 9x/Me ªºÆ[ÂI¨Ó¬Ý¡A¨C­Ó¥D­n¤À³Î´N¬O¤@­ÓÅÞ¿èµwºÐ¡A¦A¥[¤WÂX¥R¤À³Î¤ºªºÅÞ¿èµwºÐ¡A³o¨ÇÅÞ¿èµwºÐ´N¬O±z¦b DOS/Windows ©Ò¬Ý¨£ªº C:¡BD:¡BE:¡K¡Kµ¥³o¨ÇµwºÐ¾÷¦WºÙ¡C

¨Ò¦p±z§â­è­è¶R¨ÓªºµwºÐ¸Ë¦b¹q¸£¤W¡A¥H Windows 98 SE ¶}¾÷¥úºÐ¶}¾÷¡A°õ¦æ FDISK «á¡A¥²©w·|¥ý­n¨D«Ø¥ß¤@­Ó¥D­n¤À³Î¡A¦pªG±zªº¥D­n¤À³Î¨Ã¤£¦û¦³©Ò¦³ªºµwºÐ®e¶q¡AFDISK ·|«Øij±z«Ø¥ßÂX¥R¤À³Î¡A«ÝÂX¥R¤À³Î«Ø¥ß¦n«á¡A·|¦A­n¨D±z«Ø¥ßÅÞ¿èµwºÐ ( ¦bÂX¥R¤À³ÎùتºÅÞ¿èµwºÐ¤]ºÙ¬°ÅÞ¿è¤À³Î )¡A¦pªG±z«Ø¥ß¦n¨â­ÓÅÞ¿èµwºÐ¡A¨º»ò±z´N¦³¤T­ÓÅÞ¿èµwºÐ¾÷¡A¦b¥D­n¤À³Îªº¬O C:¡A¥t¥~¨â­Ó´N¬O¦bÂX¥R¤À³Îªº¨â­ÓÅÞ¿èµwºÐ¡A¤À§O¬O D:¡BE:¡C¦]¦¹±zÁöµM¥u¶R¤F¤@Áû¹êÅéµwºÐ¡A¦ý±z«o¦³ C:¡BD:¡BE: ¤T­ÓÅÞ¿èµwºÐ¡A

¤£¹L¥Î·L³nªº¤À³Î¤u¨ã¡A¦ü¥G¥u¯à«Ø¥ß¤@­Ó¥D­n¤À³Î¡A³o¥i¯à¬O·L³n°Ó·~¤Wªº¦Ò¼{¡A©Ò¥H¥u¦³ÂǧU¨ä¥Lªº³nÅé¡A¨Ò¦p SPFDISK¡BOS/2 ªº±Ò°ÊºÞ²z©Î Linux ªº¤À³Î¤u¨ã¡A¤~¥i¥H«Ø¥ß¦h­Ó¥D­n¤À³Î¡C¥»³¹¤Î¤U¤@³¹±N­n¤¶²Ð³o¨Ç¤À³Î°Ï»PÅÞ¿èµwºÐ¦b¹êÅéµwºÐ¤W¦p¦ó¦w±Æ¡C¥»³¹¥ý¤¶²ÐµwºÐªººc³y ( ¥]§t´X¦óµ²ºc»P LBA ÅÞ¿èºÏ°Ï )¡A¨Ã¹ê§@¤@­ÓµwºÐºÏ°ÏÆ[¹îµ{¦¡¡A¥¦¥i¥HÆ[¬ÝµwºÐªº¨C¤@³¡¥÷¡A¤U¤@³¹¦A¤¶²Ð FAT Àɮרt²Î¡C


µwºÐ´X¦óµ²ºc

µwÅé´X¦óµ²ºc

¤@ÁûµwºÐªº¥~Æ[­«­nªº¤¸¥ó¦³¹q·½´¡®y¡BIDE ±Æ½u¡B¸õ°w ( jumper¡A³]©w MASTER ©Î SLAVE )¡A¥H¤Î¤@¤ù¥]§t±K±K³Â³Â¹q¤l¤¸¥óªº¹q¸ôªO¡A­t³d±±¨îµwºÐ¹B§@¡C¦ÓÀx¦s¸ê®Æªº¦a¤è«h¬O¦bµwºÐ¤º³¡ªº¼Æ¤ù§t¦³ºÏ©Êª«½èªºª÷Äݶê§ÎªO¤W¡A³o¨Çª÷Äݶê§ÎªOºÙ¬°ºÏ½L ( platters )¡A¥¦­Ì¬O¥Hª÷ÄݦXª÷©Î¨ä¥L°íµwª«½è©Ò»s¦¨ªº°òªO¡A¤W­±¶î¤WºÏ©Êª«½è¥Î¥HÀx¦s¸ê®Æ¡C¼Æ¤ùºÏ½L¥H¤@­ÓºÙ¬°¥D©Ó¶bªº¶b¤ß¡A¦w¸Ë©ó¤@­Ó±K³¬µL¹Ð«Ç¤º¡A¥D©Ó¶b¤W³s±µ¹q°Ê¾÷¡A¥H°ª³t±a°ÊºÏ½L±ÛÂà¡C¤@¯ë¤@­ÓºÏ½L¦³¥¿¤Ï¨â­±¡A¦U¦³¤@­ÓºÏÀY­t³dŪ¼g¡A¦Ü©ó­nŪ¼gºÏ½L¨º­Ó³¡¥÷¡A«h¬O¥ÑºÏÀY¶Ç°Ê²Õ¤ÎºÏ½LÂà°Ê¨ì¨ºùبM©w¡C½Ð°Ñ¾\¤U¹Ï¤¤ªº¤U¥b¹Ï¡G

µwºÐ¤º³¡ºc³y

¤@­ÓºÏ½L¥i¤À¬°¥¿¤Ï¨â­±¡A¨C¤@­±¤À¦¨³\¦h¤j¤j¤p¤pªº¦P¤ß¶ê¡A¨C­Ó¦P¤ß¶ê³£ºÙ¬°¡yºÏ­y¡z( track )¡A¨C­ÓºÏ­y¤S¥i¤À¦¨³\¦h¤pªº©·§Î°Ï°ì¡AºÙ¬°¡yºÏ°Ï¡z( sector )¡C½Ð°Ñ¦Ò¹Ï¤¤¼Ð¦³¡y01(00)¡z¡B¡y02(01)¡z¡B¡y03(02)¡z¡K¡K¡y3F(3E)¡zµ¥¤Q¤»¶i¦ì¼Æ¦rªº©·§Î°Ï°ì¡A´N¬OºÏ°Ï¡A³o¨Ç¼Æ¦rªí¥ÜºÏ°Ï½s¸¹¡AºÏ°Ï½s¸¹¥Ñ¤@¶}©l¡A³o¸ò¤@¯ë¹q¸£ªº²ßºD¤£¦P¡C¦Ó¥Ñ¡y01¡z¡B¡y02¡z¡B¡y03¡z¡K¨ì¡y3F¡zµ¥ºÏ°Ï©Ò²Õ¦¨ªº¤@­Ó¶ê¡A§Y¬°¤@­ÓºÏ­y¡AºÏ­y¥Ñ³Ì¥~­±¡A¤]´N¬O¥b®|³Ì¤jªººÏ­y¶}©l½s¸¹¡A©Ò¥H¥Ñ¡y01¡z¡B¡y02¡z¡B¡y03¡z¡K¨ì¡y3F¡zºÏ°Ï©Ò²Õ¦¨ªººÏ­yºÙ¬°²Ä¹s­y¡C¤£¦PµwºÐªº¤@­ÓºÏ­y©Ò§tªººÏ°Ï¼Æ¤£¦P¡A¨C¤@­±ªººÏ­y¼Æ¤]¤£¬Û¦P¡A¤W­±¥u¬OÁ|­Ó¨Ò¤l¤è«K»¡©ú¦Ó¤w¡C¾¨ºÞ¨C­ÓµwºÐºÏ°Ï¡BºÏ­y¼Æ¦³¦h¦³¤Ö¡A¦ý¬O³£¬O±q³Ì¥~°éºÏ­yªº²Ä¤@¸¹ºÏ°Ï¶}©l°O¿ý¸ê®Æªº¡C

() ¤ººñ¦âªº¼Æ­È¬O¥t¤@ºØ¤è¦¡ªººÏ°Ï½s¸¹¡A¦¹ºØ½s¸¹¤è¦¡ºÙ¬° LBA ÅÞ¿èºÏ°Ï½s¸¹¡C¥¦¬O¥Ñ¹s¶}©l¤@ª½¨ì³Ì¤jºÏ°Ï¡A¤£¤ÀºÏ­y¡BºÏ­±¡C

¤@¯ë¦Ó¨¥¡AµwºÐ¤j¬ù¥Ñ¨â­Ó©Î¨â­Ó¥H¤WªººÏ½L²Õ¦¨¡A·í¬Y¤@­±ªº¬Y­ÓºÏ­y¤w°O¿ýº¡¸ê®Æ«á¡AÁÙ¦³·s¸ê®Æ­n¼g¤J®É¡A«o¤£¬O¼g¤J¦P¤@­±ªº¤U¤@­Ó¤º°éºÏ­y¡A¦Ó¬O¤U¤@­±ªº¬Û¹ïÀ³ªººÏ­y¤W¡C¨Ò¦p¤W¹Ï¤¤²Ä¹s­y²Ä¹s­± ( ¤]´N¬O½s¸¹ 01¡ã3F ©Î LBA 00¡ã3E ºÏ°Ï©Ò²Õ¦¨ªººÏ­y ) ¤w¼gº¡¸ê®Æ«á¡A­Y¦³·s¸ê®Æ®É¡A¬O¼g¦b¨ä­I­±ªººÏ­y¤W¡A§Y²Ä¹s­y²Ä¤@­±ªººÏ°Ï¤W¡A¤]´N¬O LBA ½s¸¹ 3F¡ã7D ªººÏ°Ï¤W ( ¦]¬°¦b­I­±¡A©Ò¥H¹Ï¤¤¨Ã¥¼ªí¥Ü¥X¨Ó )¡C¦P¼Ë¦a¡A­Y¬O³o¤@­y¤]¤w¼gº¡¡A¨º»ò´N·|¼g¦b¤U¤@±iºÏ½Lªº¬Û¹ï¦ì¸m¤W¡A¤]´N¬O²Ä¹s­y²Ä¤G­±ªººÏ°Ï¤W ( LBA ½s¸¹ BD¡ãFB ©Ò²Õ¦¨ªººÏ­y¤W )¡C´N³o¼Ë¡A¨C¤@­±ºÏ½L¤WªººÏ­y¥Ñ¤W©¹¤U¡A§Î¦¨³\¦h¥b®|¤j¤p¤£µ¥ªº°²·QªÅ¤ß¶ê¬W¡AºÙ¬°ºÏ¬W ( cylinder )¡A±z¥i¥H·Q¹³ºÏ¬W¬O³\¦hºÏ­yÅ|¦b¤@°_ªº°²·Q¶ê¬W¡A´N¹³¹Ï¤¤ªº¤W¥b¹Ï¡C

±z¤]³\·|°Ý¡G¡y¬°¤°»ò­n³o¼Ë¦w±Æ¡H¬°¦ó¤£¤@­±¼g§¹¦A´«¥t¤@­±©O¡H¡z¦]¬°¦pªG³o¼Ë¦w±Æªº¸Ü¡AÅܦ¨¤@­ÓºÏ­y¼g§¹´N±oªá®É¶¡²¾°ÊºÏÀY¨ì¹j¾Àªº¤º°éºÏ­y¡A¦ÓºÏÀYªº²¾°Ê±o¾a¨B¶i¹q°Ê¾÷ªº¾÷±ñ²¾°Ê¡A­nªá¸û¦hªº®É¶¡¡A©Ò¥H¤~³]­p¦¨¨CºÏ¬W¼g§¹¡A¤~²¾¨ì¤U¤@ºÏ¬W¡C

©ó¬O§Ú­Ì¥i¥H»¡¡AµwºÐŪ¼g®É¡A¥HºÏ¬W ( cylinder )¡BºÏÀY ( head )¡BºÏ°Ï ( sector ) ³o¤T­Ó°Ñ¼Æ¨Óªí¥Ü©ÒŪ¼gªº¸ê®Æ¦ì©óµwºÐªº¨º¤@­Ó¦ì¸m¡C³o´N¬O¦³¦Wªº C¡BH¡BS ªí¥Üªk¡C¤p¤ì°¸¾ã²z¦p¤U¡GºÏ¬W¥Ñ³Ì¥~­±¶}©l¡A¥Ñ¹s¶}©l½s¸¹¤@ª½¨ì³Ì¤jºÏ¬W¡C¨C­ÓºÏ¬W¦A¤À¬°¦n´X­ÓºÏÀY¡A¦]¬°ºÏ½L¨C¤@­±³£¦³¤@­ÓºÏÀY­t³dŪ¼g¡A©Ò¥H¥HºÏÀY¼Æ¥Nªí­±¡AºÏÀY¤]¬O±q¹s¶}©l½s¸¹¡CºÏ¬W¤Wªº¨C¤@­±¦A²Ó¤À¦¨¼Æ­ÓºÏ°Ï¡AºÏ°Ï¬O±q¤@¶}©l½s¸¹¡A³oÂI«Ü©_©Ç¡A»P¹q¸£¤Wªº²ßºD¤£¦P¡C¨C­ÓºÏ°Ï³£¥i¦s¤J 512 ­Ó¦ì¤¸²Õªº¸ê®Æ¡A³oÂI«o¬O¨CÁûµwºÐ³£¬O¦p¦¹¡C

¦Ó¦³¥t¤@ºØ½s¸¹¤è¦¡¡AºÙ¤§¬° LBA ÅÞ¿è½s¸¹¡A­Y¥H¦¹¤è¦¡½s¸¹¡A«h¬O¥HºÏ°Ï¬°³æ¦ì¡A¤£¤ÀºÏ¬W¡BºÏÀY¡A¦Ó¥Ñ 0 ¶}©l¡A¨Ì§Ç¥Ñ 0¡B1¡B2¡B3¡K¡K¤@ª½¨ì³Ì¤jºÏ°Ï¬°¤î¡CLBA ½s¸¹»P CHS ¤§¶¡ªº´«ºâ¡A¤U­±·|´£¨ì¡C

MBR »P¤À³Îªí

©³¤U­n¤¶²Ð§@·~¨t²Î¦p¦ó¨Ï¥ÎµwºÐ¡C­è­è¶R¨ÓªºµwºÐ¥²©w­n¸g¹L¤À³Î¡B®æ¦¡¤Æ¤§«á¤~¯à¦s©ñ¸ê®Æ¡C¦Ó³o¤À³Î«áªº¸ê®Æ°O¸üµÛ¨C­Ó¤À³Î°Ï¤j¤p¡B¥Ñ¨º­ÓºÏ¬W¨ì¨º­ÓºÏ¬W¡A³£°O¿ý¦b¤@­ÓºÙ¬°¤À³Îªí ( partition table )ªº¦a¤è¡A±z¥i¥H·Q¹³¤À³Îªí¬O«Ü­«­nªº¸ê®Æ¡A¦pªG·lÃa¤F¡A¤j·§´N§ä¤£µÛ±z­nªº¸ê®Æ¤F¡C³o»ò­«­nªº¸ê®Æ¡A¹q¸£·~¬É³W©w³£¦s©ñ©óµwºÐªº²Ä¹sºÏ¬W¡B²Ä¹sºÏÀY¡B²Ä¤@ºÏ°Ï¡A¤]´N¬O³Ì«e­±ªººÏ°ÏùØ¡A³o­ÓºÏ°ÏºÙ¬°¥D±Ò°Ê°O¿ý ( §Y MBR¡Amaster boot record )¡C¦b MBR ùØ°£¤F¤À³Îªí¥~¡AÁÙ¦³±Ò°Êµ{¦¡¡C«e­±´£¹L¡A¨C­ÓºÏ°Ï³£¦û 512 ­Ó¦ì¤¸²Õ¡AMBR ºÏ°Ï¤¤ªº«e 446 ­Ó¦ì¤¸²Õ ( 0¡ã445 ) ¥Î¨Ó¦s©ñ±Ò°Ê¸ê®Æ»Pµ{¦¡¡A¦Ó±µ¤U¨Óªº 64 ­Ó¦ì¤¸²Õ´N¬O¤À³Îªí¡A³Ì«á¤@­Ó¦r²Õ ( 2 ­Ó¦ì¤¸²Õ ) ¬O AA55H¡A§@¬°ÃѧO¤§¥Î¡C

¤À³Îªí¦@¦³ 64 ­Ó¦ì¤¸²Õ¡A«ê¦n¥i¥H´y­z¥|­Ó¤À³Î°Ïªº©Ê½è ( §Y¤T­Ó¥D­n¤À³Î»P¤@­ÓÂX¥R¤À³Î )¡A©Ò¥H¨C­Ó¤À³Î¥Î 16 ­Ó¦ì¤¸²Õ¨Óªí¥Ü³o­Ó¤À³Î°Ïªº©Ê½è¡A»¡©ú¦p¤U¡G

°¾²¾¦ì§} ¤j¤p
( ¦ì¤¸²Õ )
¦W¡@¡@ºÙ »¡¡@¡@©ú
00H 1 ±Ò°Êª¬ºA 80H ªí¥Ü¥i±Ò°Ê
00H ªí¥Ü¤£¥i±Ò°Ê
01H 1 °_©lºÏÀY ¡@
02H 2 °_©lºÏ¬W»P
°_©lºÏ°Ï¡@
°_©lºÏ°Ï¦û¥Î 6 ­Ó¦ì¤¸¡A¦Ó°_©lºÏ¬W¦û¥Î 10 ­Ó¦ì¤¸¡A¤À°t±¡§Î¬O¡G

°_©lºÏ°Ï¡G ³o¨â­Ó¦ì¤¸²Õ¤¤¡A§C¦ì¤¸²Õªº 0¡ã5 ¦ì¤¸¬°°_©lºÏ°Ï
°_©lºÏ¬W¡G ³o¨â­Ó¦ì¤¸²Õªº°ª¦ì¤¸²Õ¬°°_©lºÏ¬Wªº 0¡ã7 ¦ì¤¸¡A³o¨â­Ó¦ì¤¸²Õ¤¤¡A§C¦ì¤¸²Õªº 6¡ã7 ¦ì¤¸¬°°_©lºÏ¬Wªº³Ì°ª¨â­Ó¦ì¤¸ ( ²Ä 8¡ã9 ¦ì¤¸ )
04H 1 Àɮרt²Î 06H¡B0EH¡GFAT16
0BH¡B0CH¡GFAT32
05H¡B0FH¡GÂX¥R¤À³Î
07H¡GNTFS ©Î OS/2 HPFS
¨ä¾l°Ñ¾\Andries Brouwer ©Ò¼gªº Partition types
05H 1 µ²§ôºÏÀY ¡@
06H 2 µ²§ôºÏ¬W
»PºÏ°Ï¡@
¦P°_©lºÏ¬W»PºÏ°Ï
08H 4 ¤À³Î°Ï¬Û
¹ï¦ì¸m¡@
¶ZÂ÷ MBR ªººÏ°Ï¼Æ¡A¥ç§Y¦¹¤À³Î¶}©lªº LBA ºÏ°Ï½s¸¹©ÎÁôÂúϰϼÆ
0CH 4 ºÏ°Ï¼Æ ¸Ó¤À³ÎºÏ°ÏÁ`¼Æ

¬Y¨ÇÀɮרt²Î¡A¥Î¨â­ÓÃѧO½X¨Óªí¥Ü¡A¨Ò¦p 0BH¡B0CH ³£¬Oªí¥Ü FAT32¡A06H¡B0EH ³£ªí¥Ü FAT16¡A05H¡B0FH ³£ªí¥ÜÂX¥R¤À³Î¡A³o¬O²o¯A¨ìµwºÐ®e¶qªºÃö«Y¡C¦­´ÁµwºÐ®e¶q¸û¤p¡A¥Î C¡BH¡BS ¨Ó©w§}ºÏ°Ï¨S¦³°ÝÃD¡A¦ý¬O·íµwºÐ®e¶q¶W¹L 8.4G ®É¡A´N¥²¶·¥Î LBA ©w§}ºÏ°Ï¡C0BH¡B06H¡B05H ¤À§Oªí¥Ü FAT32¡BFAT16¡BÂX¥R¤À³Îªº C¡BH¡BS ª©¡F¦Ó 0CH¡B0EH¡B0FH «hªí¥Ü¥Î LBA ©w§}ºÏ°Ï¡C( °Ñ¦Ò«á­±ªº©µ¦ù INT 13H )

·í¥Î LBA ©w§}ºÏ°Ï®É¡A¤À³Îªí¤ºªº°_©l©Îµ²§ôºÏ¬W¡BºÏÀY¡BºÏ°Ï´N¨S¦³¥Î¤F¡A¥²¶·°Ñ¦Ò¤À³Î°Ï¬Û¹ï¦ì¸m¨º¤@Ä檺¼Æ­È¡A¤~¯à§ä¨ì¯u¥¿ºÏ°Ï¡C

ÂX¥R¤À³Îªí

ÂX¥R¤À³Î¤º¥i¥H¤À¦¨³\¦hÅÞ¿èµwºÐ¡AºÝµøµwºÐ®e¶qªº¤j¤p¡A©Ò¥HµLªk¥Î©T©wªºªø«×°O¿ý¦U­ÓÅÞ¿èµwºÐªº°_©l¦ì¸m©Î¤j¤pµ¥µ¥¡A¦]¦¹¹q¸£·~¬Éªº°µªk¬O¥Î¼Æ­ÓºÙ¬°ÂX¥R¤À³Îªí ( extended partition table ) ªºªí®æ°O¿ý³o¨Ç¸ê®Æ¡C

ÂX¥R¤À³Î¤ºªº²Ä¤@­ÓºÏ°Ï¤º§t²Ä¤@­ÓÂX¥R¤À³Îªí¡A¦oªº®æ¦¡¤£¶È©M¤À³Îªí¬Û¦ü¡A¦Ó¥B¤]³£¬O¦s©ñ¦b±q¸ÓºÏ°Ïªº²Ä 446 ­Ó¦ì¤¸²Õ¶}©l¡A©¹«áºâ¡AÁ`¦@ 64 ­Ó¦ì¤¸²Õªº¸ê®ÆùØ¡C¦P¼Ë¤]¤À¦¨¥|µ¥¤À¡A¦ý¬O¥u¥Î¨ì«e­±¨â¥÷¡A«á­±¨â¥÷§¡¶ñ¤J¹s¡C²Ä¤@­Ó 16 ¦ì¤¸²ÕùØ­±©Ò°O¸üªº¸ê®Æ¬O«ü³o­ÓÅÞ¿èµwºÐªº¸ê®Æ¡A¦Ó¥¦ªº°_©lºÏ¬W¡BºÏÀY¡BºÏ°Ï¡Aµ²§ôºÏ¬W¡BºÏÀY¡BºÏ°Ï©Î¬O¤À³Î°Ï¬Û¹ï¦ì¸m³£¬O¬Û¹ï©óÂX¥R¤À³Îªí©Ò¦b¦ì¸m¡A¨Ã«D¹êÅéµwºÐªº MBR¡C²Ä¤G­Ó 16 ¦ì¤¸²ÕùØ©Ò°O¸üªº¸ê®Æ«h¬O«ü¤U¤@­ÓÂX¥R¤À³Îªíªº¸ê®Æ¡A¦P¼Ëªº¡A¨ä°_©lºÏ¬W¡BºÏÀY¡BºÏ°Ï¡Aµ²§ôºÏ¬W¡BºÏÀY¡BºÏ°Ï©Î¬O¤À³Î°Ï¬Û¹ï¦ì¸m¤]³£¬O¬Û¹ï©ó«e¤@­ÓÂX¥R¤À³Îªí©Ò¦b¦ì¸m¡C

¹³³o¼Ë¡A´N§Î¦¨¤@­ÓÃ쪬ªºÂX¥R¤À³Îªí¡A¨C­ÓÂX¥R¤À³Îªíªº²Ä¤@­Ó 16 ¦ì¤¸²Õªí¥Ü³o­ÓÅÞ¿èµwºÐªº¸ê®Æ¡A¦Ó²Ä¤G­Ó 16 ¦ì¤¸²Õ«hªí¥Ü¤U¤@­ÓÂX¥R¤À³Îªíªº¸ê®Æ¡C¦ý¬O¡A¦pªG¬O³Ì«á¤@­ÓÅÞ¿èµwºÐªº¸Ü¡A¨º»ò¥u¥Î¨ì¤@¥÷¡A«á­±¤T¥÷§¡¶ñ¤J¹s¡A¦]¦¹¥u­n¬O²Ä¤G¥÷¥þ³¡¬°¹s¡A¨t²Î´Nª¾¹D¤w¸g¬O³Ì«á¤@­ÓÅÞ¿èµwºÐ¤F¡C


INT 13 BIOS ªA°Èµ{¦¡

INT 13H ¬O BIOS ´£¨ÑªºªA°Èµ{¦¡¡A¥¦¬O¥Î¨Ó´£¨Ñ³nºÐ¡BµwºÐªA°È¤§¥Î¡A¨Ò¦p®æ¦¡¤Æ¡BŪ¨úµ¥µ¥¡K¡A¦­´Á¤]¦³³\¦h¤H§Q¥Î INT 13H ®æ¦¡¤Æ¤£¥¿±`ºÏ°Ï/ºÏ­y¹F¨ì«OÅ@ªº¥Øªº¡C

INT 13H/AH=02H¡GŪ¨úºÏ°Ï

¦­´ÁµwºÐ¤£¤j¡A¬O¥H AH=02/INT 13H Ū¨úµwºÐ¤WºÏ°Ïªº¸ê®Æ¡CAL ªí¥Ü·Q­nŪ¨úªººÏ°Ï¼Æ¡A¤£¥i¬°¹s¡CDL ªí¥Ü·Q­nŪ¨úªºµwºÐ¾÷¦WºÙ¡A¦pªG¬O³nºÐ¡A0 ªí¥Ü A:¡A1 ªí¥Ü B:¡F¦pªG¬OµwºÐ¡A«h¥Î 80H ¥Nªí²Ä¤@­Ó¹êÅéµwºÐ¡A81H ¥Nªí²Ä¤G­Ó¹êÅéµwºÐ¡CES:BX «ü¦VŪ¨ú«áªº¸ê®Æ¦s©ó°O¾ÐÅé¦ó³B¡CDH ¬O«ü©Ò­nŪ¨úªººÏÀY½s¸¹¡ACX ªí¥ÜºÏ¬W¤ÎºÏ°Ï½s¸¹¡ACL ¸û§Cªº 6 ­Ó¦ì¤¸¡A§Y 0¡ã5 ¦ì¤¸¡Aªí¥Ü©Ò­nŪ¨úªººÏ°Ï½s¸¹¡A¦Ó¸û°ªªº¨â­Ó¦ì¤¸¥H¤Î CH ªº¤K­Ó¦ì¤¸¡A¦X°_¨Ó¦@ 10 ­Ó¦ì¤¸ªí¥ÜºÏ¬W½s¸¹ ( CH ªº¤K­Ó¦ì¤¸¬OºÏ¬W½s¸¹ªº¸û§C¦ì¤¸¡ACL ªº 6¡B7 ¨â­Ó¦ì¤¸¬OºÏ¬W½s¸¹ªº¸û°ª¦ì¤¸ )¡C½Ð°Ñ¦Ò¤U¹Ï¡G

¼È¦s¾¹»PCHS°Ñ¼Æ

¥Ñ¤W¹Ï¥iª¾¡A¥Î 10 ­Ó¦ì¤¸ªí¥ÜºÏ¬W½s¸¹¡A³Ì¦h¥i¥H¦³ 1024 ºØ½s¸¹ ( 210=1024 )¡A¨C­Ó½s¸¹¥Nªí¤@ºÏ¬W¡A³o½s¸¹¥Ñ 0¡ã1023 ¦@ 1024 ­ÓºÏ¬W¡C¦P²z¡AºÏÀY³Ì¦h¥i¥H¦³ 0¡ã127 ¦@ 128 ºØ¡F¦ÓºÏ°Ï¨Ï¥Î 6 ­Ó¦ì¤¸¡A©Ò¥H¦³ 64 ºØ¿ï¾Ü¡A§Y 0¡ã63¡A¦ý¬OºÏ°Ï³£¥Ñ½s¸¹¤@¶}©l¡A©Ò¥HºÏ°Ï³Ì¦h¥u¦³ 1¡ã63 ­Ó¡A§Y 63 ­ÓºÏ°Ï¡Cºî¦X¥H¤W»¡©ú¡JºÏ¬W³Ì¦h¬° 1024 ­Ó¡AºÏÀY³Ì¦h¬° 256 ­Ó¡AºÏ°Ï³Ì¦h¬° 63 ­Ó¡A¦Ó¨CºÏ°Ï³£©T©w¦³ 512 ­Ó¦ì¤¸²Õ¡A¦]¦¹¤@ÁûµwºÐ³Ì¦h¥u¯à®e¯Ç¡J

1024*256*63*512=8455716864

­Ó¦ì¤¸²Õ¡A¥ç§Y 8.4 GB ( 8.4GB ¬O¥H 1G=109¨Óºâ¡A°²¦p¨Ì¹q¸£¤G¶i¦ìºâªk¡AÀ³¸Ó¬O 8455716864¡Ò1024¡Ò1024¡Ò1024=8¡A§Y 8GB )¡C·íµM¨ì¤F²{¦b ( ¥Á°ê 92 ¦~¥ª¥k¤§«á ) µwºÐ¤w¸g¶W¹L¦¹®e¶q¤F¡A©Ò¥H IBM »P·L³n¦@¦P»s©w·sªº INT 13H Extension ¤¤Â_ªA°Èµ{¦¡ ( ©µ¦ù INT 13H )¡A¥H¸Ñ¨M¦¹¤@°ÝÃD¡C

³o­Ó·sªº©µ¦ù INT 13H §ï¥Î LBA ÅÞ¿è©w§}ªk ( Logical Block Addressing )¡A¤£¦A¥Î CHS °Ñ¼Æ¨Ó«ü©wŪ¨úªººÏ°Ï¡A¦Ó¥Î½u©ÊºÏ°Ï½s¸¹«ü©wºÏ°Ï¡Cªº INT 13H ¸ê®Æ¬Æ¦h¥B¤w¹L®É¡A©Ò¥H¤p¤ì°¸´N¤£°µ¤¶²Ð¡A¦¹³¹¬°¤F°t¦X¤jµwºÐ¡A©Ò¥H¤¶²Ð¤F©µ¦ù INT 13H ªº´X­Ó¥\¯à¡A¨ä¾l¥i¬d¾\ Ralf Brown's Interrupt List¡C

©µ¦ù INT 13H/AH=41H¡GINSTALLATION CHECK

­º¥ý­n¤¶²Ðªº¬OÀˬd BIOS ¬O§_¤ä´©©µ¦ù INT 13H¡A©I¥s«e AH=41H¡ABX=55AAH ªí¥ÜÀˬd¬O§_¤ä´©©µ¦ù INT 13H¡ADL ªí¥ÜµwºÐ¾÷½s¸¹¡A80H ªí¥Ü²Ä¤@³¡¹êÅéµwºÐ¾÷¡A81H ªí¥Ü²Ä¤G³¡¹êÅéµwºÐ¾÷¡Cªð¦^®É¡A­Y¶i¦ìºX¼Ð³Q³]©w¡Aªí¥Ü¤£¤ä´©¡F­Y¶i¦ìºX¼Ð³Q²M°£¡Aªí¥Ü¤ä´©©µ¦ù INT 13H¡AAH ÁÙªí¥Ü©µ¦ù INT 13H ªºª©¥»¡C

©µ¦ù INT 13H/AH=42H¡G©µ¦ùŪ¨ú

·í AH=42H ®Éªº¥\¯à¬O©µ¦ùŪ¨ú¡A¨Ï¥Î¦¹¥\¯à®É¡ADL ¬OµwºÐ½s¸¹¡A©M¤W­±¤@¼Ë¡A±q 80H ¶}©l¡ADS:DI «ü¦V¤@­ÓºÙ¬° disk address packet ªºµ²ºcÅé¡A¦¹µ²ºcÅ餺®e¬°¡J

disk_address_packet     STRUC
size_of_packet          db      ?       ;¦¹µ²ºcÅé¤j¤p
reserved                db      ?       ;«O¯d¡A¥²³]¬° 0
number_of_block         dw      ?       ;­nŪ¨úªººÏ°Ï¼Æ
buffer_offset           dw      ?       ;Ū¨úºÏ°Ï«á¡A¸ê®Æ¦s©ñ°¾²¾¦ì§}
buffer_segment          dw      ?       ;¸ê®Æ¦s©ñªº¬q¦ì§}
LBA_number              dq      ?       ;«ü©w­nŪ¨úªººÏ°Ï½s¸¹
flat_address            dq      ?       ;«ü©w¥­©Z¼Ò¦¡®É¡A¦s©ñ¦ì§}
disk_address_packet     ENDS

¦b©I¥s AH=42H ¥\¯à¤§«e¡A¥²¶·¥ý³]©w¦n disk address packet µ²ºcÅ餺ªº¦U­ÓÄæ¦ì¡Csize_of_packet Äæ¦ì¬Oµ²ºcÅé¤j¤p¡A¨ä¼Æ­È¤£¬O 10H ´N¬O 18H¡AºÝµø buffer_offset¡Bbuffer_segment ¬O§_¥i¥Î¡C¦b 16 ¦ì¤¸§@·~¨t²Î¤¤³o¨â­ÓÄæ¦ì´N¬O¤@¯ë©ÒºD¥Îªº Segment:Offset ©w§}¤è¦¡¡A¦¹®É¤£¶·¥Î¨ì³Ì«á¤@­ÓÄæ¦ì¡A©Ò¥H size_of_packet ¬° 10H ­Ó¦ì¤¸²Õ¡F¦ý¦pªG¦b¥­©Z¼Ò¦¡¤§¤U¨Ï¥Î¡A«h buffer_offset¡Bbuffer_segment ³o¨â­ÓÄæ¦ì³£¬O 0FFFFH¡A¦Ó¦¹®É¦ì§}¶·¶ñ¤J³Ì«á¤@Ä檺 flat_address ¤º¡A¬G size_of_packet ¬° 18H ­Ó¦ì¤¸²Õ¡CLBA_number «h¬O­nŪ¨úªººÏ°Ï½s¸¹¡A³o­ÓºÏ°Ï½s¸¹¤]´N¬O LBA ÅÞ¿èºÏ°Ï½s¸¹¡A±q 0 ¶}©l¤@ª½¨ìµwºÐªº³Ì¤jºÏ°Ï¡A¨ä­pºâ¤è¦¡¬°

( ºÏ¬W½s¸¹*¨CºÏ¬WªººÏÀY¼Æ ¡Ï ºÏÀY½s¸¹ ) * ¨C­yºÏ°Ï¼Æ ¡Ï ºÏ°Ï½s¸¹ ¡Ð 1

¦pªGªð¦^®É¡A­Y¶i¦ìºX¼Ð³Q²M°£¡Aªí¥ÜŪ¨ú¦¨¥\¡F­Y¶i¦ìºX¼Ð³Q³]©w¡Aªí¥ÜŪ¨ú¿ù»~¡A¦¹®É disk_address_packet µ²ºcÅ骺 number_of_block ·|³Q BIOS ³]©w¬°¹ê»ÚŪ¨úªººÏ°Ï¼Æ¡C

©µ¦ù INT 13H/AH=48H¡GÀò±o¹êÅéµwºÐªº¸ê®Æ°Ñ¼Æ

­n¨ú±o¤@Áû¹êÅéµwºÐªº¸ê®Æ°Ñ¼Æ¡A¥i¥Î AH=48H ¥\¯à¡ADL ªí¥Ü­n¨ú±o¸ê®ÆªºµwºÐ½s¸¹¡ADS:SI «ü¦V¨ú±o¸ê®Æ«áªº¸ê®Æ¶ñ©ñ¦ì§}¡A¦¹¦ì§}¦s©ñ¤@­ÓºÙ¬° drive parameter ªºµ²ºcÅé¡Cdrive_parameter µ²ºcÅéÄæ¦ì¦p¤U¡G

drive_parameter         STRUC
size_of_drive_parameter dw      ?       ;drive parameter ¤j¤p
information_flags       dw      ?       ;
cylinder                dd      ?       ;ºÏ¬WÁ`¼Æ
head                    dd      ?       ;ºÏÀY¼Æ
sector_per_track        dd      ?       ;¨C­yºÏ°Ï¼Æ
total_sectors           dq      ?       ;ºÏ°ÏÁ`¼Æ
byte_per_sector         dw      ?       ;¨CºÏ°Ï©Ò§t¦ì¤¸²Õ¼Æ
drive_parameter         ENDS

¦b©I¥s AH=48H ¥\¯à¤§«e¡A°£¤F¥²¶·¥ý«ü©w DL¡BDS:SI ¤§¥~¡AÁÙ±o¥ý³]©w drive_parameter µ²ºcÅ骺 size_of_drive_parameter Äæ¦ì¡A³o­ÓÄæ¦ìªº¼Æ­Èªí¥Ü drive_parameter µ²ºcÅ骺¤j¤p¡A¥i¥H¦³ 1AH¡B1EH¡B42H ¤TºØ¿ï¾Ü¡Aµø±z·QÀò±oªº¸ê®Æ¸ÔºÉµ{«×»P©µ¦ù INT 13H ªºª©¥»¨M©w¡A¤@¯ë¦Ó¨¥¡A1AH ¤j¬ù´N°÷¥Î¤F¡C°²¦p©I¥s¦¨¥\¡A¶i¦ìºX¼Ð·|³Q²M°£¡A¥B AH=0¡ADS:SI ©Ò«üªº drive parameter µ²ºcÅé·|¶ñ¤W¾A·íªº¼Æ­È¡F­Y©I¥s¥¢±Ñ¡A¶i¦ìºX¼Ð·|³Q³]©w¡AAH ¤º·|³Q¶ñ¤J¿ù»~¥N½X¡C


¼g­Óµ{¦¡¡A¥iŪ¨úµwºÐ¤¤¥ô·NºÏ°Ï

¬JµMÁA¸Ñ¤FµwºÐºc³y¡AºÏ¬W¡BºÏÀY¡BºÏ°Ï¹º¤À¡A¥H¤Î¥Î©µ¦ù INT 13H Ū¨úºÏ°Ïªº¤èªk¡A¤£¼g¦Û¦æ­Óµ{¦¡¨ÓÆ[¹îµwºÐ¤¤ÂäF¨º¨Ç¤º®e¡A´N¦³ÂI¨à¹ï¤£°_¦Û¤vªº¤j¸£¡C©³¤U³o­Óµ{¦¡ºÙ¬° HDSV2 ( Hard Disk Sector Viewer ²Ä 0.30 ª© )¡A°õ¦æ«áµe­±¦p¤U¡G

HDSV °õ¦æµe­±
¤W¹Ï¤¤¡A¬O¤p¤ì°¸ªº²Ä¹sÁûµwºÐªº MBR ºÏ°Ïªº²Ä 100H¡ã1FFH¡Aª`·N¨ì 1BEH¡ã1FDH ( µµ¦â®Ø°_¨Óªº³¡¥÷ ) ³o 64 ­Ó¦ì¤¸²Õ´N¬O¤À³Îªí¡A±µµÛ¤À³Îªí«áªº¨â­Ó¦ì¤¸²Õ´N¬O 0AA55H ÃѧO½X¡C

HDSV2.COM ¨Ï¥Î©µ¦ù INT 13H¡A²{¤µ¹q¸£ªº BIOS ´X¥G³£¤ä´©¤F¡A©Ò¥H¦b Win 9x/Me ©Î DOS ¨t²Î³£À³¸Ó¥i¥H¨Ï¥Î¡A¦ý¬O¦b Win 2K/XP ¨t²ÎùØ¡A¸T¤î§C¶¥©I¥s¡A©Ò¥HµLªk¨Ï¥Î¡C( ¤p¤ì°¸¦b DOS 6.20 ¤Î Win 98SE ¨Ï¥Î¹L¡A¨S¦³°ÝÃD¡A¦b DOS ¤¤±o¥ý°õ¦æ¤¤¤å¨t²Î¡A§_«h¬Ý¤£¨£¤¤¤å¦r¡F¦ý¦b Win XP ùتº½TµLªk¨Ï¥Î )

HDSV2 ­ì©l½X

HDSV2.ASM ·|¥Î¨ì¤@¨Çµ²ºcÅé¡A³o¨Çµ²ºcÅ餣ÀHµ{¦¡§ïÅÜ¡A¤]¥i¥[¤J MYASMINC.INC ¤º¡G

hdi             struc
hd_info_size    dw      ?       ;µwºÐ¸ê°Tµ²ºcÅé¤j¤p
hd_info_flag    dw      ?       ;information flags
total_cylinder  dd      ?       ;ºÏ¬WÁ`¼Æ
head_p_cylinder dd      ?       ;ºÏÀY¼Æ
sector_p_track  dd      ?       ;¨C­y©Ò§tºÏ°Ï¼Æ
total_sector    dq      ?       ;ºÏ°ÏÁ`¼Æ
byte_p_sector   dw      ?       ;¨CºÏ°Ï©Ò§t¦ì¤¸²Õ¼Æ
hdi             ends

hdpkt           struc           ;Hard Disk Packet
size_hdpkt      db      ?       ;Ū¨ú/¼g¤J±±¨î°Ï¶ô¤j¤p
reserved        db      ?       ;«O¯d¡A¥²¶·¬°¹s
sector_to_trans dw      ?       ;Ū¨ú/¼g¤JºÏ°Ï¼Æ
buffer_offset   dw      ?       ;Ū¨ú/¼g¤J®Éªº°O¾ÐÅé°¾²¾¦ì§}
buffer_segment  dw      ?       ;Ū¨ú/¼g¤J®Éªº°O¾ÐÅé°Ï¬q¦ì§}
sector_sn_l     dd      ?       ;±ýŪ¨ú/¼g¤Jªº°_©lºÏ°Ï½s¸¹¡A§CÂù¦r²Õ
sector_sn_h     dd      ?       ;±ýŪ¨ú/¼g¤Jªº°_©lºÏ°Ï½s¸¹¡A°ªÂù¦r²Õ
hdpkt           ends

chs             struc
cylinder        dd      ?
head            dd      ?
sector          dd      ?
chs             ends

¤U­±¬O HDSV2.ASM ªº¤º®e¡G

;µwºÐ¤¤¥ô·NºÏ°ÏÆ[¹îµ{¦¡¡C
;§Q¥Î°ïÅ|¶Ç»¼°Ñ¼Æ©I¥s°Æµ{¦¡¡C
;²ÕĶ¤èªk¡G     ML HDSV2.ASM
;±o¨ì HDSV2.COM¡AÁ`ªø«×¦@ 1902 ¦ì¤¸²Õ

                .model  tiny,stdcall
                .386

include         myasminc.inc
includelib      myasmlib.lib

input_color     equ     yellow_on_black
normal_color    equ     lime_on_black
title_color     equ     yellow_on_navy
software_color  equ     white_on_black
driver_color    equ     aqua_on_black 

;***********************************************************
code    segment para    public  'code'  use16
        assume  cs:code,ds:code
        org     100h
start:  jmp     begin
;-----------------------------------------------------------
msg00   db      'Ū¨ú¿ù»~$'
msg01   db      'Hard Disk Sector Viewer v.0.30$'
;HDSV 0.10 ª©¬O§â©Ò¦³°Æµ{¦¡³£¥]§t¦b¤@­Ó HDSV.ASM ­ì©l½X¤¤¡A¥B¥H¼È¦s¾¹¶Ç»¼°Ñ¼Æ
;HDSV 0.20 ª©¬O§â¤@¨Ç°Æµ{¦¡©ñ¦b MYASMLIB.LIB ùØ¡A²ÕĶ¦¨ HDSV1.COM¡C
msg02   db      'Esc=Â÷¶}   D=µwºÐ¾÷   M=MBR   ',18h,19h,'=Åã¥ÜºÏ°Ï«e/«á¥b­ÓºÏ°Ï$'
msg03   db      '¹êÅéµwºÐ¡G0  ºÏ¬W¡G000000  ºÏÀY¡G00  ºÏ°Ï¡G00   LBA ºÏ°Ï¡G00000000$'
msg04   db      ' 0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F   '
        db      '0123456789ABCDEF$'
msg05   db      '¨S¦³¹êÅéµwºÐ$'
msg06   db      'C=ºÏ¬W   H=ºÏÀY   S=ºÏ°Ï   L=LBA ºÏ°Ï   PageUp/PageDn=¤W/¤U¤@ºÏ°Ï'
msg07   db      '$'
msg08   db      '¿é¤JºÏÀY¡]00¡ã00¡^¡G$'
msg09   db      '¿é¤JºÏ¬W¡]00¡ã000000¡^¡G$'
msg0a   db      '¿é¤JºÏ°Ï¡]01¡ã00¡^¡G$'
msg0b   db      '¿é¤J¹êÅéµwºÐ¡}0¡ã0¡^¡G$'
msg0c   db      '¿é¤J LBA ½s¸¹¡}00¡ã00000000¡^¡G$'      ;055
n_hd            db      ?               ;¹êÅéµwºÐ¾÷¼Æ¥Ø
harddisk        db      80h             ;²Ä¹s¥x¹êÅéµwºÐ¾÷
hd_info         hdi     <1ah,?,?,?,?,?,?>       ;ºÏºÐ¾÷¸ê°T¡A§tÁ`ºÏ¬W¡BºÏ­y¡BºÏ°Ï
hd_read_pkt     hdpkt   <10h,0,1,?,?,?,?>       ;Ū¨úµwºÐ®Éªº°Ñ¼Æ
chs_sn          chs     <0,0,1>                 ;¥¿Åã¥Ü©ó¿Ã¹õ¤Wªº CHS
;-----------------------------------------------------------
al_to_ascii     proc    near
        push    ax      ;³B²z AL ®É¡A¥ý³B²z¸û°ªªº¥|­Ó¦ì¤¸¡A¬G¤]¥ý
        shr     al,4    ;§â¸û§Cªº¥|­Ó¦ì¤¸¦s¤J°ïÅ|¡CµM«á¸û§â°ªªº 4
        call    ax2as1  ;­Ó¦ì¤¸²¾¨ì¸û§Cªº¥|­Ó¦ì¤¸¡C
        pop     ax      ;§â³o¥|­Ó¦ì¤¸´«¦¨ ASCII ½Xªº¼Æ¦r©Î 'A'¡ã'F'
        and     al,0fh  ;¥Ñ°ïÅ|¨ú¦^ AL ªº¸û§C¥|¦ì¤¸¡A¨Ì¦P¼Ë¨BÆJ³B²z
ax2as1: add     al,'0'  ;³o¥|­Ó¦ì¤¸
        cmp     al,'9'
        jbe     ax2as2
        add     al,7
ax2as2: stosb
        ret
al_to_ascii     endp
;-----------------------------------------------------------
;§â AX ¤ºªº¤Q¤»¶i¦ì¼ÆÅܦ¨ ASCII ¦r¤¸¡A¦s©ó DI ©Ò«ü¦ì§}
ax_to_ascii     proc    near
        push    ax      ;§â AX ©î¦¨ AH¡BAL¡A¨âµ¥¤À¡A¥ý³B²z AH¡A¦A
        mov     al,ah   ;³B²z AL¡A¬G¥ý§â AL ¦s¤J°ïÅ|¡A¥O AL=AH
        call    al_to_ascii
        pop     ax      ;¥Ñ°ïÅ|¨ú¦^ AL
        call    al_to_ascii
        ret
ax_to_ascii     endp
;-----------------------------------------------------------
;¦L¥X¤@­¶¡A¦@ 256 ­Ó¦ì¤¸²ÕªººÏ°Ï¸ê®Æ¡A§Y¥b­ÓºÏ°Ïªº¸ê®Æ
;¿é¤J¡GSI=ºÏ°Ï¸ê®Æ¶}©l¦ì§}
;      BX=¦L¥X¨º¤@¥bªººÏ°Ï¸ê®Æ¡A0 ªí¥Ü«e¥b³¡¡A100H ªí¥Ü«á¥b³¡
;¿é¥X¡GBX=100H¡Ðªí¥Ü«e¥b³¡¡F200H¡Ðªí¥Ü«á¥b³¡
print_sector_data       proc    near
;¦b¡y¹êÅéµwºÐ¡G0  ºÏ¬W¡G000000  ºÏÀY¡G00  ºÏ°Ï¡G00¡K¡K¡z¦r¦ê¶ñ¤W
;¾A·íªº¹êÅéµwºÐ¡BºÏ¬W¡BºÏÀY¡BºÏ°Ï¡BLBA ºÏ°Ï½s¸¹
        mov     al,harddisk
        mov     di,offset msg03+10
        sub     al,50h          ;¶ñ¤J¹êÅéµwºÐ
        stosb
        add     di,8
        mov     eax,chs_sn.cylinder
        push    ax
        shr     eax,16
        call    al_to_ascii     ;¶ñ¤JºÏ¬W¸û°ª¥|¦ì¼Æ
        pop     ax
        call    ax_to_ascii     ;¶ñ¤JºÏ¬W¸û§C¥|¦ì¼Æ
        add     di,8
        mov     eax,chs_sn.head
        call    al_to_ascii     ;¶ñ¤JºÏÀY
        add     di,8
        mov     eax,chs_sn.sector
        call    al_to_ascii     ;¶ñ¤JºÏ°Ï

        add     di,13
        mov     eax,hd_read_pkt.sector_sn_l
        push    ax
        shr     eax,16
        call    ax_to_ascii     ;¶ñ¤J¸û°ªªº¥|¦ì LBA ºÏ°Ï½s¸¹
        pop     ax
        call    ax_to_ascii     ;¶ñ¤J¸û§Cªº¥|¦ì LBA ºÏ°Ï½s¸¹
        invoke  print_string,offset msg03,driver_color,500h
        invoke  print_string,offset msg04,title_color,609h

;¦L¥X¨C¤@¦C¡AÁ`¦@­n¦L¥X 16 ¦C¡C¨C¦C¥i¤À¬°¤T³¡¤À¡G°¾²¾¦ì§}¡B¦ì¤¸²Õ¸ê®Æ¡BASCII ¦r¤¸
        mov     dh,7h   ;DH=²Ä´X¦C
        add     si,bx   ;SI=­n¦L¥Xªº¦ì¤¸²Õ¸ê®Æ¦ì§}

nxt_r:  mov     dl,3h   ;DL=²Ä´X¦æ¡A¨C¦C³£±q²Ä 3 ¦æ¶}©l
        mov     ax,bx
        invoke  print_ax,title_color,dx ;¦L¥X°¾²¾¦ì§}
        inc     dl
        inc     dl

nxt_by: lodsb
        invoke  print_al,normal_color,dx;¦L¥X¦¹¦Cªº¤@­Ó¦ì¤¸²Õ¸ê®Æ
        mov     ax,si
        mov     cl,' '
        and     al,0fh  ;­Y¦ì§}ªº¸û§C 8 ¦ì¤¸§¡¬°¹s¡Aªí¥Ü¦¹¦C¤wµ²§ô
        jz      pt_asc  ;¤U¨BÀ³¦L¥X ASCII ¦r¤¸
        cmp     al,8    ;­Y¦¹¦C¤w¸g¦L¥X 8 ­Ó¦ì¤¸²Õ®É
        jne     pt_chr  ;¥²¶·¦L¥X '-'¡A§_«h¦L¥XªÅ¥Õ
        mov     cl,'-'
pt_chr: invoke  print_char,cl,normal_color,dx
        jmp     nxt_by

;¦L¥X ASCII ¦r¤¸
pt_asc: mov     cx,10h  ;¨C¦C 16 ­Ó ASCII ¦r¤¸ 
        add     dl,3    ;¶¡¹j¦ì¤¸²Õ¸ê®Æ¤T¦æ
        sub     si,cx   ;¨Ï¦ì§}«ü¦V¦¹¦C¶}©l³B
nxt_pt: lodsb
        invoke  print_char,al,normal_color,dx
        loop    nxt_pt
        inc     dh
        add     bx,10h
        cmp     dh,17h  ;­Y¦L¨ì¿Ã¹õ²Ä 17H ¦æ¡Aªí¥Ü¾ã­¶¤wÅã¥Ü§¹²¦
        jne     nxt_r

        ret
print_sector_data       endp
;-----------------------------------------------------------
;Âà´«µwºÐªººÏ¬W¡BºÏÀY¡BºÏ°ÏÅܦ¨¹êÅéµwºÐªº LBA ºÏ°Ï½s¸¹
;¤½¦¡¡GLBA ºÏ°Ï½s¸¹= ( ºÏ¬W * ºÏÀYÁ`¼Æ + ºÏÀY )* ¨C­yºÏ°Ï¼Æ + ºÏ°Ï - 1
;¿é¤J¡Gchs_sn
;¿é¥X¡GEDX:EAX¡ÐLBA ºÏ°Ï½s¸¹
;      hd_read_pkt.sector_sn_h:hd_read_pkt.sector_sn_l
get_lba_sector  proc    near
        sub     edx,edx
        mov     ecx,edx
        mov     eax,chs_sn.cylinder
        mul     hd_info.head_p_cylinder
        add     eax,chs_sn.head
        adc     edx,ecx
        mul     hd_info.sector_p_track
        add     eax,chs_sn.sector
        adc     edx,ecx
        dec     eax
        sbb     edx,ecx
        mov     hd_read_pkt.sector_sn_l,eax
        mov     hd_read_pkt.sector_sn_h,edx
        ret
get_lba_sector  endp
;-----------------------------------------------------------
;·í¿é¤J§¹¦¨«á¡A²M°£¿Ã¹õ¤W¡y¿é¤J¡K¡z¦r¦ê
clear_message   proc    near
        invoke  print_string,offset msg07,normal_color,1700h
        ret
clear_message   endp
;-----------------------------------------------------------
;Åܧó¹êÅéµwºÐ¾÷½s¸¹
;¿é¥X¡GCY¡Ð¨Ï¥ÎªÌ¨ú®ø¿é¤J
;      NC¡Ð¨Ï¥ÎªÌ¥¿½T¿é¤J¡Achs_sn ¤Î 
;          hd_rd.sector_sn_h:hd_rd.sector_sn_l ¤º®e·|«ü¦V MBR
change_hd       proc    near
        mov     al,n_hd
        mov     di,offset msg0b+11h
        add     al,30h  ;­pºâ³Ì¤j¹êÅéµwºÐ¾÷½s¸¹
        dec     al      ;AL=³Ì¤j¹êÅéµwºÐ¾÷½s¸¹
        stosb
        invoke  print_string,offset msg0b,input_color,1700h
        invoke  input,1,10h,input_color,dx
        jc      ch0     ;­Y CY¡Aªí¥Ü¨Ï¥ÎªÌ«ö¤U Esc Áä
        cmp     al,n_hd ;¨Ï¥ÎªÌ¿é¤J¤§¹êÅéµwºÐ¼Ð¸¹¬O§_¶W¹L½d³ò
        jae     change_hd       ;­Y¶W¹L½d³ò¡A«h¸õ¨ì change_hd:
        add     al,80h          ;­Y¨S¶W¹L½d³ò¡A«h§ïÅܹêÅéµwºÐ¾÷½s¸¹
        mov     harddisk,al
        sub     eax,eax
        mov     chs_sn.cylinder,eax
        mov     chs_sn.head,eax ;ÅܧóµwºÐ¾÷«á¡A¥i¯à¦]ºÏ¬W½s¸¹©Î®e¶q¸û¤p
        inc     eax             ;³y¦¨Åª¨ú¿ù»~¡A¬G chs_sn ¦Û°Ê´«¦¨ MBR
        mov     chs_sn.sector,eax
        clc
ch0:    ret
change_hd       endp
;-----------------------------------------------------------
;ÅܧóºÏ¬W
;¿é¥X¡GCY¡Ð¨Ï¥ÎªÌ¨ú®ø¿é¤J
;      NC¡Ð¨Ï¥ÎªÌ¥¿½T¿é¤J¡Achs_sn ¤Î 
;          hd_rd.sector_sn_h:hd_rd.sector_sn_l ¤º®e·|ÀH¤§Åܧó
change_cylinder proc    near
        mov     eax,hd_info.total_cylinder
        dec     eax
        push    ax
        mov     di,offset msg09+14
        shr     eax,16
        call    al_to_ascii
        pop     ax
        call    ax_to_ascii
        invoke  print_string,offset msg09,input_color,1700h
        invoke  input,8,10h,input_color,dx
        jc      cc0
        cmp     eax,hd_info.total_cylinder
        jae     change_cylinder
        mov     chs_sn.cylinder,eax
        clc
cc0:    ret
change_cylinder endp
;-----------------------------------------------------------
;ÅܧóºÏÀY
;¿é¥X¡GCY¡Ð¨Ï¥ÎªÌ¨ú®ø¿é¤J
;      NC¡Ð¨Ï¥ÎªÌ¥¿½T¿é¤J¡Achs_sn ¤Î 
;          hd_rd.sector_sn_h:hd_rd.sector_sn_l ¤º®e·|ÀH¤§Åܧó
change_head     proc    near
        mov     eax,hd_info.head_p_cylinder
        mov     di,offset msg08+14
        dec     ax
        call    al_to_ascii
        invoke  print_string,offset msg08,input_color,1700h
        invoke  input,2,10h,input_color,dx
        jc      ch0
        cmp     eax,hd_info.head_p_cylinder
        jae     change_head
        mov     chs_sn.head,eax
        clc
ch0:    ret
change_head     endp
;-----------------------------------------------------------
;ÅܧóºÏ°Ï
;¿é¥X¡GCY¡Ð¨Ï¥ÎªÌ¨ú®ø¿é¤J
;      NC¡Ð¨Ï¥ÎªÌ¥¿½T¿é¤J¡Achs_sn ¤Î 
;          hd_rd.sector_sn_h:hd_rd.sector_sn_l ¤º®e·|ÀH¤§Åܧó
change_sector   proc    near
        mov     di,offset msg0a+14
        mov     eax,hd_info.sector_p_track
        call    al_to_ascii
        invoke  print_string,offset msg0a,input_color,1700h
        invoke  input,2,10h,input_color,dx
        jc      cs0
        or      eax,eax
        jz      change_sector
        cmp     eax,hd_info.sector_p_track
        ja      change_sector
        mov     chs_sn.sector,eax
        clc
cs0:    ret
change_sector   endp
;-----------------------------------------------------------
;Åܧó LBA ºÏ°Ï½s¸¹
;¿é¥X¡GCY¡Ð¨Ï¥ÎªÌ¨ú®ø¿é¤J
;      NC¡Ð¨Ï¥ÎªÌ¥¿½T¿é¤J¡Achs_sn ¤Î 
;          hd_rd.sector_sn_h:hd_rd.sector_sn_l ¤º®e·|ÀH¤§Åܧó
change_lba      proc    near
        mov     si,offset hd_info.total_sector
        lodsd
        dec     eax
        mov     ecx,eax
        shr     eax,16
        mov     di,offset msg0c+19
        call    ax_to_ascii
        mov     eax,ecx
        call    ax_to_ascii
        invoke  print_string,offset msg0c,input_color,1700h
        invoke  input,8,10h,input_color,dx
        jc      cl0
        cmp     eax,dword ptr hd_info.total_sector
        jae     change_lba
        mov     hd_read_pkt.sector_sn_l,eax

;Âà´« LBA ºÏ°Ï½s¸¹ ( ¦s©ó EDX ) Åܦ¨ CHS °Ñ¼Æ ( ¦s©ó chs_sn )
;¤½¦¡¡GLBA ºÏ°Ï½s¸¹= ( ºÏ¬W * ºÏÀYÁ`¼Æ + ºÏÀY )* ¨C­yºÏ°Ï¼Æ + ºÏ°Ï - 1
        sub     edx,edx
        div     hd_info.sector_p_track
        inc	edx
        mov     chs_sn.sector,edx
        sub     edx,edx
        div     hd_info.head_p_cylinder
        mov     chs_sn.head,edx
        mov     chs_sn.cylinder,eax
        clc
cl0:    ret
change_lba      endp
;-----------------------------------------------------------
;©ó 40:75 ³B¨ú±o¹êÅéµwºÐ¾÷­Ó¼Æ
begin:  mov     bx,40h
        mov     es,bx
        mov     si,75h
        mov     bl,es:[si]
        mov     si,offset msg05 ;­YµL¹êÅéµwºÐ¡A«h¸õ¨ì exit1 ³B
        cmp     bl,0
        jz      exit1

        mov     ax,cs
        mov     es,ax
        mov     n_hd,bl
        mov     ax,600h         ;²M°£¿Ã¹õ
        mov     bh,normal_color
        sub     cx,cx
        mov     dx,184fh
        int     10h

;¦L¥X³nÅé¦W¡B«öÁ仡©ú
        invoke  print_string,offset msg01,software_color,24
        invoke  print_string,offset msg02,normal_color,200h
        invoke  print_string,offset msg06,normal_color,300h

;­pºâµ{¦¡µ²§ô¦ì§}¡A­×§ï§@¬°Åª¨úºÏ°Ï¸ê®Æ«áªº¦s©ñ¦ì§}
        sub     eax,eax
        mov     hd_read_pkt.buffer_offset,900h
        mov     hd_read_pkt.buffer_segment,ds
        mov     hd_read_pkt.sector_sn_l,eax
        mov     hd_read_pkt.sector_sn_h,eax
        cld

;Ū¨ú¹êÅéµwºÐ¸ê®Æ¡A¨Ã¦s©ó hd_info µ²ºcÅé
read0:  mov     dl,harddisk
        mov     ah,48h
        mov     si,offset hd_info
        int     13h
        jnc     read1

exit0:  mov     si,offset msg00
exit1:  invoke  print_string,si,normal_color,1700h
exit2:  mov     ax,4c00h
        int     21h

;¨Ì¾Ú hd_read_pkt ¤ºªº LBA ÅÞ¿èºÏ°Ï½s¸¹¡AŪ¨ú¹êÅéµwºÐ¤W¤@­ÓºÏ°Ïªº¸ê®Æ
read1:  mov     dl,harddisk
        mov     ah,42h
        mov     si,offset hd_read_pkt
        int     13h
        jc      exit0

;¦b¿Ã¹õ¤WÅã¥Ü 256 ­Ó¦ì¤¸²Õªº¸ê®Æ
psd0:   sub     ebx,ebx
psd1:   mov     si,hd_read_pkt.buffer_offset
        call    print_sector_data

;µ¥«Ý¨Ï¥ÎªÌ¿é¤J«öÁä
;ª`·N¡IBX ¤º¤§­È¥²¶·«O¦s¡A¦]¬°µ{¦¡¥H DS:hd_read_pkt.buffer_offset[BX]
;«ü¦VºÏ°Ï¸ê®Æ¦ì§}¡A°£¤F·|§ïÅÜ LBA ÅÞ¿èºÏ°Ï½s¸¹ªº¥\¯à¡A¨Ò¦p§ïÅܺϬW¡BºÏÀYµ¥
;¥²¶·­«·sŪ¨ú¾ã­ÓºÏ°Ï¥~¡A¥i¤£¥²«O¦s BX¡A¨ä¾l¥\¯à¨Ò¦p¤W/¤UÁ䶷«O¦s BX¡C
getkey: call    clear_message   ;²M°£¡y¿é¤J¡K¡z¦r¦ê
        sub     ecx,ecx
        mov     ah,ch
        int     16h
        cmp     ah,01
        je      exit2
        cmp     ah,51h
        je      pagedn
        cmp     ah,49h
        je      pageup
        cmp     ah,20h
        je      d_key
        cmp     ah,32h
        je      m_key
        cmp     ah,2eh
        je      c_key
        cmp     ah,23h
        je      h_key
        cmp     ah,1fh
        je      s_key
        cmp     ah,26h
        je      l_key
        cmp     ah,48h
        je      up_key
        cmp     ah,50h
        jne     getkey

;­Y BX=100H¡Aªí¥Ü­è­è¤wÅã¥Ü 0¡ã0FFH ªº¸ê®Æ¡A¦¹¨è­Y¨Ï¥ÎªÌ«ö¤U¦V¤W/¤UÁä¡Aªí¥Ü
;±NÅã¥Ü 100H¡ã1FFH ªº¸ê®Æ¡A¦Ó BX ¤w«ü¦V 100H¡A¬Gª½±µÅã¥Ü§Y¥i¡C­Y BX=200H¡A
;«hªí¥Ü¤wÅã¥Ü«á 100H ªº¸ê®Æ¡A¦¹®É¨Ï¥ÎªÌ¦A«ö¤U¦V¤W/¤UÁä¡ABX À³±q¹s¶}©lÅã¥Ü
up_key: cmp     bx,100h
        jz      psd1
        jmp     psd0

;«ö¤U PageDown Áä®É¡A¥ýÀˬd chs_sn.sector ¬O§_¤w¨ì¨CºÏÀYªº³Ì«á¤@ºÏ°Ï¡A­Y¤£¬O
;ªº¸Ü±N¨ä¥[¤@´N§¹¦¨¤F¡A­Y¬Oªº¸Ü­n¦Ò¼{ºÏ°Ï¡y¶i¦ì¡z¦¨¤U¤@ºÏÀYµ¥°ÝÃD
pagedn: mov     edx,chs_sn.sector
        cmp     edx,hd_info.sector_p_track
        jb      pgdn3                           ;­Y¤£¬Oªº¸Ü¡A¸õ¨ì pgdn3
        mov     edx,chs_sn.head                 ;­Y¤w¸g¬O³Ì«á¤@ºÏ°Ï®É¡A«h¦AÀË
        mov     eax,hd_info.head_p_cylinder     ;Àˬd chs_sn.head ¬O§_¨ì¨CºÏ
        inc     edx                             ;¬Wªº³Ì«á¤@ºÏÀY
        dec     eax
        cmp     edx,eax
        ja      pgdn2           ;­Y¤w¸g¬O³Ì«á¤@ºÏÀYªº¸Ü¡A¸õ¨ì pgdn2 §_«h
        inc     chs_sn.head     ;chs_sn.head ¼W¤@¡A¥B¥O chs_sn.sector=1
pgdn1:  mov     chs_sn.sector,1
        jmp     short pgdn4
pgdn2:  mov     edx,chs_sn.cylinder
        mov     eax,hd_info.total_cylinder
        inc     edx
        dec     eax             ;Àˬd chs_sn.cylinder ¬O§_
        cmp     edx,eax         ;¤w¨ì³Ì«á¤@ºÏ¬W
        ja      getkey          ;­Y¤w¸g¨ì³Ì«á¤@ºÏ¬W¡A«h¸õ¨ì getkey
        mov     chs_sn.cylinder,edx     ;­Y¤£¬O³Ì«áºÏ¬W¡A«h chs_sn.cylinder
        mov     chs_sn.head,ecx         ;¼W¥[¤@¡Bchs_sn.head Åܬ°¹s¡A¥B¥O
        jmp     pgdn1                   ;chs_sn.sector µ¥©ó 1
pgdn3:  inc     chs_sn.sector
pgdn4:  call    get_lba_sector  ;¨Ì¾Ú·s¿é¤Jªº chs_sn¡A¨D¥X LBA ÅÞ¿è
        jmp     read1           ;ºÏ°Ï½s¸¹¡A¦AŪ¨ú¸ÓÅÞ¿èºÏ°Ï

;«ö¤U PageUp Áä®É¡A¥ýÀˬd chs_sn.sector ¬O§_¬°¤@¡A­Y¤£¬°¤@¡A«h±N¨ä´î¤@´N§¹¦¨¤F
;­Y¬°¤@¡A«h¥²¶·¨ì¤W¤@ºÏÀY¡A­n¦Ò¼{¡y­É¦ì¡zªº°ÝÃD
pageup: cmp     chs_sn.sector,1
        ja      pgup1
        cmp     chs_sn.head,ecx ;­Y¬°¤@¡A«hÄ~ÄòÀˬd chs_sn.head ¬O§_¬°¹s¡A
        ja      pgup2           ;­Y¤£¬°¹s¡A«h¸õ¨ì pgdn2
        cmp     chs_sn.cylinder,ecx     ;­Y¬°¹s¡A«hÀˬd chs_sn.cylinder ¬O§_¬°
        je      getkey                  ;¹s¡A­Y¬°¹s¡Aªí¥Ü¤w¨ì MBR¡A¬G«h¤£°Ê§@
        mov     edx,hd_info.head_p_cylinder
        dec     chs_sn.cylinder ;­Y¤£¬°¹s¡A«h¨Ï chs_sn.cylinder ´î¤@¡B
        dec     edx             ;chs_sn.head Åܬ°³Ì¤jºÏÀY½s¸¹¡Bchs_sn.sector
        mov     chs_sn.head,edx ;Åܬ°³Ì¤jºÏ°Ï½s¸¹
        jmp     short pgup3
pgup1:  dec     chs_sn.sector
        jmp     pgdn4
pgup2:  dec     chs_sn.head
pgup3:  mov     edx,hd_info.sector_p_track
        mov     chs_sn.sector,edx
        jmp     pgdn4

m_key:  mov     chs_sn.cylinder,ecx
        mov     chs_sn.head,ecx
        inc     ecx
        mov     chs_sn.sector,ecx
        jmp     pgdn4

c_key:  call    change_cylinder
c_key1: jc      getkey          ;­Y CY¡Aªí¥Ü¨Ï¥ÎªÌ¨ú®ø¿é¤J
        jmp     pgdn4

h_key:  call    change_head
        jmp     c_key1

s_key:  call    change_sector
        jmp     c_key1

l_key:  call    change_lba
        jmp     c_key1

d_key:  call    change_hd
        jc      getkey
        call    get_lba_sector
        jmp     read0
;-----------------------------------------------------------
code    ends
;***********************************************************
        end     start

³o­Óµ{¦¡ÁöµM¬ù¥|¦Ê¤»¤Q¦æ¡A¦ý¬OÅÞ¿è¤W«D±`²³æ¡A¨S¤°»ò½ÆÂøªººtºâªk¡C¤p¤ì°¸¶È´N´X­Ó­«ÂI»¡©ú¡C

µ{¦¡¬[ºc

°õ¦æ HDSV2 «á¡ACPU ¥Ñµ{¦¡ start: ¼Ð°O¶}©l°õ¦æ¡C­º¥ý·|°µ¥²­nªºÀˬd¡A¨Ò¦p¹êÅéµwºÐ­Ó¼Æ¡AµM«á¦L¥X«öÁ䪺¨Ï¥Î»¡©ú¡A±µ¤U¨ÓŪ¨ú²Ä¹sÁû¹êÅéµwºÐªº MBR ºÏ°Ï¡AÅã¥Ü¦¹ºÏ°Ïªº«e 256 ­Ó¦ì¤¸²Õ©ó¿Ã¹õ¤W¡AµM«á©I¥s INT 16H/AH=00H µ¥«Ý¨Ï¥ÎªÌ¿é¤J«ü¥O¡C

HDSV2.COM ©Ò¯à¥Îªº«ü¥O¤£¦h¡A¤j­P¤À¦¨¤TºØ¡G

  1. ¥u¦³¤@­Ó«ü¥O¡Aµ²§ô HDSV2 µ{¦¡¡C
  2. «ö¦V¤W©Î¦V¤UÁä¡A¤Á´«Åã¥Ü«e©Î«á 256 ­Ó¦ì¤¸²Õªº¸ê®Æ¡CÁöµM HDSV2 ¨C¦¸¥uŪ¨ú¤@­ÓºÏ°Ïªº¸ê®Æ¡A¦ý¬O¤@­ÓºÏ°Ï¦³ 512 ­Ó¦ì¤¸²Õ¡A¤@­Ó¿Ã¹õ®e¯Ç¤£¤U¡A©Ò¥H¨C¦¸¥u¯àÅã¥Ü 256 ­Ó¦ì¤¸²Õªº¸ê®Æ¡C¤p¤ì°¸³]­p¥H¦V¤W/¤UÁä¤Á´«Åã¥Ü«e©Î«á 256 ­Ó¦ì¤¸²Õ¡C¦Ü©ó¤Á´«ªºÃöÁä¬O¦b©I¥s§¹ print_sector_data «á¡ABX ¶Ç¦^ 100H ©Î 200H¡C¨£µ{¦¡µù¸Ñ¡C
  3. §ïÅÜÅã¥Ü¨º¤@­ÓºÏ°Ï¡A¥]§t¤»ºØ¥\¯à¡C·í¨Ï¥ÎªÌ«ö¤U M¡BD¡BPageUp/PageDwon¡BC¡BH¡BS¡A¤À§Oªí¥Üª½±µÅã¥Ü MBR¡BÅܧó¹êÅéµwºÐ¡BÅã¥Ü«e¤@©Î«á¤@­ÓºÏ°Ï¡BÅܧóºÏ¬W¡BºÏÀY¡BºÏ°Ï¡A¥H¤Î§ïÅÜ LBA ºÏ°Ï½s¸¹¡C

©I¥s INT 16H/AH=00H ¨ú±o¨Ï¥ÎªÌ«öÁä¿é¤J«ü¥O«á¡A§PÂ_¨Ï¥ÎªÌ«ö¤F¤°»òÁä¡AµM«á¨Ì¾Ú«öÁä°õ¦æ¨Ï¥ÎªÌªº·N§Ó¸õ¨ì¬Û¹ïªº¥\¯à¥h°õ¦æ¡C

¨ú±o¹êÅéµwºÐ­Ó¼Æ

¦b IBM PC ¤Î¨ä¬Û®e¾÷ºØ¡Aµ´¹ï¦ì§} 0040:0000 ¶}©lªº¤@¶ô¬ù 250 ­Ó¦ì¤¸²Õªº°O¾ÐÅ餤¡A¦s¦³ BIOS ·|¨Ï¥Î¨ìªº¤@¨Ç¸ê®Æ¡A¤@¯ëºÙ¬° BIOS ¸ê®Æ°Ï ( BIOS data area )¡C³o¶ô°Ï°ìªº¸ê®Æ¥]§t RS232 °ð¦ì§}¡BLTP °ð¦ì§}µ¥µ¥¡A¦Ó 0040:0075 ³Bªº¤@­Ó¦ì¤¸²Õ¡Aªí¥Ü¹êÅéµwºÐ­Ó¼Æ¡C

ºÏ°Ï¸ê®Æ¦s©ñ³B

¦b­ì©l½X begin: ¼Ð°O¤§«á¤£»·³B¡A¦³¤@¬õ¦â¤Q¤»¶i¦ì¼Æ­È¡A900H¡A¥¦¬O HDSV2.COM ©ÒŪ¤JªººÏ°Ï¸ê®Æ¦s©ñ³B¡CHDSV2.COM ¨C¦¸¶ÈŪ¨ú¤@­ÓºÏ°Ï¡A¤@­ÓºÏ°Ï¦³ 512 ­Ó¦ì¤¸²Õ¡Aºâ¬O«Ü¤jªº¸ê®Æ¡A¥»¨Ó¤]¥i¥H©ñ¦b¦ì§} 100H ¤§«á»P¨ä¥L¸ê®Æ©ñ¦b¤@°_¡C¦ý³o¼Ëªº¸Ü¡A·|¨Ï°õ¦æÀÉÀþ¶¡¿±µÈ 512 ­Ó¦ì¤¸²Õ¡A¨Ã«D¦nªº°µªk¡C³Ì¦nªº°µªk¬O¦V¨t²Î°t¸m¤@¶ô°O¾ÐÅé¡A¦ý¬O­n¦³¸û¦hªº­I´ºª¾ÃÑ¡C¦¹³B¤p¤ì°¸±Ä¥Î¥t¤@ºØ°µªk¡A§â¥¦©ñ¦bµ{¦¡½X«á­±¡C

²³©Ò©Pª¾¡A*.COM Àɦ³ 64KB ¤j¤p¡A¦Ó HDSV2.COM ¶È¦û 1902 ¦ì¤¸²Õ ( ¤£¨ì 2KB¡A¼K¼K¡A³o«K¬O²Õ¦X»y¨¥ªº¦n³B¤F )¡A©Ò¥H¦b³o¤@°Ï¬q¤¤¡A¨ä¹ê´N¦³³\¦hªÅ¶¡¬O®ö¶O¤F¡C¦]¦¹¤p¤ì°¸§â¥¦©ñ¦bµ{¦¡½X¤§«á¡A¤@¯ë±¡§Î¬O¤£·|³y¦¨°ÝÃD¡C

¦ý¬O¦b¼¶¼gµ{¦¡®É¨Ã¤£ª¾¹Dµ{¦¡¦³¦h¤j¡A­n¦p¦óª¾¹D³]¬° 900H¡H¨ä¹ê³o­Ó°ÝÃD«Ü²³æ¡A¥u­n¦b¼¶¼g®É¥ý¥ô·N°²³]¤@­È¡A«Ý²ÕĶ¦¨¥\¤§«á´Nª¾¹Dµ{¦¡¦³¦h¤j¤F¡C¦ý­nª`·N¡ACOM °õ¦æÀɸü¤J°O¾ÐÅé®É¡A¬O©ñ¦b¥Ñ¦ì§} 100H ¶}©l¡A¦]¦¹ÁÙ±o¥[¤W 100H ¤~¦æ¡A¦]¦¹¬° 1902D¡Ï100H¡×86EH¡AµM«á¤p¤ì°¸¦A¨ú­Ó¾ã¼ÆÅܦ¨ 900H¡C·íµM±z©ñ¦b 64KB ¤ºµ{¦¡½X¤§«áªº¥ô¤@³B¤]¦æ¡A¦ý¤£­n¤Ó«á­±¡A¥H§KÂл\¤F°ïÅ|¡C

chs_sn »P hd_read_pkt µ²ºcÅé

chs_sn µ²ºcÅé¬O©w¸q²{¦b¦b¿Ã¹õ¤W©ÒÅã¥ÜªººÏ¬W¡BºÏÀY¡BºÏ°Ï½s¸¹¡A³o¬O¬°¤F¨Ï¥ÎªÌ«ö¤U PageDown¡BPageUp¡BM Áä®É¯à°÷«Ü¤è«Kªº¸õ¨ì¤W¤@­Ó¡B¤U¤@­Ó¡BMBR ºÏ°Ï¡A©ÎªÌ¨Ï¥ÎªÌ«ö¤U C¡BH¡BS Áä®É¤]¯à«Ü§Öªº­×§ïºÏ¬W¡BºÏÀY¡BºÏ°Ï½s¸¹¡C¨Ò¦p¨Ï¥ÎªÌ«ö¤U PageDown Áä®É¡A¥ýÀˬd¬O§_¤w¸g¬O¨CºÏÀYªº³Ì«á¤@ºÏ°Ï¤F¡A¦pªG¤£¬Oªº¸Ü¥u­n chs_sn.sector ¼W¥[¤@´N¥i¥H¤F¡F¦pªG¤w¸g¬O¨CºÏÀYªº³Ì«á¤@ºÏ°Ïªº¸Ü¡A´N·|¥ÑºÏ°Ï¡y¶i¦ì¡z¤@¨ìºÏÀY½s¸¹¡A¦P®ÉºÏ°Ï½s¸¹Åܦ¨¤@¡A¦P¼Ëªº¡A¤]¸ûÀˬdºÏÀY½s¸¹¬O¤£¬O¤w¸g¬O³Ì¤j¤F¡A¦pªG¬O¡A¨º»ò¤]­n¡y¶i¦ì¡z¨ìºÏ¬W¡C

hd_read_pkt ¬O°t¦X©µ¦ù INT 13H/AH=42H Ū¨úºÏ°Ï¥\¯àªºµ²ºcÅé¡C¦p«e©Ò­z¡A©µ¦ùŪ¨ú©Î¼g¤J¥\¯à¡A¤w¸g¤£¥ÎºÏ¬W¡BºÏÀY¡BºÏ°Ï³o¤T­Ó°Ñ¼Æ©w¦ìºÏ°Ï¤F¡A§ï¥Î LBA ÅÞ¿èºÏ°Ï½s¸¹¡A³o LBA ÅÞ¿èºÏ°Ï½s¸¹´N©ñ¦b hd_read_pkt µ²ºcÅ骺 sector_sn_l ©M sector_sn_h Äæ¦ìùØ¡CLBA ÅÞ¿èºÏ°Ï½s¸¹¦@¦³ 64 ¦ì¤¸¡A¦ý¬O 80386¡ãPentium IV ¥u¦³ 32 ¦ì¤¸¼È¦s¾¹¥i¨Ñ¨Ï¥Î¡A¨ä«ü¥O¶°¤]¥u¯à²¾°Ê 32 ¦ì¤¸ªº¸ê®Æ¡A©Ò¥H¤p¤ì°¸§â¥¦¤À¬°¸û§Cªº 32 ¦ì¤¸¡Asector_sn_l¡A©M¸û°ªªº 32 ¦ì¤¸¡Asector_sn_h¡A¨âÄæ¡C

get_lba_sector °Æµ{¦¡

¦bÅÞ¿è¤W CHS °Ñ¼Æ¥²¶·©Mªí¥Ü LBA ÅÞ¿èºÏ°Ï½s¸¹ªº hd_read_pkt.sector_sn_l¡Bhd_read_pkt.sector_sn_h ¤¬¬Û°t¦X¡A§Úªº·N«ä¬O¥u­n chs_sn ¤ºªº¥ô¦ó¤@Äæ§ïÅܤF¡Asector_sn_l ©M sector_sn_h ¤]­nÀH¤§ÅÜ°Ê¡A³o­Ó°Ê§@¥Ñ©I¥s get_lba_sector °Æµ{¦¡§¹¦¨¡C´«¥y¸Ü»¡¡Aget_lba_sector °Æµ{¦¡ªº¤u§@´N¬O§â chs_sn Âà´«¦¨ LBA ºÏ°Ï½s¸¹¡C

¨Ï¥ÎªÌ«ö¤U PageUp¡BPageDown¡BM¡BC¡BH¡BS µ¥¤»Á䪺«e¤TÁä®É¡AHDSV2.COM ·|¦Û¦æºâ¥X¾A·íºÏ¬W¡BºÏÀY©ÎºÏ°Ï½s¸¹¡F¦Ó¨Ï¥ÎªÌ«ö¤U«á¤TÁä®É¡AHDSV2.COM ·|¥X²{°T®§­n¨D¨Ï¥ÎªÌ¿é¤J¾A·íºÏ¬W¡BºÏÀY©ÎºÏ°Ï½s¸¹¡A¤£½×«e¤TÁä©Î«á¤TÁä¡A§¹¦¨«á HDSV2.COM ³£·|§ïÅÜ chs_sn¡A³o®É·íµM¤]¤@©w­n¨Ï hd_read_pkt ¤ºªº sector_sn_l ©M sector_sn_h «O«ù©M chs_sn ¤@­P¤~¦æ¡A©Ò¥H³o¨Ç¥\¯à³Ì«á³£·|©I¥s get_lba_sector °Æµ{¦¡¡A¤]´N¬O¦b§ïÅܺϬW¥\¯àªº pgdn4: ¼Ð°O³B¡C

·Ó²z¨Ó»¡¡A³o¤»­Ó¥\¯à³£À³¸Ó©I¥s get_lba_sector °Æµ{¦¡¡A¤£¹L§Ú­Ì¦b­ì©l½X¤¤¥u»Ý¼g¤@¦¸§Y¥i¡A¨ä¾l¤­¦¸¥i¥Ñ¸õÅD«ü¥O¡A¸õ¨ì pagn4: ³B°õ¦æ¡A³o¬O¬°¤FÁY¤pµ{¦¡½Xªº½t¬G¡C¤£¶È¦p¦¹¡AHDSV2.COM ÁÙ­n²M°£­n¨D¨Ï¥ÎªÌ¿é¤Jªº°T®§¡A³s³o­Ó¤]¥i¥H¸`¬Ù¤@¨Ç¡C³o«K¬O¥Î²Õ¦X»y¨¥ªº¦n³B¡C

al_to_ascii °Æµ{¦¡

³Ì«á´£¤@´£ al_to_ascii °Æµ{¦¡©Ò¥Îªº§Þ¥©¡Cal_to_ascii °Æµ{¦¡¬O¥Î¨Ó§â AL ¤ºªº¤Q¤»¶i¦ì¼ÆÅܦ¨ ASCII ¦r¤¸¡A¦s©ó DI ©Ò«ü¦ì§}¡C¦]¬°¤Q¤»¶i¦ì¨C¦ì¼Æ¥²¶·¥Î 4 ¦ì¤¸ªí¥Ü¡AAL ¦@¦³ 8 ¦ì¤¸ªø¡A¬G»Ý­n 2 ­Ó¦ì¤¸²Õ¦s©ñ ( ASCII ½X¨C­Ó¦r¤¸¦û¥Î 8 ¦ì¤¸ )¡C¨Ò¦p AL=1B¡ADI=0200 ªº¸Ü¡A°õ¦æ§¹³o­Ó°Æµ{¦¡¡A°O¾ÐÅé ES:0200 ³BÀ³¸Ó·|Åܦ¨

ES:0200  42 31

±z¥i¬d¬d ASCII ªí¡A¤Q¤»¶i¦ìªº 31H ¨â¼Æ­È¥Nªí¡y1¡z³o­Óªü©Ô§B¼Æ¦r¡A42H ¥Nªí­^¤å¦r¥À¡yB¡z¡C¦]¬° AL ¼È¦s¾¹¤¤ 1 ¬O¸û°ªªº¥|¦ì¤¸¡AB ¬O¸û§Cªº¤K¦ì¤¸¡A¬G¶ñ¨ì°O¾ÐÅ餤®É¡A¥Ñ§C¦ì§}¨ì°ª¦ì§}¨Ì¦¸¶ñ¤J¡yB¡z¡B¡y1¡z¡C

³B²z AL ³o 8 ­Ó¦ì¤¸¡A¨C¥|­Ó¦ì¤¸³£¥²¶·°µ¦P¼Ëªº¨Æ¡A´N¬O¥ý¥[¤W 30H¡A¦AÀˬd¬O§_¶W¹L 39H¡A­Y¶W¹Lªí¥Ü¬O­^¤å¦r¥À¡AÁÙ­n¦A¥[¤W 7H¡C³oºØ­«½Æªº¨Æ±¡¡AÀ³¸Ó¼g­Ó°Æµ{¦¡¨Ó°µ¡A¦ý¬O±z¥i¥Hµo²{³o­Ó°Æµ{¦¡´N¬O±q ax2as1: ¼Ð°O¨ì ax2as2: ¼Ð°O³B¡A³ºµM¬Oª½±µ¡y´O¡z¦b al_to_ascii °Æµ{¦¡ùØ¡A³o¼Ë°µ¬O³Q¤¹³\ªº¡A¦]¬°¹ê»Ú¤W¡A°Æµ{¦¡ªº¶i¤JÂI¤]¬O¤@ºØ¼Ð°O¡C³o¼Ë°µ¥i´î¤Ö­ì©l½Xªø«×¡C


¤À³Î°Ï

¬J¤w¦³¤FÆ[¹îºÏ°Ïªº§Q¾¹¡AHDSV2.COM¡A§Ú­Ì´N¨ÓÆ[¹îµwºÐ¤¤¨C­Ó¤À³Î°Ï¤§¶¡ªºÃö«Y¡C­º¥ý¡A§Ú¥ý¤j­P¤¶²Ð¦b FAT16/32 ¤À³Î°Ïùئ³¨º¨Ç­«­nªº³¡¥÷¡A¤U¤@³¹¦A¸Ô²Ó»¡©ú¡C»¡§¹ FAT16/32 ¤À³Î°Ïªº·§²¤³¡¥÷¤§«á¡A¦A¥Î HDSV2.COM Æ[¹î¤p¤ì°¸ªº¤@Áû 80GB µwºÐ¤¤¡A¤À³Î°Ï¤§¶¡¦p¦ó¹º¤À¡C

¤À³Î°Ïªºµ²ºc

¦bµwºÐ¤Wªº FAT16 »P FAT32 ¤À³Î°Ï©M³nºÐµ²ºc¦³Ãþ¦ü¤§³B¡A³£¦³¤@­ÓºÙ¬°±Ò°ÊºÏ°Ïªº¯S®íºÏ°Ï¡A¦ý¤£¦Pªº¦a¤è¬O³nºÐ¤ù¤Wªº±Ò°ÊºÏ°Ï¥²©w¦bÅÞ¿è½s¸¹²Ä¹sºÏ°Ï¡A¦ÓµwºÐ¤Wªº±Ò°ÊºÏ°Ï«o¤£¬O¦b²Ä¹s¸¹ LBA ÅÞ¿èºÏ°Ï¡C

«e­±´£¹L¡AµwºÐªº²Ä¹s¸¹ LBA ÅÞ¿èºÏ°Ï¬O MBR¡A¨º»òµwºÐ¤Wªº±Ò°ÊºÏ°Ï¦b¨ºùØ©O¡H³o­Ó°ÝÃDÀ³¸Ó³o¼Ë¦^µª¡A µwºÐ¤W¥i¥H¦³¼Æ­Ó¤À³Î°Ï¡A°²¦p¬O FAT16 ©Î FAT32 ¤À³Î°Ïªº¸Ü¡A¨C­Ó¤À³Î°Ï¨Ì§Ç¥i¤À¬°¥|³¡¥÷¡G«O¯dºÏ°Ï¡BFAT¡B®Ú¥Ø¿ý¥H¤Î¸ê®ÆºÏ°Ï¥|³¡¥÷¡A¦Ó±Ò°ÊºÏ°Ï¥²©w¦b«O¯dºÏ°Ïªº²Ä¤@­ÓºÏ°Ï¡C²Ä¤@­Ó¥D­n¤À³Î¤§«e¡A¤@¯ë·|«O¯d­Y¤zºÏ°Ï¡A³o¨ÇºÏ°Ï´N¬O²Ä¹sºÏ¬W¤Wªº²Ä¹s­±©Ò¦³ºÏ°Ï¡A³o¨ÇºÏ°Ïªº²Ä¤@­ÓºÏ°Ï´N¬O MBR¡A¨ä¥L³Q«O¯dªººÏ°Ï¤@¯ë¬Oµ¹±Ò°ÊºÞ²zµ{¦¡©Î¬O§@¬°¯S®í¥Î³~ ( ¯f¬r¤]±`§Q¥Î³o¶ô°Ï°ì¬°«D§@¤ï )¡C³o¨ÇºÏ°Ï¤@¯ë¨Ï¥Î DOS ¤¤Â_ªA°Èµ{¦¡¬OµLªk¨£¨ìªº¡A¬GºÙ¬°ÁôÂÃºÏ°Ï ( ¦ý¬O¥Î BIOS ªº INT 13H ¥i¥H¦s¨ú)¡C

¦bÁôÂúϰϤ§«á¡A´N¬O²Ä¤@­Ó¥D­n¤À³Î¤F¡A¦Ó²Ä¤@­Ó¥D­n¤À³Î°Ïªº²Ä¤@­ÓºÏ°Ï´N¬O±Ò°ÊºÏ°Ï¤F¡A©Ò¥H°²¦pª¾¹DÁôÂúϰϼƴN§ä±oµÛ²Ä¤@­Ó¥D­n¤À³Îªº±Ò°ÊºÏ°Ï¡C¨º»ò«ç»òª¾¹DÁôÂ꺺ϰϦ³¦h¤Ö©O¡H­ì¨Ó¦b¤À³Îªíªº¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡z³B ( °Ñ¦Ò«e­±ªº»¡©ú )¡A·|°O¸üµÛ¸Ó¤À³Î°Ïªº±Ò°ÊºÏ°Ï¶ZÂ÷ MBR ¦³¦h¤Ö­ÓºÏ°Ï¡A³o¨ÇºÏ°Ïªº¼Æ¥Ø´N¬OÁôÂúϰϪº¼Æ¥Ø¡C

¦P¼Ëªº¡A²Ä¤G­Ó¥D­n¤À³Î»P²Ä¤T­Ó¥D­n¤À³Îªº±Ò°ÊºÏ°Ï¡A¤]¬O¦b¸Ó¤À³Îªº³Ì«e­±ºÏ°Ï¡C©Ò¥H¥u­n§ä¨ì¤À³Îªíªº¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡z´N¯à§ä¨ì²Ä¤G¡B¤T­Ó¥D­n ¤À³Îªº±Ò°ÊºÏ°Ï¡C¥H¥t¤@­ÓÆ[ÂI¨Ó¬Ý¡A°²¦p¥Î DOS ¤¤Â_ªA°Èµ{¦¡Åª¨ú²Ä¤G­Ó¥D­n¤À³ÎºÏ°Ï®É ( ¨Ò¦p¥Î INT 25H ©Î AX=7305H/INT 21H )¡A¥²©wµLªk«ü©wÅÞ¿èºÏ°Ï¦Ó¯àŪ¨ì²Ä¤@­Ó¤À³Î°ÏªºÅÞ¿èºÏ°Ï¡A©Ò¥H¹ï²Ä¤G­Ó¤À³Î¨Ó»¡¡A²Ä¤@­Ó¤À³Îªº©Ò¦³ºÏ°Ï³£¬OÁôÂ꺺ϰϡC¦P²z¡A¹ï²Ä¤T­Ó¤À³Î¨Ó»¡¡A²Ä¤@­Ó¤À³Î»P²Ä¤G­Ó¤À³Îªº©Ò¦³ºÏ°Ï¤]³£¬OÁôÂ꺺ϰϡC

¤@­Ó FAT16 ©Î FAT32 ¤À³Îªº²Ä¤@­ÓºÏ°Ï¬O±Ò°ÊºÏ°Ï¡A¦pªG¬O FAT16 ¤À³Îªº¸Ü¡Aºò±µµÛ±Ò°ÊºÏ°Ï¤§«á¬O¨â­Ó FAT¡A¦pªG¬O FAT32 ¤À³Îªº¸Ü¡A¦b¨â­Ó FAT ¤§«eÁÙ¦³­Y¤z±Ò°Ê³Æ¥÷µ¥ºÏ°Ï¡Aºò±µµÛªº¤~¬O FAT¡C±µµÛ FAT ªº¬O®Ú¥Ø¿ý¡A®Ú¥Ø¿ý¤§«á´N¬O¸ê®ÆºÏ°Ï¤F¡Cºî¦X¥H¤Wªº»¡©ú¡A¤p¤ì°¸ªþ¤W©³¤Uªº¹Ï¤ù¡A»¡©ú¤@­ÓµwºÐ¸g¹L¤À³Î«áªº¤À¥¬±¡§Î¡C°²³]³o­ÓµwºÐ³Q¤À¦¨¨â­Ó¥D­n¤À³Î»P¤@­ÓÂX¥R¤À³Î¡A¦ÓÂX¥R¤À³Î¦AÄ~Äò¤À¦¨¨â­ÓÅÞ¿èµwºÐ¡A¦Ó³o¨ÇÅÞ¿èµwºÐ³£³Q®æ¦¡¤Æ¦¨ FAT16 ©Î¬O FAT32 Àɮ׮榡¡A¨º»ò¨C­Ó¤À³Î°Ï»PÅÞ¿èµwºÐ¤ºªºµ²ºcÀ³¸Ó¦p¤U¹Ï¤À¥¬¡G

µwºÐ¦U¤À³Îªº¤À¥¬¹Ï

¨Ì·Ó¤W¹Ï¡AÂX¥R¤À³Î¤ºªº²Ä¤@­ÓºÏ°Ï¤º§tÂX¥R¤À³Îªí¡AÂX¥R¤À³Îªí¤º¦³«ü¦V¤U¤@­ÓÂX¥R¤À³Îªí¤ÎÅÞ¿èµwºÐªº¸ê®Æ¡A¦Ó¨C­ÓÂX¥R¤À³Îªí¤§«á»PÅÞ¿èµwºÐ¤§«e¡A¤]¦³¼Æ­ÓÁôÂúϰϡC³oºØ±¡§Î¡A¸ò²Ä¤@­Ó¥D­n¤À³Î¬Û¦P¡C©Î³\§Ú­Ì¥i¥H³o¼Ë¬Ý¡A¨C­ÓÅÞ¿èµwºÐ´N¹³¨ãÅé¦Ó·Lªº¹êÅéµwºÐ¡A©Ò¥H¤À³Îªí ( §ó¥¿½Tªº»¡¬OÂX¥R¤À³Îªí ) ©M±Ò°ÊºÏ°Ï¤§¶¡¦³ÁôÂúϰϡC

Æ[¹î

©³¤U¬O¤p¤ì°¸¥Î HDSV2.COM Æ[¹î¤@Áû Western Digital 80GB ( «¬¸¹ WD800BB ) ªºµwºÐ¡A³oÁûµwºÐ¦³¤T­Ó¥D­n¤À³Î¤Î¤@­ÓÂX¥R¤À³Î¡A³o¤T­Ó¥D­n¤À³Î¤À§O¬O¦w¸Ë DOS 6.20¡BWin 98 SE ¤Î Win XP¡AÀɮרt²Î¤À§O¬O FAT16¡BFAT32¡BNTFS¡CÂX¥R¤À³Î¦A²Ó¤À¦¨¨â­Ó 16GB ªº FAT32¡B¤@­Ó 20GB ªº NTFS¡B2 ­Ó¦w¸Ë Mandrake Linux ªº Ext2 ¤Î¤@­Ó Linux SWAP¡AÁ`¦@ 5 ­ÓÅÞ¿èµwºÐ¡C­º¥ýÆ[¹î³o­ÓµwºÐªº MBR¡A¦b MBR ªº¦ì§} 1BEH¡ã1FDH¡A³o 64 ­Ó¦ì¤¸²Õ´N¬O¤À³Îªí ( µµ½u®Ø°_ªº°Ï°ì )¡G

HDSV °õ¦æµe­±
¹Ï¤@

ª`·N¨ì¦ì§} 1C6H ¶}©lªºÂù¦r²Õ¬O 3FH ( ¥Õ®Ø®Ø°_¤§³B )¡A¦¹Äæ¦ì¬O¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡z¡A´Nªí¥Ü²Ä¤@­Ó¤À³Î¤§«eªº 3FH ­ÓºÏ°Ï¬OÁôÂ꺡A¦¹®É±z­Y§ïÅÜ LBA ÅÞ¿èºÏ°Ï¨ì 3FH ( «ö¤U¡yL¡zÁä¡A¦A¿é¤J¡y3F¡z¤Î Enter Áä )¡A¦p¤U¹Ï¤G¡A±z´N¯à°÷¬Ý¨ì²Ä¤@­Ó¤À³Îªº±Ò°ÊºÏ°Ï¤F¡Aª`·N¨ì¹Ï¤¤ªº¡yLBA ºÏ°Ï¡z¤w¸gÅܦ¨ 3FH ¤F¡C¤U¹Ï¤G´N¬O²Ä¤@­Ó¤À³Îªº±Ò°ÊºÏ°Ï¡A¤]´N¬O DOS 6.20 ªº±Ò°ÊºÏ°Ï¡G

²Ä¤@­Ó¤À³Îªº±Ò°ÊºÏ°Ï
¹Ï¤G

¦pªG·Q§ä²Ä¤G¥D­n¤À³Î°Ïªº±Ò°ÊºÏ°Ï¡A¥i¥ý¨ì¤À³Îªíªº²Ä¤GÄ檺¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡z¡A½Ð°Ñ¦Ò¹Ï¤@¤¤¤À³Îªíªº²Ä¤G­Ó¤À³Îªº¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡zªºÂù¦r²Õ¬° 1F6080H ( §Y¥Õ®Ø¤§¤UªºÂù¦r²Õ )¡A´Nªí¥Ü³o­ÓµwºÐªº²Ä¤G­Ó¥D­n¤À³Î¦b²Ä 1F6080H ­Ó½s¸¹ªºÅÞ¿èºÏ°Ï¡A§ïÅÜ HDSV ¤¤ªº¡yLBA ºÏ°Ï¡z¬°²Ä 1F6080H ­ÓÅÞ¿èºÏ°Ï´N¥i¥H§ä¨ì Win 98 SE ªº±Ò°ÊºÏ°Ï¡A¦p¤U¹Ï¤T¡G

²Ä¤G­Ó¥D­n¤À³Î
¹Ï¤T

¦Ü©óÂX¥R¤À³Î°Ï¤º¥i¥H¦³¼Æ­ÓÅÞ¿è¤À³Î¡A¦Ó³o¨ÇÅÞ¿è¤À³Î¦U¦Û¥Nªí¤@­ÓÅÞ¿èµwºÐ¡A­nÆ[¹îÂX¥R¤À³Î±o¥ý§ä¨ìÂX¥R¤À³Î°_©lºÏ°Ï¡A½Ð¬Ý¹Ï¤@ªº¤À³Îªí³Ì«á¤@Äæ¡A±z´N·|µo²{ÂX¥R¤À³Î¶}©lªºÅÞ¿èºÏ°Ï¬O 1966DFAH ( ²LÂŮخذ_¤§³B )¡A§ïÅÜ¡yLBA ºÏ°Ï¡z¨ì³o­ÓÅÞ¿èºÏ°Ï¡A¨Ã«ö¦V¤UÁäÆ[¹î«á 256 ­Ó¦ì¤¸²Õ¡A¦p¤U¹Ï¥|¡G

²Ä¤@­ÓÂX¥R¤À³Îªí
¹Ï¥|

ªGµM¦p«e³¹©Ò­z¡AÂX¥R¤À³Îªí¥u¦û¨â­ÓÄæ¦ì¡A²Ä¤@­Ó¬O¦b¦¹¤À³ÎªºÅÞ¿èµwºÐ©Ò¦b¦ì¸m¡A¦¹¦ì¸m¬O¬Û¹ï©óÂX¥R¤À³Î¶}©l¤§³B ( ¤Î¬õ®Ø®Ø°_¤§³B )¡A©Ò¥H²Ä¤@­ÓÅÞ¿èµwºÐ¶}©l©ó¦¹ÂX¥R¤À³Îªí¤§«áªº 3FH ºÏ°Ï³B¡A©Ò¥H³o­ÓÅÞ¿èµwºÐªº±Ò°ÊºÏ°Ï¬O¦b LBA ²Ä 1966DFAH¡Ï3FH ­ÓÅÞ¿èºÏ°Ï¤§³B¡A¥ç§Y²Ä 1966E39H¡A§ïÅÜ¡yLBA ºÏ°Ï¡z¨ì³o­ÓÅÞ¿èºÏ°Ï´N¥i¥HÆ[¹î¨ì³o­ÓÅÞ¿èµwºÐªº±Ò°ÊºÏ°Ï¡G

²Ä¤@­ÓÅÞ¿èµwºÐ
¹Ï¤­

¦pªG­n§ä²Ä¤G­ÓÅÞ¿è¤À³Î¡A´N¥²¶·¦^¨ì²Ä¤@­ÓÂX¥R¤À³Îªíªº²Ä¤GÄ檺¡y¤À³Î°Ï¬Û¹ï¦ì¸m¡z¡A¥ç§Y¹Ï¥|¤¤ÂŮخذ_¤§³B¡C´«¥y¸Ü»¡¡A²Ä¤G­ÓÅÞ¿è¤À³Î¶}©l©ó²Ä¤@­ÓÂX¥R¤À³Îªí¤§«áªº 1F1DD2FH ¤§³B¡A©Ò¥H²Ä¤G­ÓÅÞ¿è¤À³Î¶}©l©ó 1966DFAH¡Ï1F1DD2FH¡A¤]´N¬O 3884B29H¡AÆ[¹î³o­Ó LBA ÅÞ¿èºÏ°Ïªº«á 256 ­Ó¦ì¤¸²Õ ( «ö¦V¤UÁä )¡G

²Ä¤G­ÓÂX¥R¤À³Îªí
¹Ï¤»

´N¥i¥H§ä¨ì²Ä¤G­ÓÅÞ¿èµwºÐªº±Ò°ÊºÏ°Ï¬O¦b 3884B68H ( §Y 3884B29H¡Ï3FH¡A3FH ¬°¦Ç¦â®Ø®Ø®Ø°_¤§³B )¡A¨ä¾lÅÞ¿è¤À³Î¥i·Ó¦¹¨BÆJ­«½Æ¡A´N¤£¦A´y­z¤F¡C


µ²½×

¦³¤F HDSV2.COM «á¡A±z¥i¥HÆ[¹î±z¦Û­Ó¨àªºµwºÐ¨ì©³ÂäF¨º¨ÇªF¦è¡A¦Ñ¹ê§i¶D§A¡A§ÚÁÙµo²{µwºÐùØÂæïǫ¯ªº¦a¤èÁÙ¯u¤£¤Ö¡C


¦^¨ì­º­¶¡A ¨ì²Ä¤T¤Q¤@³¹¡A¨ì²Ä¤T¤Q¤T³¹