! ᫨  㣮ࠧ ᫥ 㣮ࠬ ,
- ! ᯥਬ 뢠 , १砩 
  ४ ஢ ᯥࢠ  ᮡ...


	       HARD ...

        , ⠪ , ࠧ㬥 ⠪ 訥  
        PCI IDE Bus Master, ᥢ UDMA,  饭 32- ०.



    쪨 ᫮ ᪠  INT 13h 訩  ᢥ  20 
  16- ,       騥   ஦
ꥬ ᪮ ,    ᤥ  ன १.
砫쭮    ࠭祭  1024 ⨬ 樫
த    528 ᪮ . 뢮稢 諮
ࠧࠡ稪 䥩,  ࠧத LBA ࠭樥 .
  ⨦,   28-⭠  ᥪ஢, 
㦭묨 ⠪   , , .  ⥯ 
 Hard ᪠.  INT 13h 筮 ⠢訩 ⠭⮬ BIOS
ॡ  ᥪ,   樫  ⢥ ।
ࠬ஢, ᥬ  ண  ⮩  襫  ⮫쪮 ,
  ࠪ,         室.
LBA ࠭  ८ ࠭祭 INT 13h  1024 樫 㪢쭮
뢠 樫    楫 㬥襭 ⢠  
 㢥祭 ⢠ ᫥.  襭 뫮  訬,
⠪  뫮 ६   ࠧ 8.4G   LBA 
௠묨,  ᪨ ⥬ ६ ॢ  ⪨ .
⢥ ATA ⠭  ᮢ 136.9G   . 
⮣      ⢮,   ⢥,   砥
।  LBA/CHS    㢮쬥  .
ࠡ稪 ⭮ १ࢨ஢ 2  - ।, 
ॡ ⠭  饬 - 㢥稢   ⢮ ன
( ᥩ   ). ⢥ 襭 㦥 祢 - .
   INT 13h  ᪮쪮  㭪権, , 
ࠡ  ᪠  8.4G. ࠢ 맮 ,   , ࣠
쭮 檨,   ⮪   ⮬.

  ⠫ 32-묨.  ,   ﬠ ࠡ 
⨢   4G.  16-⭮ ० ᪠ ⮫쪮 64 - 
⮫쪮  ४祭 ᥣ⮢,    1. INT 13h ,   
 BIOS, 16-,  ࠡ   । ࢮ   
 ,     ,  ਬ, ⭨.  ,   
।   ࢮ  ॡ , 祬 ᮢ襭
ࠢ, ।  - . 32-⭮ ୠ⨢ INT 13h  BIOS,
 ᥣ譨  .   ⥬,  ० PIO  PCI IDE Bus Master
 ,    㦭 㪠뢠 32-.   ᯮ짮
ண DMA ஫,     ࠧ⨨  ஢ PC AT  ᮬ 
16 ࠧத ⮦  ᯮᮡ   ⢨  ⥪, ᪮॥ ᥣ
  ᮢ⨬. 筮, ᫨  ࠡ⠥   ᮢ६
32-⭮ ,      ࠣ.   ᭠ 業묨
32-묨 ࠩࠬ.    ⮨⢠,    
⪨,  ⭮  樨 ᮢ  
  襭 ⮫쪮  . ஡   ᯨᠭ
  "⥫ ஭ 筮 "   
 ࠭窥 :

http://users.caucasus.net/dosextender

   ᫨  諨  뢮,   襩  室 筠 ।,
 ⠥ ࠡ ⮫쪮   Dos Extender-,  - ⢨
᪮ ࠩ஢ 饣 祭, 㦤 ᯮ짮 INT 13h  ᥬ
 ⪠.  ᭮,   砥,  ᪨ Dos Extender,
    㯮⮩ ࠭窥,    室 ⥪
  ⫠稪.  ⮬ ,   饭 ࠭筮 ८ࠧ, ஥
१ ᫮ ࠩ  DMA ० ( 頩, ᫨  
᭮  Dos Extender  1993.  Tran'a.  ⢮ ⭮
㯮,  ⮣, ਢ  ਣ  ਠ). 祬, ᢮
㪠 몠, ⠪  Dos Extender 롨ࠩ    ࠢ.

   ࠧ  । - 㦥  ࠩ .
-,  砬 ᪮ ᪮ 権 ࠧ筠,  
⠢   ⮫    ६, ⠪ 祣 த த.
-, 䠩 ⥬  ࠡ⠥ ⮫쪮 १ INT 13h   ,
 ᮡ⢥ ࠩ஬,  ࠡ  䠩 ⥬ -
।⢥  ᪮  ஢ 䨧᪮ 㯠  ᥪࠬ,  
 ॡ ᮧ ᮡ⢥ ࠧ  - ࠧ
饩 䠩 ⥬,    ਬ⨢ ஢, 
㤮⢮饬 㦤 .

   ।,  諨  뢮,   ⢨⥫쭮 㦤 
ࠩ.   ? 騥 ⮪  :

   PIO - ணࠬ஢ ,   ,  ᫨  Dos Extender
ᯮ ࠭筮 ८ࠧ,   㢠 .
, ᪮   16M/s   ᢥ,   
६       -    ⠪ ⮢.

   PCI IDE Bus Master - ணࠬ ᫮,   
 ६ ᪮ 権,   - 襥. ᫨ ஫ 
ᠬ Hard  ন ० UDMA33, 66  100   ᪮ 
  ᮮ⢥. ࠢ   ⥭ ( 
  ।)    ⪨  WBINVD, ..
 묨 ந室 ।⢥  ,    ᮢ
 ᮤন   ⭮  ( ࢮ ஢ ᥣ ⠪, ஬
486 ஢). 楤  筮      ⨭
⮫쪮  砥 । 筮  ꥬ .
᫨   㣮ࠧ ࠡ  ० ࠭筮 ८ࠧ -
 -  ஢   .      
 䨧᪨, 祬, ⮣ 襣     㤥 -
   ࠭筮 ८ࠧ ࣨ.

   ।,   ਢ⥫ ⥭ Bus Master ⮪  
Hard  ন UDMA, ⥬   100, 66  33   祬 16.
⠥ ,     ६ ᪮ 権  -
. Int 13h ⮣ ਭ樯쭮  .  쭮 
୮ ६,  ண ⠢ ⮥ .
ࠩ    㤥 ᮬ , ⮬   
⠭.   ᫮,  ࠫ쭮 ࠡ⮩, , 
- 㦭!  ਬ   ᪠  ⥪  ᪥,
 ᯮ짮 ࠫ쭮 ࠡ १ ⠪:
⥭  ᪠    ᫥騩   ,  10 - 15%  
祬  ⥭  ᪠,  类 ᪠, .. 먣  
ࠫ쭮 ࠡ  ⠢   業.     ⮣!!!
᮫  ⥫ ⠪:
 ᪠஢ ᪠ 10G 﫮  15   ० UDMA33,
襢  AMD K6-2/350, 稯 VIA MVP3, 128M .
। ᪮ । 13M/s.  ࠢ, ⠬  DiskEditor
 ⥪  ਬ୮ ,  । 1G !!!
( 襥 ௥  墠⨫). , ६⢮    ᪮,
  ⮬,   室 ⥪, ⥪ ᪠  ᤥ ⠢ 
 ᪮ 㣮 ᫮.

    殮  ࠫ쭮 ࠡ - ᨭ஭ ᮢ.
ࠫ ᪮쪮 ᪮ 権, ਬ  稨  Hard ᪮,
 ४,  稥    ஫,  .
  ࡨࠦ PCI 設  "" ᪮ (᪫祭  ⠢
쭮 筠  ९   ᪠ 祭  
஫   祭  㣮.  ⮬ 砥 롮ઠ  
(  設) ᪠  ண ந ⥭, 
ந ६  ।祩  ( ।饣 ⥭)
 뢠 .  䠧 - । ⠭  㤥
ந ६  믮  ᪮ 樨 .
,     㦭  ⮢ .
  ᯮ ஬,  ஫  ।⢥
 ).
    ⢫ ࠫ쭮 ࠡ ᪮॥ ᥣ ॡ
ᮧ 让 ࠢ饩 ன, ᢮ࠧ "㯥ࢨ"
  㤥 ।    ᪮ ஫,
᫥  ।  襭,   㦥 室  ࠬ ࠩ.
᪮ 樨 ਤ ⠢  ஫ ⠩   ᠭ
 訡  ᡮ  (뢠     ).

   ࠫ쭠 ࠡ  㦭, ᯥ䨪樨 稭  ATA-4
 㬥  ६   ⮢   ।
ᯮ    প । (Queue). ᫥ 
 ⠢   ⮣  ࠡ⠥ ।.  ணࠬ஢
  ᯮ짮  ᫮   ந⥫ ।竨
 襭 䥪⨢  , ..  ⥭ᨢ 饭
  楯窠 ᥪ஢, ᫥騥  稭 ⠢
࠭,   㯫    (-, 㬥⠫쭮
⢥ত ⮬   ,  ६  権  
 ᫨).  饬,   ᯮ  (WD 10G), 
  ন.

   ,  ᭥ ᫮⮣ PCI IDE Bus Master.  祬  ?
     ࢮ筨 - ⠭ SFF-8038i.
PCI 設 ஬  ᢮ 易⥩, ⠫ 32-⭮ ୠ⨢
஫ DMA,  ᮧ  16-ࠧ來 ISA 設  ⮬
室  ।     64   । 1 
㯭 ࠭ PC XT.   286 PC AT  ਫ 
16   㢥祭 設   24 ࠧ冷,  樨 ⠫ ०.
 Bus Master  ன PCI  ࠧ  믮  । 
 32-ࠧ來 ᭮ ࠭⢥   . 樨 ࠧ
।  ਭ樯  ࠭祭,   , ।塞 ஫஬
ன⢠, ।.  IDE ஫, ࠧ । ⠫  ਭ樯
  64 ,   ।  ⠢ 512M  ⥫쭮
⥫⢠, ஫  ᤥ  .  ⥪ ஫
⭮  ᢮ ୮ ⯥⮪, ᫮⮥ ࠭筮 ८ࠧ.
 饬,  ஥஢   - ᪨ ࠧ ᥪ  ᪠ 
 ࠣ⠬ . த ,  窨 ७ 筮  ७
쭮 ᪮,  ᫨ 室   FAT (ࠪ᪨   
䠩 ࠭  ᯫ ᪮,  ᪨   ࠬ) 
祭 SWAP-䠩 (.㠫쭠 ),   ⠭  ᢮ .
⠥  ⠪.   ᮧ ᯥ樠쭠 ⠡  ਯ஢
(Physical Region Descriptor  PRD).  ਯ  2 ᫮
(DWORD) ,    砫  ॣ ।,  ன
稪 ⮢. 稪 ⮢   ॢ 64. 訩 ࠧ ⠡
⮦   ॢ 64, .. ਯ஢     8, 
  ᨬ ࠧ  樨 512M. ਧ ᫥ ਯ
⠡  1  襬 (31-)  稪 ⮢.   ࠭祭.
,  ⮣   ஢    4-  ࠭,  
  ᥪ 64 ࠭ 䨧᪮ . ࠪ᪮ ᯮ짮
  ⠡  ᨬ  ਯ஢.   ⮬,  
஫   । 512M,  ᠬ ᪨  ࠭祭 
樨 - ᨬ 256 ᥪ஢,   128K,    । 筮
 ਯ஢. ஫ ணࠬ १  ॣ,
  , ﭨ  ⥫  ⠡ ਯ஢.
 ࢮ  ண ஫஢ ࠧ,    ࠡ
ᨬ,     ६.   ॣ஢ 
쭮 嫮⭮. 室 뢠 㭪樨 䨣樨 PCI ன 
BIOS32 Directory Service.    ।,  ணࠬ 
⮣    ᤥ  祭  ࠩ. ᪮  
  筮 । ࠧ  , ᫥⢨  ணࠬ
 ᥡ  ࠣ       ⠭.

।,     E000h.

 । ⠪:

E000h -  .  BYTE.
	  3 - ࠢ ।.  ⥭ ᪠ - 1,   - 0.
	  0 -    1 뢠  樨 ।.
		 ᫥ 襭 樨  室 .
	 ⠫   ᯮ      0.

E002h -  ﭨ.  BYTE.
	  7 - ଠ樮. 0   뢠,   ஫
		 ᯮᮡ ࠡ ६.
	  6 -  뢠,   Slave ࢮ ஫
		 ᯮᮡ ࠡ  DMA ०.  ,
		   ᥬ, ணࠬ 樠樨.    .
		    ᪮ ন DMA     .
		 (   ন ,  , ०
		 Multiword DMA Mode 0    ࠧ Mode 1,
		 Mode 2, UDMA33, UDMA66).     浪.
	  5 -  ,   6,   ᪠ Master ࢮ ஫.
	  2 - Interrupt. 뢠,   ⠢ ᨣ 뢠.
		  ᨣ ,   ਣ⮢  , 
		  ᫥ , ஫ ⠢, 㦥 ᢮ 뢠
		 . 뢠  ᪠  ࠧ 
		  ⮫쪮  PIO ०. ᫥ 믮 樨
		  室 㫨 ᠢ   1 (  0 )
	  1 - Error. ,   ⠪ -  ⭮.  ⪨ ⮣
		  室    1,   2.
	  0 - Bus Master active.  ⮦ ᥭ.  ᠬ,  ⮫쪮
		  ⮢    ॣ. 뢠
		 ⮦ ᠬ,  ⮫쪮 襭  ।   ⠡
		  襭 ⮢ . ᫨    ࠡ 
		 뢠,  ஢  ,  ࠫ쭠
		 ࠡ  ⮬ 砥 ᪫砥. 祭 ࠭ .
		 뢠 饥  樨 ந室 ᪮쪮
		 , 祬 뢠     ६ প
		 ய樮쭮  । .
	 ⠫   ᯮ      0.

E004h -  ⥫  ⠡ ਯ஢ (PRDT).  DWORD.
	 訥    ᮤঠ 0.

 ண ஫  筮:

E008h -  .
E00Ah -  ﭨ.
E00Ch -  ⥫  ⠡ ਯ஢ (PRDT).

     , ᪮쪮 ᫮   ७ 
⠪ ஫.  䠪᪨   ᯥ樠஢ ,
  믮 ⮩   ( ⮫ ⠡  ਯ஢)
 筮 ⮣ 筮 ⮬.

     﫨 ᬠਢ ணࠬ 祭 ॣ஢,   
 , ᯮ  㭪樨 ॣ஢ ᠬ IDE ஫, 
ࠢ ।⢥ ᪮,   ६  IDE Bus Master ⮫쪮 ।祩
.  ॣ, ⠪  ࠧ   㯯 -  ᢮ ஫.
 1F0h - 1F7h  ࢮ ஫, 170h - 177h  ண.
 ᪠,  㭪樨 IDE ஫ ᯨᠭ  ATA ⠭, 
 ⢮ UDMA ० 室 짮   ᨥ
ATA-4,    ATA-5.  ⠭⠬  ࠧ  ࠭窥:

www.halyava.ru/document/ind_hard.htm

७  ⠭⮢ ATAPI   砥   ।⠢ 
ਬ  ன⢠  ⠭⭮  ॣ஢ IDE ஫
 墠⠥   ७ ATA Packed Interface, ਬ,  CD-ROM.

1F0h -	R/W. . ᯮ ⮫쪮  PIO ०.  WORD.

1F1h -	RO. Error.  砥 訡 権, ᮤন ⨯ 訡. BYTE.
1F1h -	WO. Features register. । ⥫ ࠬ
	 .  BYTE.

1F2h -	RW. 稪 ᥪ஢.  㫥 祭 ॣ,
	।  ᨬ - 256 ᥪ஢.  BYTE.

1F3h -	RW.  ᥪ. 㫥 祭 ॣ 饭.
	   1. ⨬ 1 - 256.  BYTE.
1F4h -	RW. . 訩 .

1F5h -	RW. . 訩 . ᥣ 樫஢ ⨬ 0 - 65535.

1F6h -	RW. ன⢮/.  BYTE.
	0 - 3     0 - 15.
	4  -  ன⢮ Master/Slave - 0/1.
	6  - LBA ࠭.  CHS   0.
	7  5  -  ᯮ    1.

1F7h -	RO. Status register.  BYTE.
	7  - Busy .. . 祭   ( ⠪ ᯮ짮
	 ⢥ ).    1, ன⢮ 믮
	        . ᥬ, ⠫
	 ⮣ ॣ   ६ ⮢.
	6  - Device Ready. ᥣ ⮢.
	5  - Device Fault. ﬠ ⨢ ।饭 .
	᫨   ,  쭥訥 ⢨   ᫥騬:
	Device ࠢ    騪,   . ࢮ
	।⥫쭥 (,  १  ).
	4  - Device Seek Complete. ᯮ ⮫쪮  .
	3  - Data Request. ᪨  ᨣ  뢠, ..
	ன⢮ ⮢  । .  PIO ०  ࠧ
	 ,   IDE Bus Master  ஫,    ᫥ ।
	⠢ 뢠 .
	2  - Corrected Data. 頥,  ⠭  ࣫
	ࠢ  訡,  ⮢.   ⢮ 
	 襭 , ..  ࠢ 
	᮫,   筮 䥪⨢.  ⠪ ᨣ஢
	 ਡ   5 ,  ᥬ ⥪騬
	᫥⢨ﬨ. ࠢ S.M.A.R.T   .
	1  - Index. ⠢ (ਬ, 墮  祫 
	墮 ﭠ).
	0  - Error.  訡  ᬮ   ॣ.

! ⥭ ⮣ ॣ,  ६ ᨣ ⢥ত
뢠,  室   襭 ࠡ⪨ ⮣
뢠.  ⮣, ⮡   室 樨,  ॣ
㡫   3F7h.  .. Alternate Status register.
 ⥭  ந  ந  ६, ⢥ত
뢠   뢠.

1F7h -	WO. Command register.  BYTE.
	  饬- ⮢ ய,
	 ᥩ  ।⠢ ᫥騥:
	C8h - Read DMA with retries
	CAh - Write DMA with retries

⨥ with retries  without retries ⭮  ᡮ , 
ࠧ㬥 稥  ⢨  ⮪ ᯥ譮 
.  ਬ୮ ⠪ ,    Corrected Data.
筮 ᯮ  with retries, ⥬   

	C9h - Read DMA without retries
	CBh - Write DMA without retries

  ,  ⠭ ATA-4 㦥 ᪫祭  ஭.

   ⠪,  ᫥⥫쭮 ⢨ 믮, ਬ, 樨
⥭.  ० Bus Master,  ⢫  ࠧ ன⢠,
ᮡ⢥ IDE ஫ ࠢ騩 ⢨ﬨ Hard ᪠,  IDE Bus Master
஫, 騩 ।祩 .

1. ஢ ᥢ ॣ ﭨ  । ⮣,  
 뫮 ᢮  믮  樨.  IDE ஫
஢ 㦭  ୠ⨢ ॣ ﭨ 3F7h/(377h),
⮡  뤠 ᨣ ⢥ত 뢠  砭 ।饩
樨.

2. 樠 ॣ IDE ஫ 騥 樫//ᥪ
 ⢮ ᥪ஢ ।祭  ।. ⥬,  ࠧ  뤠
  ,  ਢ   砫 樨,  c প 400ns
  Busy.

3. 室 ⮢  ࠡ IDE Bus Master.   
⮢  PRDT.       ॣ஬ CR0,
 㤥 ॥ 祬  WBINVD.  ⠡   ॣ
⥫  ⠡ ਯ஢ E004h/(E00Ch),    
㤠 ⭮  樠樨 ࠩ.

4. ⠭  ࠢ  ॣ  E000h/(E008h)
 ६  ⮢ ,  稭  ।.
     Active.

ந室  ᫥騬 ࠧ:
Hard  稢 , 樮   㦭 樫,
 ⥬ ᯨ뢠   ७ . 稢  ⨬,  ⠢
IDE Bus Master ஫, 뢠, ,    ⮢.
稢 ⠪ ᨣ, IDE Bus Master ஫ 稭  ।.
 騩   ᭥,  ந室 ,   Active १
஥ ६ 뢠,   ᢨ⥫⢮  砭
।,  뢠  ⠢  প, ய樮쭮
 । .  ࠡ ࠩ, -,  ࠧ筮,
 ⭮,  ᫥⥫쭮 ⭮.
ࠡ稪 뢠  믮 ᪮쪮 ⢥ত 뢠 
  .

⢥ ࠩ ⮨   ⥩.
1. 樠 ᥣ  .
2. ணࠬ ࠡ  ᪮  䨧᪮ ஢.
3. ணࠬ ࠡ  ᪮ ஢,  । ࠭ ࠧ.

,  浪.

⥩ 樠 ।, ⮫쪮 墠 뢠 14  15,
 ஢ ⮢ ன.   Bus Master ஫ 
⢮ ᥪ஢  ᪥ ।   ⠭, 
稭 ﭭ  ⭮ 設. ᫥⢨ ⠫ ஡
쭮 ணࠬ,    ணࠬ ⮬᪮
।  祭 (᫨ ࠡ ⮫쪮  ⭮ 設,
 ,    ⠭⠬).  :

CommandIdeBusMast	dw ?	;See PCI Configuration space
StatusIdeBusMast	dw ?	;CommandIdeBusMast + 2
PRDTIdeBusMast		dw ?	;CommandIdeBusMast + 4
CommandIdeBusMast1	dw ?	;CommandIdeBusMast + 8
StatusIdeBusMast1	dw ?	;CommandIdeBusMast + 10
PRDTIdeBusMast1		dw ?	;CommandIdeBusMast + 12


CapasityDrive0		dd ?	;Words 60-61 of IDENTIFY DEVICE
CapasityDrive1		dd ?	;0 - if device not present
CapasityDrive2		dd ?	;Set in InitDrvIDE
CapasityDrive3		dd ?

 Bus Master । १ BIOS32 Directory Service,  ⮤
ᠭ  SFF-8038i. ᠭ BIOS32  ⮫쪮  PostScript  
 ⮫쪮 ᯥ,  ⮫쪮  ਭ  প ⮣ ଠ.
 ⠭  뫮 ஬  ᢮ ࠭窥 .. ᮡ
  halyav' 嫮⭮,     ࠩ - 譨 200K 娢.

஡ 맮  㭪権   㤥, ⢥ 
⥫쭮 㯮,  ᮡ 쭨 맮 
㭪権.  ॡ 㧪  DS ਯ 饣 
  0  4G.   Dos Extender' ⠪ ਯ 18h.
ᥬ 맮 (१ ) 室 ஢  ES, ࠢ
⥪饬 ਯ 10h.

    樠樨.  । ᪮?
ਬ ॠ쭨 । ࠭ 13M/s 뢠 UDMA33
뢠 ७   㢠⥫⢥  ४⭮
⠭ ᪮. 筮  । ࠭ 㦭 모
 ६  樮஢ ,   ᪮
  㯫 뢠 ஫,  祣 稭
ᮡ⢥  । ,  뢠  -
 祬  ᮡ⢥ 稢, 뢠  祭
ᥣ  17M/s (     ᫮⮥ 16.6),  
ࠢ ࠧ  33.  祬 ⠬ , ᭨ 㤭⥫쭮
-   ᢥ饩  .   ୠ 
ந⥫쭮 .,  UDMA33  13M/s ⢥ত.
 ࡨࠦ PCI 設 "ꥤ" ᥡ ᮪,  ᨭ஭
 PC100  ⭠  ᪮ PCI 33M/s.  ᥩ .
     ᪮, ਬ ਭ㤨⥫쭮 .
樠쭮   .
 ஭ IDE ஫,  SET FEATURES.
 ஭ 稯, ⠭ ᮮ⢥  PCI IDE ஫,
  ॡ ᠭ ⠭ 稯.
   ᪠ - "஡!  砥!"  UDMA  SETUP
⮦ , ࠢ  ᯮ    稯.
࠭ ন  13,   㣨 祭  த  .
  易  ⥬,   ᪮  UDMA33 , ..
  DMA Mode 2  16.6 M/s ࠡ⠥  㣨 ᨣ 
IDE 設 ( ० UDMA,  ࠢ ᨣ  , 
᢮ 祭).   室  UDMA66  33  ࠡ⠥?
, ᫨    UDMA,   PCI IDE Bus Master
(樠  ஢),    ᯮ짮  ࠩ,
  㯮⮬ DMA Mode 2.

 ஢ 稥 ᪮  ⥬   , 筥
⢮ ᥪ஢.  ࠪ᪨ ,  祣 ࠭ ᯮ짮
CMOS. ࠭   ⨯ Hard ᪮,    ஡ ࠬ
  , , ,  ࠧ  8.4G 﫨 
 ⠢  ᨬ쭮 ४ 祭 ( ॢ 1024 樫).
⢥ 騬 ࠬ஬ ⠭ 饥 ⢮ ᥪ஢.
   ᪥ யᠭ  ⠡ ࠬ஢,    
 IDENTIFY DEVICE. ⠥ ⮫쪮  PIO ०.
 ᫮ 60-61 (筮)  室 ᪮ ⢮ ᥪ஢.
 ᫨  CMOS 㪠   NONE,    ࠢ 㤥 ४⭮
।. 뭥 CMOS ࠩ  㪠. Windows' 9, , ⠪  㯠.

  ࠩ, ।,   ࠢ  ४⭮ ࠡ⠥.
ࠤ樮 ࠩ,  樠樨,   ᨣ ⮢ 
ன⢠,       .  ࠩ,
 ⮬ 砥,  ⠥ ன⢮ 騬.

- ⮣,  ⮢  Dos Extender'     
। 祭 _code32a, ॡ ஫  ࠭楩 PRDT.
 砥 祭 64,  ᬥ饭 祭 PRDT.

PRDT		dd 21 dup (0)	;4 PRDT + 4 Shift if cross 64K + 13 Push buff
AddrPRDT	dd ?		;LOGICAL Address PRDT
PRDT1		dd 21 dup (0)	;4 PRDT + 4 Shift if cross 64K + 13 Push buff
AddrPRDT1	dd ?		;LOGICAL Address PRDT1

13 DWORD १ࢨ  "ய娢" 祭  䨧 
᪢  稯 (    蠥 १ CR0).
   客,  ᠭ  ॣ஢ 
 稯      㤠.

 ࠡ  뢠 室 ।ᬠਢ 砩 
 - 稭 뢠  ந室 (ਬ  ணࠬ
㯮ॡ  CLI,  STI 뫨). 室  
ᠭ, - ஫஢  .
筮  ⮣ ᯮ ⥬ ⠩,  墠뢠  
뢠  뫮 ,   ᪠ ਢ窠  ⠩ 
 , ⮡  ஬  ꥤ ( ⮣ 㦨 맮
ணࠬ _setmask8259,  ன 1   AX 頥 ᮮ⢥饥
뢠).  ⮩ 楫  ࠭ ᪮쪮   ਪ
ணࠬ஢ Time Stamp Counter.  64- ॣ 騩 ⠪
,  ᯮ㥬 筮  業 䥪⨢ ࠣ⮢
ணࠬ.  ᮧ ᨬ ⠩  ⠪⮢  ,
  稥 ᠬ ⠩,  㤥  1   1 ᥪ㭤, 㦥
  ,   ࠡ뢠 ⮫쪮   .
롨 ஫  TSC   ⠩   .
ਬ  㯮⮩ 設,  31 TSC  ⠩  7 ᥪ㭤.
  31   ਠ ࠩ ᯮ짮 ,
   ॣ EDX,  ஫ ⮫쪮 EAX.
⢮ ६  ஫  TSC ,
 TSC . ࠢ ३  ⥬ ⠩  ⮫  㤭,
 室  ⮬     ( 稬, 㯮
   CLI ⥬ ⠩ ࠡ   ﭨ, 
  뢠,  TSC . , ⮬  
 , 짮⥫ 饭  CLI).
 饬,   ਬ ࠩ ⠪  ⠫ TSC.

 ,  ⠩ 筮 横   Active
ॣ ﭨ Bus Master ஫,  祣  ,
  뢠 ⠭   㦭. , ᨥ  ⠪.
ﭭ  (Polling)  / ⮫쪮 㦠 設, 
᪮ ।   3 - 4 ࠧ.

  ,   맮.  ࠬ ।   .
। ਠ 宦  Int 13h, ࠢ  ⢥ ᮡ.
稪 ᥪ஢   ,  뫥饣  । ᪠, ࠧ
..   맮   ⢥ 饭.  㯮,
 ஫ 稪 ᥣ  8-ࠧ來.

!!!  ⮩ ணࠬ  ᯮ  WBINVD ⪨ .
  ᫥  樥 ⥭  ᪠  । 樨 .
       㦭.
ਬ ९ 䠩     㣮,  ஢ ᪮.
  ⠪  䨧᪮ ,    ண, ⠪ 祬
஬ ६ .

;------------------------------------------------------------------------------
; IDEBusMast  -  Physical Read and Write.
;------------------------------------------------------------------------------
;Input: LBA ONLY !!!
;EAX =	Bits 31, 29  - reserved for future use, must be 0,
;	Bit  28, 30  - unused, must be 0,
;	Bits 27 - 0  - LBA Address,
;BH  = 0 Read, BH = 2 Write, (No change! Other value damaged driver),
;BL  = Drive (80h - Master 0, 81h - Slave 0, 82h - Master 1, 83h - Slave 1.),
;ECX = Sector Count, may be more than 256,
;EDI = Physical Memory Address for transfer data.
;
;Output: CF=0 Successfull, in EDI input value, other input registers cleared,
;	 CF=1 Error, in AL errorcode, input registers undefined.
;Software detect errors:
;AL = 1		Timeout over (No Interrupt),
;AL = 2		Invalid Drive number in BL,
;AL = 3		LBA Address + Sector Count too big for this drive,
;AL = 4		No drive,
;AL = 5		Invalid Op. code in BH.
;AL = 6		EDI Odd. (must be aligned 2)
;Hardware errors:
;AL = 10h	Device not Ready,
;AL = 11h	Device Busy,
;AL = 12h	Not cleared DRQ (previous operate no complete),
;AL = 13h	Device Fault,
;AL = 14h	Abort command,
;AL = 15h	Uncorrectable Read Error,
;AL = 16h	UDMA CRC Error,
;AL = 17h	Sector Address out of range,
;AL = 18h	No Media (for removable),
;AL = 19h	Media Change (for removable),
;AL = 1Ah	Media Change Request (for removable),
;AL = 1Bh	Write Protect (for removable),
;Bus Master errors:
;AL = 20h	IDE Bus Master Active (previous Bus Master operate no complete),
;AL = 21h	Error IDE Bus Master,
;
;AL = 40h	Unrecognized Error.
;------------------------------------------------------------------------------

 ணࠬ  㯮묨  ⠭⠬, ⠭묨
楤ன 樠樨.

 ࠡ ਪ ணࠬ אַ  䨧᪮ 㯥  
   㣠 ଠ, ᭮. 訡  ஡  ⥬.
᭥ ࠡ  뤥   ࠧ.  㦨 ࠧ
 ਬ  ਡ "⮫쪮 ⥭",   訡筠 
  ᫥⢨.   ࠧ ⭮⥫쭠,  0  
砫.  ࠤ Dos ࠧ  "᪨ ᪮"  
ᢠ 㪢.  ᮧ " Dos" ࠧ  
DiskEditor'.   Partition Table 砫   祭
஢  .., ⥬ ⬥砥 ࠧ    Calculate Partition
  ᥪ஢ ( ᫥  Partition). , ࠡ稬 
  ⮫쪮   ᫥ .     ᨤ ⮢
LBA  ࠧ (।᫥)  ᫮ ᥪ஢  ࠧ (᫥).
 ᥡ, Partition Table    ஢,  ࠬ
ࠧ    ணࠬ   ⥫.
ਬ ᮧ ⥫   ࠧ .

Partitions	dd	4	;!!! How many partitions on all drives.

;Partition descriptor for drive 'C'

PartitionLetter	db 	 'C'	;!!! Caps only. Compared with BL in ReadWrite.
PartitionDrive	db 	 80h	;!!! 80h-Master0, 81h-Slave0, 82h-Ma.1, 83h-Sl.1
PartitionAttrib	db 	 02h	;!!! 0 - Read/Write, 2 - Read Only,
PartitionType	db 	 06h	;??? Type partition in Master Boot Record (MBR)
PartitionStart	dd	 3Fh	;!!! Start LBA address of partition
PartitionSize	dd   0FB000h	;!!!
PartitionEnd	dd   0FB040h	;!!! PartitionStart + PartitionSize + 1

;Partition descriptor for drive 'D'

		db 	 'D'	;!!! PartitionLetter
		db 	 80h	;!!! PartitionDrive
		db 	 02h	;!!! PartitionAttrib
		db 	 05h	;??? PartitionType
		dd   0FB040h	;!!! PartitionStart
		dd  01F9F40h	;!!! PartitionSize
		dd  02F4F41h	;!!! PartitionStart + PartitionSize + 1

;Partition descriptor for drive 'E'

		db 	 'E'	;!!! PartitionLetter
		db 	 80h	;!!! PartitionDrive
		db 	 0	;!!! PartitionAttrib
		db 	 47h	;??? PartitionType (type 47h possible free)
		dd  0308946h	;!!! PartitionStart
		dd  07E3E42h	;!!! PartitionSize
		dd  0AEC789h	;!!! PartitionStart + PartitionSize + 1

;Partition descriptor for drive 'F'

		db 	 'F'	;!!! PartitionLetter
		db 	 80h	;!!! PartitionDrive
		db 	 0	;!!! PartitionAttrib
		db 	 47h	;??? PartitionType
		dd  0AEC789h	;!!! PartitionStart
		dd  08311A6h	;!!! PartitionSize
		dd 0131D930h	;!!! PartitionStart + PartitionSize + 1

   ࠧ DOS,    饭.
 ᫥ ࠧ ࠡ稥.
 ᮧ ࠣ ணࠬ 樠樨,  㤥 ᠬ ७
  Partition Table   ⥫,     㦤 
⮬  . ⢮ ࠬ PartitionType ᮮ⢥騩
 䠩 ⥬  Partition Table १ࢨ஢
 砩 த ࠧ ⮩ ணࠬ  ᮧ  
ᮡ⢥ 䠩 ⥬ (ᯨ᮪ ஢   ᮮ⢨ ⨯ FS
ਫ  ⠭⠬).     
筠 V2_OS ⠭  ,     ⥫쭮.
㪢 ᢠ ࠧ    稭  'C'  
䠪᪨ 浪묨 ࠬ,  ᪫砥 ந쭮 祭
, ࠧ ( ࠦ  訡 83h). ᪨ 맮 ⠪:

;------------------------------------------------------------------------------
; ReadWrite  -  Logical Read and Write (in partitions).
;==============================================================================
;Input: LBA ONLY !!!
;EAX =	Bits 31 - 28 - unused
;	Bits 27 - 0  - Start Sector Address
;	(address in EAX calculate relative selected partition
;	EAX = 0  - begin of partition),
;BH  = 0 Read, BH = 2 Write,
;BL  = Letter of Partition ('C' - First, 'D' - Second, 'E' - Third, etc.),
;ECX = Sector Count, may be more than 256,
;EDI = Physical Memory Address for transfer data (if you like logical - change)
;
;Output: CF=0 Successfull, in EDI input value, other input registers cleared,
;	 CF=1 Error, in AL errorcode, input registers undefined.
;Errorcode 1 - 40h see IDEBusMast.
;ReadWrite errors:
;AL = 80h Address + Sector Count too big for this partition.
;AL = 81h Invalid Letter in BL.
;AL = 82h No Partition with this Letter.
;AL = 83h No equal letters in BL and Partition descriptor.
;AL = 84h Write to Write Protected Partition.
;------------------------------------------------------------------------------
  ணࠬ WBINVD 祭.

ਬ ࠩ  뢠饩   ணࠬ   
Extended  ⥬,    砫 ᪠ 'C' ਢ  䠩 TSC.ASM.
Dos Extender      START32.OBJ. ᫨ 㦭
 室 -  ᪮ ࠭窨 㪠  砫 ⮣ ⥪,
⠬  ReadMe  Dos Extender'  ⫠稪.
ணࠬ 뢠 ᫥ 樠樨 ⫠稪,   蠣
᫥  ࠡ. ࠢ 蠣 ᫥ ᮡ⢥ 
।  㦭 祭 , ⮡  뫥  ⠩.
 ⪫祭 ⫠ 모  ᥬ୮ ⥪ INT 1.
⢥ ࠩ  뤥  ⤥ obj,    
 "⥫" Dos Extender'.  樨   ᯮ짮 TASM.
 ᮦ  ⠪   㤠 ஢ Dos Extender  NASM,
   ४⭮  EXTERNAL . ⪠  
  ᮧ⥫ 稫  .  ஢
  ࠭窥 NASM (祬  ଠ樨 祭  ७,
   ⢥,  ⨣  )

 ᫥. ணࠬ  "⠭"   訡   
 ᫥ 室  ஦ (. 砫 ⮣ ⥪). 祬
      䨧᪮ ஢   
㤠 㤠 ᫥.   砥   ⥬ ᪮쪮 Hard
᪮    ஢﫠.

᫨  䠩묨 ⥬,   ࠬ ᥢ ,
 ४   , 祬 稭  ᪮ 
  "樮 ⥬"  .. 蠪  .. ⥣, 㯭
  HTML, ⠪  LaTex ଠ  ⠭窥:

http://www.cnit.nsu.ru/~fat/osbook.html

(  ᠫ  ⨯ " ⮬᪮
஢ tex -> html").

			    


᫨ ணࠬ ।⠢   뢠  - :

kolesnitsky@caucasus.net

 ⫨稥  NASM   ⮫쪮     ᢮ ࠭窥,
      .

᭨檨 .                                    ५/ 2000.