📄 diskmain.cod
字号:
00018 |$M33514|
ENDP ; |?SetDriveHead@CDisk@@QAAXE@Z|, CDisk::SetDriveHead
EXPORT |?WriteCommand@CDisk@@QAAXE@Z| ; CDisk::WriteCommand
00000 AREA |.text| { |?WriteCommand@CDisk@@QAAXE@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?WriteCommand@CDisk@@QAAXE@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?WriteCommand@CDisk@@QAAXE@Z| } ; comdat associative
|$T33532| DCD |$L33531|
DCD 0x40001401
; Function compile flags: /Ogsy
00000 AREA |.text| { |?WriteCommand@CDisk@@QAAXE@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?WriteCommand@CDisk@@QAAXE@Z| PROC ; CDisk::WriteCommand
; 442 : inline void WriteCommand(BYTE bCommand) {
00000 |$L33531|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M33529|
; 443 : int i ;
; 444 : //RETAILMSG(1,(TEXT("WriteCommand -----\r\n")));
; 445 : ATA_WRITE_BYTE( (volatile PBYTE)m_pATAReg + m_dwCommandStatusOffset, bCommand);
00004 e59f5040 ldr r5, [pc, #0x40]
00008 e1a00005 mov r0, r5
0000c eb000000 bl WRITE_PORT_UCHAR
; 446 :
; 447 : for(i=0; i<10; i++)
00010 e3a04000 mov r4, #0
00014 |$L32516|
; 448 : {
; 449 : //msWait(200);
; 450 :
; 451 : msWait(10);
00014 e3a0000a mov r0, #0xA
00018 eb000000 bl msWait
; 452 :
; 453 : //RETAILMSG(1,(TEXT("msWait---------\r\n")));
; 454 :
; 455 : if(!IdeIsBusy())
0001c e1d530b0 ldrh r3, [r5]
00020 e3130080 tst r3, #0x80
00024 0a000002 beq |$L33524|
00028 e2844001 add r4, r4, #1
0002c e354000a cmp r4, #0xA
00030 bafffff7 blt |$L32516|
00034 |$L33524|
; 456 : break;
; 457 : }
; 458 :
; 459 : if ( i>=10 )
00034 e354000a cmp r4, #0xA
; 460 : {
; 461 : RETAILMSG(1,(TEXT("WriteCommand failed\r\n")));
00038 a59f0008 ldrge r0, [pc, #8]
0003c ab000000 blge NKDbgPrintfW
; 462 : }
; 463 :
; 464 :
; 465 : }
00040 e8bd4030 ldmia sp!, {r4, r5, lr}
00044 e12fff1e bx lr
00048 |$L33534|
00048 00000000 DCD |??_C@_1CM@IOJCIMKI@?$AAW?$AAr?$AAi?$AAt?$AAe?$AAC?$AAo?$AAm?$AAm?$AAa?$AAn?$AAd?$AA?5?$AAf?$AAa?$AAi?$AAl?$AAe?$AAd?$AA?$AN@|
0004c b6a000e0 DCD 0xb6a000e0
00050 |$M33530|
ENDP ; |?WriteCommand@CDisk@@QAAXE@Z|, CDisk::WriteCommand
EXPORT |?WriteSectorCount@CDisk@@QAAXE@Z| ; CDisk::WriteSectorCount
00000 AREA |.text| { |?WriteSectorCount@CDisk@@QAAXE@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?WriteSectorCount@CDisk@@QAAXE@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?WriteSectorCount@CDisk@@QAAXE@Z| } ; comdat associative
|$T33541| DCD |$L33540|
DCD 0x40000601
; Function compile flags: /Ogsy
00000 AREA |.text| { |?WriteSectorCount@CDisk@@QAAXE@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?WriteSectorCount@CDisk@@QAAXE@Z| PROC ; CDisk::WriteSectorCount
; 474 : {
00000 |$L33540|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33538|
; 475 : ATA_WRITE_BYTE((volatile PBYTE)m_pATAReg + m_dwSectCntReasonOffset, bValue);
00004 e59f0008 ldr r0, [pc, #8]
00008 eb000000 bl WRITE_PORT_UCHAR
; 476 : }
0000c e49de004 ldr lr, [sp], #4
00010 e12fff1e bx lr
00014 |$L33543|
00014 b6a00040 DCD 0xb6a00040
00018 |$M33539|
ENDP ; |?WriteSectorCount@CDisk@@QAAXE@Z|, CDisk::WriteSectorCount
EXPORT |?ReadByteBuffer@CDisk@@QAAXPAEK@Z| ; CDisk::ReadByteBuffer
IMPORT |READ_PORT_BUFFER_UCHAR|
00000 AREA |.text| { |?ReadByteBuffer@CDisk@@QAAXPAEK@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?ReadByteBuffer@CDisk@@QAAXPAEK@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?ReadByteBuffer@CDisk@@QAAXPAEK@Z| } ; comdat associative
|$T33551| DCD |$L33550|
DCD 0x40000601
; Function compile flags: /Ogsy
00000 AREA |.text| { |?ReadByteBuffer@CDisk@@QAAXPAEK@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?ReadByteBuffer@CDisk@@QAAXPAEK@Z| PROC ; CDisk::ReadByteBuffer
; 510 : inline void ReadByteBuffer(PBYTE pBuffer, DWORD dwCount) {
00000 |$L33550|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33548|
; 511 : READ_PORT_BUFFER_UCHAR( (volatile PBYTE) m_pATAReg + m_dwDataDrvCtrlOffset, pBuffer, dwCount);
00004 e3a004b6 mov r0, #0xB6, 8
00008 e380060a orr r0, r0, #0xA, 12
0000c eb000000 bl READ_PORT_BUFFER_UCHAR
; 512 : }
00010 e49de004 ldr lr, [sp], #4
00014 e12fff1e bx lr
00018 |$M33549|
ENDP ; |?ReadByteBuffer@CDisk@@QAAXPAEK@Z|, CDisk::ReadByteBuffer
EXPORT |?IsAtapiDevice@CDisk@@QAAHXZ| ; CDisk::IsAtapiDevice
00000 AREA |.text| { |?IsAtapiDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?IsAtapiDevice@CDisk@@QAAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?IsAtapiDevice@CDisk@@QAAHXZ| } ; comdat associative
|$T33561| DCD |$L33560|
DCD 0x40000200
; Function compile flags: /Ogsy
00000 AREA |.text| { |?IsAtapiDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?IsAtapiDevice@CDisk@@QAAHXZ| PROC ; CDisk::IsAtapiDevice
; 527 : {
00000 |$L33560|
00000 |$M33558|
; 528 : // return (m_Id.GeneralConfiguration & IDE_IDDATA_ATAPI_DEVICE);
; 529 : return m_fAtapiDevice;
00000 e5900644 ldr r0, [r0, #0x644]
; 530 : }
00004 e12fff1e bx lr
00008 |$M33559|
ENDP ; |?IsAtapiDevice@CDisk@@QAAHXZ|, CDisk::IsAtapiDevice
EXPORT |?AtapiSoftReset@CDisk@@QAAXXZ| ; CDisk::AtapiSoftReset
IMPORT |?WaitForDisc@CDisk@@QAAHEKK@Z| ; CDisk::WaitForDisc
00000 AREA |.text| { |?AtapiSoftReset@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?AtapiSoftReset@CDisk@@QAAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?AtapiSoftReset@CDisk@@QAAXXZ| } ; comdat associative
|$T33569| DCD |$L33568|
DCD 0x40001001
; Function compile flags: /Ogsy
00000 AREA |.text| { |?AtapiSoftReset@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?AtapiSoftReset@CDisk@@QAAXXZ| PROC ; CDisk::AtapiSoftReset
; 532 : {
00000 |$L33568|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M33566|
00004 e1a04000 mov r4, r0
; 533 : WriteCommand( ATAPI_CMD_SOFT_RESET);
00008 e3a01008 mov r1, #8
0000c eb000000 bl |?WriteCommand@CDisk@@QAAXE@Z|
; 534 : WaitForDisc(WAIT_TYPE_NOT_BUSY,400);
00010 e3a03000 mov r3, #0
00014 e3a02e19 mov r2, #0x19, 28
00018 e3a01002 mov r1, #2
0001c e1a00004 mov r0, r4
00020 eb000000 bl |?WaitForDisc@CDisk@@QAAHEKK@Z|
; 535 : WaitForDisc(WAIT_TYPE_READY,500);
00024 e3a03000 mov r3, #0
00028 e3a02f7d mov r2, #0x7D, 30
0002c e3a01003 mov r1, #3
00030 e1a00004 mov r0, r4
00034 eb000000 bl |?WaitForDisc@CDisk@@QAAHEKK@Z|
; 536 : }
00038 e8bd4010 ldmia sp!, {r4, lr}
0003c e12fff1e bx lr
00040 |$M33567|
ENDP ; |?AtapiSoftReset@CDisk@@QAAXXZ|, CDisk::AtapiSoftReset
EXPORT |?IsCDRomDevice@CDisk@@QAAHXZ| ; CDisk::IsCDRomDevice
00000 AREA |.text| { |?IsCDRomDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?IsCDRomDevice@CDisk@@QAAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?IsCDRomDevice@CDisk@@QAAHXZ| } ; comdat associative
|$T33581| DCD |$L33580|
DCD 0x40000800
; Function compile flags: /Ogsy
00000 AREA |.text| { |?IsCDRomDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?IsCDRomDevice@CDisk@@QAAHXZ| PROC ; CDisk::IsCDRomDevice
; 539 : {
00000 |$L33580|
00000 |$M33578|
; 540 : return (((m_Id.GeneralConfiguration >> 8) & 0x1f) == ATA_IDDEVICE_CDROM);
00000 e5d02444 ldrb r2, [r0, #0x444]
00004 e5d03445 ldrb r3, [r0, #0x445]
00008 e1823403 orr r3, r2, r3, lsl #8
0000c e2033c1f and r3, r3, #0x1F, 24
00010 e3530c05 cmp r3, #5, 24
00014 03a00001 moveq r0, #1
00018 13a00000 movne r0, #0
; 541 : }
0001c e12fff1e bx lr
00020 |$M33579|
ENDP ; |?IsCDRomDevice@CDisk@@QAAHXZ|, CDisk::IsCDRomDevice
EXPORT |?IsRemoveableDevice@CDisk@@QAAHXZ| ; CDisk::IsRemoveableDevice
00000 AREA |.text| { |?IsRemoveableDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?IsRemoveableDevice@CDisk@@QAAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?IsRemoveableDevice@CDisk@@QAAHXZ| } ; comdat associative
|$T33591| DCD |$L33590|
DCD 0x40000500
; Function compile flags: /Ogsy
00000 AREA |.text| { |?IsRemoveableDevice@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?IsRemoveableDevice@CDisk@@QAAHXZ| PROC ; CDisk::IsRemoveableDevice
; 554 : {
00000 |$L33590|
00000 |$M33588|
; 555 : return (m_Id.GeneralConfiguration & IDE_IDDATA_REMOVABLE);
00000 e5d02444 ldrb r2, [r0, #0x444]
00004 e5d03445 ldrb r3, [r0, #0x445]
00008 e1823403 orr r3, r2, r3, lsl #8
0000c e2030080 and r0, r3, #0x80
; 556 : }
00010 e12fff1e bx lr
00014 |$M33589|
ENDP ; |?IsRemoveableDevice@CDisk@@QAAHXZ|, CDisk::IsRemoveableDevice
EXPORT |?IsDMASupported@CDisk@@QAAHXZ| ; CDisk::IsDMASupported
00000 AREA |.text| { |?IsDMASupported@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?IsDMASupported@CDisk@@QAAHXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?IsDMASupported@CDisk@@QAAHXZ| } ; comdat associative
|$T33606| DCD |$L33605|
DCD 0x40001800
; Function compile flags: /Ogsy
00000 AREA |.text| { |?IsDMASupported@CDisk@@QAAHXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?IsDMASupported@CDisk@@QAAHXZ| PROC ; CDisk::IsDMASupported
; 567 : {
00000 |$L33605|
00000 |$M33603|
; 568 : return ((m_Id.Capabilities & IDENTIFY_CAPABILITIES_DMA_SUPPORTED) && m_fDMAActive &&
; 569 : (((int)m_dwBestUDmaMode!=-1 && m_fUDMAActive) || ((int)m_dwBestMwDmaMode!=-1 && !m_fUDMAActive )));
00000 e5d024a6 ldrb r2, [r0, #0x4A6]
00004 e5d034a7 ldrb r3, [r0, #0x4A7]
00008 e1823403 orr r3, r2, r3, lsl #8
0000c e3130c01 tst r3, #1, 24
00010 0a000010 beq |$L33595|
00014 e5903648 ldr r3, [r0, #0x648]
00018 e3530000 cmp r3, #0
0001c 0a00000d beq |$L33595|
00020 e59036b0 ldr r3, [r0, #0x6B0]
00024 e3730001 cmn r3, #1
00028 0a000002 beq |$L33596|
0002c e59036b8 ldr r3, [r0, #0x6B8]
00030 e3530000 cmp r3, #0
00034 1a000005 bne |$L33598|
00038 |$L33596|
00038 e59036ac ldr r3, [r0, #0x6AC]
0003c e3730001 cmn r3, #1
00040 0a000004 beq |$L33595|
00044 e59036b8 ldr r3, [r0, #0x6B8]
00048 e3530000 cmp r3, #0
0004c 1a000001 bne |$L33595|
00050 |$L33598|
00050 e3a00001 mov r0, #1
; 570 : }
00054 e12fff1e bx lr
00058 |$L33595|
; 568 : return ((m_Id.Capabilities & IDENTIFY_CAPABILITIES_DMA_SUPPORTED) && m_fDMAActive &&
; 569 : (((int)m_dwBestUDmaMode!=-1 && m_fUDMAActive) || ((int)m_dwBestMwDmaMode!=-1 && !m_fUDMAActive )));
00058 e3a00000 mov r0, #0
; 570 : }
0005c e12fff1e bx lr
00060 |$M33604|
ENDP ; |?IsDMASupported@CDisk@@QAAHXZ|, CDisk::IsDMASupported
EXPORT |?ResetController@CDisk@@QAAHH@Z| ; CDisk::ResetController
00000 AREA |.text| { |?ResetController@CDisk@@QAAHH@Z| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?ResetController@CDisk@@QAAHH@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?ResetController@CDisk@@QAAHH@Z| } ; comdat associative
|$T33654| DCD |$L33653|
DCD 0x40004e01
; Function compile flags: /Ogsy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -