簡體   English   中英

如何在組裝中使用28位PIO從磁盤正確讀取多個扇區?

[英]How do I properly read multiple sectors from a disk using 28-bit PIO in assembly?

如何在組裝中使用28位PIO從磁盤正確讀取多個扇區?

這是我的加載扇區子例程:

load32:
    jmp load32_skipvars:
    load32_source dd 0
    load32_return dd 0
load32_skipvars:
    mov dword [load32_source], esi
    mov dword [load32_return], ebx
    mov ebx, ecx
    mov al, byte [load32_source + 3]
    or al, 0xe0
    mov dx, 0x1f6
    out dx, al
    mov dx, 0x1f1
    mov al, 0x00
    out dx, al
    mov dx, 0x1f2
    mov al, cl
    out dx, al
    mov al, byte [load32_source]
    mov dx, 0x1f3
    out dx, al
    mov al, byte [load32_source + 1]
    mov dx, 0x1f4
    out dx, al
    mov al, byte [load32_source + 2]
    mov dx, 0x1f5
    out dx, al
    mov dx, 0x1f7
    mov al, 0x20
    out dx, al
waitforit:
    in      al, dx
    test    al, 0x08
    jz      waitforit
    mov     ecx, 0x00000100
    mov     edx, 0x000001f0
    rep     insw
    dec     ebx
    cmp     ebx, 0
    jg      waitforit
    jmp     [load32_return]

可以這樣稱呼:

    mov esi, dword [kernel_cluster_loc]
    mov edi, dword [kernel_put]
    xor ecx, ecx
    mov cl, [bpb_sectors_per_cluster]
    mov ebx, morekernel
    jmp load32
morekernel:

這將按原樣加載多個扇區,但是,它們之間有多個“ FFFFFFFF”扇區,將其分為幾部分,因此不連續。

這是加載后內存的樣子:

Offset(h) 00       04       08       0C

00100000  BDFFFFEF 00BCFFFF EF00E852 010000EB  ½ÿÿï.¼ÿÿï.èR...ë
00100010  FE5589E5 905DC355 89E583EC 088B5508  þU‰å.]ÃU‰åƒì.‹U.
00100020  8B450C66 8955FC88 45F80FB7 55FC0FB6  ‹E.f‰UüˆEø.·Uü.¶
00100030  45F8EE90 C9C35589 E583EC10 C745F800  Eøî.ÉÃU‰åƒì.ÇEø.
00100040  000000C7 45FC0000 0000EB08 8345F801  ...ÇEü....ë.ƒEø.
00100050  8345FC01 8B55088B 45FC01D0 0FB60084  ƒEü.‹U.‹Eü.Ð.¶.„
00100060  C075E98B 45F8C9C3 5589E56A 0F68D403  Àué‹EøÉÃU‰åj.hÔ.
00100070  0000E8A0 FFFFFF83 C4088B45 080FB6C0  ..è ÿÿÿƒÄ.‹E..¶À
00100080  5068D503 0000E88C FFFFFF83 C4086A0E  PhÕ...èŒÿÿÿƒÄ.j.
00100090  68D40300 00E87DFF FFFF83C4 088B4508  hÔ...è}ÿÿÿƒÄ.‹E.
001000A0  C1E8080F B6C05068 D5030000 E866FFFF  Áè..¶ÀPhÕ...èfÿÿ
001000B0  FF83C408 90C9C355 89E583EC 10C745FC  ÿƒÄ..ÉÃU‰åƒì.ÇEü
001000C0  00800B00 C745F800 000000EB 1D8B55F8  .€..ÇEø....ë.‹Uø
001000D0  8B45FC01 D0C60020 8B45F88D 50018B45  ‹Eü.ÐÆ. ‹Eø.P.‹E
001000E0  FC01D0C6 00078345 F802817D F89F0F00  ü.ÐÆ..ƒEø..}øŸ..
001000F0  007EDA90 C9C35589 E583EC10 C745FC00  .~Ú.ÉÃU‰åƒì.ÇEü.
00100100  800B00FF 7508E82B FFFFFF83 C404C1E0  €..ÿu.è+ÿÿÿƒÄ.Áà
00100110  0201450C C745F400 000000C7 45F80000  ..E.ÇEô....ÇEø..
00100120  0000EB2B 8B55F48B 45FC01C2 8B4DF88B  ..ë+‹Uô‹Eü.‹Mø‹
00100130  450801C8 0FB60088 028B45F4 8D50018B  E..È.¶.ˆ.‹Eô.P.‹
00100140  45FC01D0 C6000783 45F80183 45F4028B  Eü.ÐÆ..ƒEø.ƒEô.‹
00100150  55F88B45 0801D00F B60084C0 75C690C9  Uø‹E..Ð.¶.„ÀuÆ.É
00100160  C35589E5 83EC1865 A1140000 008945F4  ÃU‰åƒì.e¡....‰Eô
00100170  31C0C745 EC000000 00C745F0 C0011000  1ÀÇEì....ÇEðÀ...
00100180  E832FFFF FF8B45EC 50E8DAFE FFFF83C4  è2ÿÿÿ‹EìPèÚþÿÿƒÄ
00100190  048D45EC 50FF75F0 E859FFFF FF83C408  ..EìPÿuðèYÿÿÿƒÄ.
001001A0  8B45EC50 E8BFFEFF FF83C404 908B45F4  ‹EìPè¿þÿÿƒÄ..‹Eô
001001B0  65330514 00000074 05E853FE FFFFC9C3  e3.....t.èSþÿÿÉÃ
001001C0  54686973 20697320 796F206B 65726E65  This is yo kerne
001001D0  6C206D65 6E672100 14000000 00000000  l meng!.........
001001E0  017A5200 017C0801 1B0C0404 88010000  .zR..|......ˆ...
001001F0  1C000000 1C000000 19FEFFFF 06000000  .........þÿÿ....
00100200  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100210  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100220  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100230  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100240  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100250  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100260  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100270  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100280  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100290  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001002F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100300  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100310  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100320  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100330  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100340  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100350  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100360  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100370  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100380  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100390  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001003F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100400  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100410  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100420  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100430  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100440  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100450  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100460  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100470  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100480  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100490  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001004F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100500  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100510  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100520  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100530  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100540  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100550  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100560  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100570  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100580  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100590  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001005F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100600  00410E08 8502420D 0542C50C 04040000  .A..….B..BÅ.....
00100610  1C000000 3C000000 FFFDFFFF 1F000000  ....<...ÿýÿÿ....
00100620  00410E08 8502420D 055BC50C 04040000  .A..….B..[Å.....
00100630  1C000000 5C000000 FEFDFFFF 32000000  ....\...þýÿÿ2...
00100640  00410E08 8502420D 056EC50C 04040000  .A..….B..nÅ.....
00100650  1C000000 7C000000 10FEFFFF 4F000000  ....|....þÿÿO...
00100660  00410E08 8502420D 05024BC5 0C040400  .A..….B...KÅ....
00100670  1C000000 9C000000 3FFEFFFF 3F000000  ....œ...?þÿÿ?...
00100680  00410E08 8502420D 057BC50C 04040000  .A..….B..{Å.....
00100690  1C000000 BC000000 5EFEFFFF 6B000000  ....¼...^þÿÿk...
001006A0  00410E08 8502420D 050267C5 0C040400  .A..….B...gÅ....
001006B0  1C000000 DC000000 A9FEFFFF 5F000000  ....Ü...©þÿÿ_...
001006C0  00410E08 8502420D 05025BC5 0C040400  .A..….B...[Å....
001006D0  00000000 00000000 00000000 00000000  ................
001006E0  00000000 00000000 00000000 00000000  ................
001006F0  00000000 00000000 00000000 00000000  ................
00100700  00000000 00000000 00000000 00000000  ................
00100710  00000000 00000000 00000000 00000000  ................
00100720  00000000 00000000 00000000 00000000  ................
00100730  00000000 00000000 00000000 00000000  ................
00100740  00000000 00000000 00000000 00000000  ................
00100750  00000000 00000000 00000000 00000000  ................
00100760  00000000 00000000 00000000 00000000  ................
00100770  00000000 00000000 00000000 00000000  ................
00100780  00000000 00000000 00000000 00000000  ................
00100790  00000000 00000000 00000000 00000000  ................
001007A0  00000000 00000000 00000000 00000000  ................
001007B0  00000000 00000000 00000000 00000000  ................
001007C0  00000000 00000000 00000000 00000000  ................
001007D0  00000000 00000000 00000000 00000000  ................
001007E0  00000000 00000000 00000000 00000000  ................
001007F0  00000000 00000000 00000000 00000000  ................
00100800  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100810  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100820  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100830  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100840  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100850  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100860  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100870  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100880  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100890  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001008F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100900  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100910  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100920  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100930  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100940  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100950  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100960  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100970  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100980  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100990  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009A0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009B0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009C0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009D0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009E0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
001009F0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100A00  10000600 0000FC01 10000A00 00005400  ......ü.......T.
00100A10  00000B00 00001000 00001100 0000C003  ..............À.
00100A20  10001200 00003000 00001300 00000800  ......0.........
00100A30  00001600 00000000 0000FAFF FF6F0100  ..........úÿÿo..
00100A40  00000000 00000000 00000000 00000000  ................
00100A50  00000000 00000000 00000000 00000000  ................
00100A60  00000000 00000000 00000000 00000000  ................
00100A70  00000000 00000000 00000000 00000000  ................
00100A80  00000000 00000000 00000000 00000000  ................
00100A90  00000000 00000000 00000000 00000000  ................
00100AA0  00000000 00000000 00000000 00000000  ................
00100AB0  00000000 00000000 00000000 00000000  ................
00100AC0  00000000 00000000 00000000 00000000  ................
00100AD0  00000000 00000000 00000000 00000000  ................
00100AE0  00000000 00000000 00000000 00000000  ................
00100AF0  00000000 00000000 00000000 00000000  ................
00100B00  00000000 00000000 00000000 00000000  ................
00100B10  00000000 00000000 00000000 00000000  ................
00100B20  00000000 00000000 00000000 00000000  ................
00100B30  00000000 00000000 00000000 00000000  ................
00100B40  00000000 00000000 00000000 00000000  ................
00100B50  00000000 00000000 00000000 00000000  ................
00100B60  00000000 00000000 00000000 00000000  ................
00100B70  00000000 00000000 00000000 00000000  ................
00100B80  00000000 00000000 00000000 00000000  ................
00100B90  00000000 00000000 00000000 00000000  ................
00100BA0  00000000 00000000 00000000 00000000  ................
00100BB0  00000000 00000000 00000000 00000000  ................
00100BC0  00000000 00000000 00000000 00000000  ................
00100BD0  00000000 00000000 00000000 00000000  ................
00100BE0  00000000 00000000 00000000 00000000  ................
00100BF0  00000000 00000000 0000FFFF FFFFFFFF  ..........ÿÿÿÿÿÿ
00100C00  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C10  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C20  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C30  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C40  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C50  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C60  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C70  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C80  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100C90  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CA0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CB0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CC0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CD0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CE0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100CF0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D00  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D10  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D20  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D30  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D40  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D50  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D60  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D70  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D80  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100D90  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DA0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DB0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DC0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DD0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DE0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100DF0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E00  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E10  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E20  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E30  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E40  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E50  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E60  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E70  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E80  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100E90  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100EA0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100EB0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100EC0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100ED0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100EE0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100EF0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F00  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F10  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F20  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F30  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F40  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F50  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F60  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F70  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F80  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100F90  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FA0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FB0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FC0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FD0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FE0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
00100FF0  FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF  ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

不是“ FF”的三個部分是整個文件,我只是想不出如何正確加載它。 我認為這與部門之間所需的等待有關,但是在每個部門waitforit之后我又回去了,我在做什么錯呢?

您忘了在循環結束時將dx恢復到1f7h (ATA控制器狀態寄存器 )。

恢復dx失敗將對數據寄存器上的第3位( DRQ )進行測試。
由於電氣方面的原因,未維修的IO讀操作返回的數據已設置了所有位,因此測試始終通過,將您引導至有問題的讀操作。

奇怪的是,只有在讀取了一定數量的扇區(512字節)之后,控制器才返回正確的數據-可能是由於某些內部計數器/鎖存邏輯所致。


這有點題外話,但如果可以的話,讓我再給您一個建議。

穩健性

  1. 始終檢查控制器是否准備好接受新命令( 狀態寄存器的位7, BSY )。
  2. 經常檢查,如果最后一個命令成功(位0,ERR, 狀態寄存器 )與錯誤寄存器一起。
  3. 檢查所選的控制器和通道是否已連接並准備好設備( 狀態寄存器的位6, DRDY
  4. 建立調用約定,特別是應保留哪些寄存器,或遵循現有的寄存器(如果要使用,例如C)。

可讀性

  1. 使用堆棧保存您的局部變量,而不是全局變量。
  2. 除非有特殊原因,否則使用呼叫/返回不會跳轉。
  3. 不要在執行流程中放置變量,如果沒有數據段,請將其放在函數之間。

適用於舊AT控制器或PCI連接的ATA控制器的“編程參考”是ATA / ATAPI 6規范 ,該規范基本上是SATA引入之前的最新規范之一。
它還描述了ATAPI(例如高級磁盤管理,CD-ROM讀取器)接口以及所有可能的已定義命令。
令人驚訝的是,閱讀起來很舒服,只是警告您不會找到IO端口地址而是偏移量(編碼為斷言/未斷言的引腳,但這只是端口地址低位的二進制模式)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM