📄 atamain.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4091
TTL D:\WINCE500\PLATFORM\bvdmain\drivers\atapi\.\atamain.cpp
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
EXPORT |?g_pDiskRoot@@3PAVCDisk@@A| [ DATA ] ; g_pDiskRoot
EXPORT |?g_pPort@@3PAVCEP931xPort@@A| [ DATA ] ; g_pPort
EXPORT |?g_csMain@@3UCRITICAL_SECTION@@A| [ DATA ] ; g_csMain
EXPORT |?g_hInstance@@3PAUHINSTANCE__@@A| [ DATA ] ; g_hInstance
EXPORT |?gpDisk@@3PAVCDisk@@A| [ DATA ] ; gpDisk
00000 AREA |.bss|, NOINIT
|?g_pDiskRoot@@3PAVCDisk@@A| % 0x4 ; g_pDiskRoot
|?g_pPort@@3PAVCEP931xPort@@A| % 0x4 ; g_pPort
|?g_csMain@@3UCRITICAL_SECTION@@A| % 0x14 ; g_csMain
|?g_hInstance@@3PAUHINSTANCE__@@A| % 0x4 ; g_hInstance
|?gpDisk@@3PAVCDisk@@A| % 0x4 ; gpDisk
EXPORT |?SetActiveKey@CDisk@@QAAXPAG@Z| ; CDisk::SetActiveKey
IMPORT |wcscpy|
; File d:\wince500\platform\bvdmain\drivers\atapi\diskmain.h
00000 AREA |.text| { |?SetActiveKey@CDisk@@QAAXPAG@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?SetActiveKey@CDisk@@QAAXPAG@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?SetActiveKey@CDisk@@QAAXPAG@Z| } ; comdat associative
|$T33334| DCD |$L33333|
DCD 0x40000501
; Function compile flags: /Ogsy
00000 AREA |.text| { |?SetActiveKey@CDisk@@QAAXPAG@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?SetActiveKey@CDisk@@QAAXPAG@Z| PROC ; CDisk::SetActiveKey
; 275 : {
00000 |$L33333|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33331|
; 276 : wcscpy( m_szActiveKey, szActiveKey);
00004 e2800034 add r0, r0, #0x34
00008 eb000000 bl wcscpy
; 277 : }
0000c e49de004 ldr lr, [sp], #4
00010 e12fff1e bx lr
00014 |$M33332|
ENDP ; |?SetActiveKey@CDisk@@QAAXPAG@Z|, CDisk::SetActiveKey
EXPORT |?SetDeviceKey@CDisk@@QAAXPAG@Z| ; CDisk::SetDeviceKey
00000 AREA |.text| { |?SetDeviceKey@CDisk@@QAAXPAG@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?SetDeviceKey@CDisk@@QAAXPAG@Z|, PDATA, SELECTION=5, ASSOC=|.text| { |?SetDeviceKey@CDisk@@QAAXPAG@Z| } ; comdat associative
|$T33343| DCD |$L33342|
DCD 0x40000501
; Function compile flags: /Ogsy
00000 AREA |.text| { |?SetDeviceKey@CDisk@@QAAXPAG@Z| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?SetDeviceKey@CDisk@@QAAXPAG@Z| PROC ; CDisk::SetDeviceKey
; 279 : {
00000 |$L33342|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33340|
; 280 : wcscpy( m_szDeviceKey, szDeviceKey);
00004 e2800f8f add r0, r0, #0x8F, 30
00008 eb000000 bl wcscpy
; 281 : }
0000c e49de004 ldr lr, [sp], #4
00010 e12fff1e bx lr
00014 |$M33341|
ENDP ; |?SetDeviceKey@CDisk@@QAAXPAG@Z|, CDisk::SetDeviceKey
EXPORT |?PowerUp@CDisk@@QAAXXZ| ; CDisk::PowerUp
00000 AREA |.text| { |?PowerUp@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?PowerUp@CDisk@@QAAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?PowerUp@CDisk@@QAAXXZ| } ; comdat associative
|$T33351| DCD |$L33350|
DCD 0x40000400
; Function compile flags: /Ogsy
00000 AREA |.text| { |?PowerUp@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?PowerUp@CDisk@@QAAXXZ| PROC ; CDisk::PowerUp
; 298 : void PowerUp() { m_dwDeviceFlags &= ~DFLAGS_DEVICE_PWRDN;}
00000 |$L33350|
00000 |$M33348|
00000 e5903004 ldr r3, [r0, #4]
00004 e3c33401 bic r3, r3, #1, 8
00008 e5803004 str r3, [r0, #4]
0000c e12fff1e bx lr
00010 |$M33349|
ENDP ; |?PowerUp@CDisk@@QAAXXZ|, CDisk::PowerUp
EXPORT |?PowerDown@CDisk@@QAAXXZ| ; CDisk::PowerDown
00000 AREA |.text| { |?PowerDown@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?PowerDown@CDisk@@QAAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?PowerDown@CDisk@@QAAXXZ| } ; comdat associative
|$T33359| DCD |$L33358|
DCD 0x40000400
; Function compile flags: /Ogsy
00000 AREA |.text| { |?PowerDown@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?PowerDown@CDisk@@QAAXXZ| PROC ; CDisk::PowerDown
; 299 : void PowerDown() { m_dwDeviceFlags |= DFLAGS_DEVICE_PWRDN;}
00000 |$L33358|
00000 |$M33356|
00000 e5903004 ldr r3, [r0, #4]
00004 e3833401 orr r3, r3, #1, 8
00008 e5803004 str r3, [r0, #4]
0000c e12fff1e bx lr
00010 |$M33357|
ENDP ; |?PowerDown@CDisk@@QAAXXZ|, CDisk::PowerDown
EXPORT |?Open@CDisk@@QAAXXZ| ; CDisk::Open
IMPORT |InterlockedIncrement|
00000 AREA |.text| { |?Open@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?Open@CDisk@@QAAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?Open@CDisk@@QAAXXZ| } ; comdat associative
|$T33367| DCD |$L33366|
DCD 0x40000501
; Function compile flags: /Ogsy
00000 AREA |.text| { |?Open@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?Open@CDisk@@QAAXXZ| PROC ; CDisk::Open
; 364 : inline void Open() { InterlockedIncrement( (LONG *)&m_dwOpenCount); }
00000 |$L33366|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33364|
00004 e280002c add r0, r0, #0x2C
00008 eb000000 bl InterlockedIncrement
0000c e49de004 ldr lr, [sp], #4
00010 e12fff1e bx lr
00014 |$M33365|
ENDP ; |?Open@CDisk@@QAAXXZ|, CDisk::Open
EXPORT |?Close@CDisk@@QAAXXZ| ; CDisk::Close
IMPORT |InterlockedDecrement|
00000 AREA |.text| { |?Close@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$?Close@CDisk@@QAAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?Close@CDisk@@QAAXXZ| } ; comdat associative
|$T33375| DCD |$L33374|
DCD 0x40000501
; Function compile flags: /Ogsy
00000 AREA |.text| { |?Close@CDisk@@QAAXXZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |?Close@CDisk@@QAAXXZ| PROC ; CDisk::Close
; 365 : void Close() { InterlockedDecrement( (LONG *)&m_dwOpenCount); }
00000 |$L33374|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M33372|
00004 e280002c add r0, r0, #0x2C
00008 eb000000 bl InterlockedDecrement
0000c e49de004 ldr lr, [sp], #4
00010 e12fff1e bx lr
00014 |$M33373|
ENDP ; |?Close@CDisk@@QAAXXZ|, CDisk::Close
EXPORT |??0CEP931xPort@@QAA@XZ| ; CEP931xPort::CEP931xPort
IMPORT |InitializeCriticalSection|
; File d:\wince500\platform\bvdmain\drivers\atapi\ep931xide.h
00000 AREA |.text| { |??0CEP931xPort@@QAA@XZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 AREA |.pdata$$??0CEP931xPort@@QAA@XZ|, PDATA, SELECTION=5, ASSOC=|.text| { |??0CEP931xPort@@QAA@XZ| } ; comdat associative
|$T33385| DCD |$L33384|
DCD 0x40000e01
; Function compile flags: /Ogsy
00000 AREA |.text| { |??0CEP931xPort@@QAA@XZ| }, CODE, ARM, SELECTION=2 ; comdat any
00000 |??0CEP931xPort@@QAA@XZ| PROC ; CEP931xPort::CEP931xPort
; 63 : {
00000 |$L33384|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M33382|
00004 e1a04000 mov r4, r0
00008 e3a0320b mov r3, #0xB, 4
0000c e3833c01 orr r3, r3, #1, 24
00010 e3a02000 mov r2, #0
; 64 : InitializeCriticalSection( &m_CriticalSection);
00014 e2840010 add r0, r4, #0x10
00018 e584300c str r3, [r4, #0xC]
0001c e5842000 str r2, [r4]
00020 e5842004 str r2, [r4, #4]
00024 e5842024 str r2, [r4, #0x24]
00028 eb000000 bl InitializeCriticalSection
; 65 : }
0002c e1a00004 mov r0, r4
00030 e8bd4010 ldmia sp!, {r4, lr}
00034 e12fff1e bx lr
00038 |$M33383|
ENDP ; |??0CEP931xPort@@QAA@XZ|, CEP931xPort::CEP931xPort
EXPORT |?GetIdeInfo@@YAXXZ| ; GetIdeInfo
EXPORT |??_C@_1CC@IFPBOGIL@?$AAC?$AAy?$AAl?$AAi?$AAn?$AAd?$AAe?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6?$AA?$AA@| [ DATA ] ; `string'
EXPORT |??_C@_1CK@KMLKEIKF@?$AAT?$AAo?$AAt?$AAa?$AAl?$AA?5?$AAs?$AAe?$AAc?$AAt?$AAo?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6@| [ DATA ] ; `string'
IMPORT |NKDbgPrintfW|
IMPORT |msWait|
00024 AREA |.bss|, NOINIT
|HDPara| % 0x80
; File d:\wince500\platform\bvdmain\drivers\atapi\atamain.cpp
00000 AREA |.text| { |?GetIdeInfo@@YAXXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$?GetIdeInfo@@YAXXZ|, PDATA, SELECTION=5, ASSOC=|.text| { |?GetIdeInfo@@YAXXZ| } ; comdat associative
|$T33416| DCD |$L33415|
DCD 0x40009202
00000 AREA |.rdata| { |??_C@_1CK@KMLKEIKF@?$AAT?$AAo?$AAt?$AAa?$AAl?$AA?5?$AAs?$AAe?$AAc?$AAt?$AAo?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CK@KMLKEIKF@?$AAT?$AAo?$AAt?$AAa?$AAl?$AA?5?$AAs?$AAe?$AAc?$AAt?$AAo?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6@| DCB "T"
DCB 0x0, "o", 0x0, "t", 0x0, "a", 0x0, "l", 0x0, " ", 0x0, "s"
DCB 0x0, "e", 0x0, "c", 0x0, "t", 0x0, "o", 0x0, "r", 0x0, "s"
DCB 0x0, " ", 0x0, ":", 0x0, " ", 0x0, "%", 0x0, "d", 0x0, 0xd
DCB 0x0, 0xa, 0x0, 0x0, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_1CC@IFPBOGIL@?$AAC?$AAy?$AAl?$AAi?$AAn?$AAd?$AAe?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6?$AA?$AA@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_1CC@IFPBOGIL@?$AAC?$AAy?$AAl?$AAi?$AAn?$AAd?$AAe?$AAr?$AAs?$AA?5?$AA?3?$AA?5?$AA?$CF?$AAd?$AA?$AN?$AA?6?$AA?$AA@| DCB "C"
DCB 0x0, "y", 0x0, "l", 0x0, "i", 0x0, "n", 0x0, "d", 0x0, "e"
DCB 0x0, "r", 0x0, "s", 0x0, " ", 0x0, ":", 0x0, " ", 0x0, "%"
DCB 0x0, "d", 0x0, 0xd, 0x0, 0xa, 0x0, 0x0, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |?GetIdeInfo@@YAXXZ| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |?GetIdeInfo@@YAXXZ| PROC ; GetIdeInfo
; 252 : {
00000 |$L33415|
00000 e92d4ff0 stmdb sp!, {r4 - r11, lr}
00004 e24dd004 sub sp, sp, #4
00008 |$M33413|
; 253 : int i;
; 254 : U16 tmp;
; 255 :
; 256 : //printf( "\nGet IDE Informatin! \n" ) ;
; 257 :
; 258 : //WaitIdeBusy();
; 259 : for(i=0; i<10; i++) {
00008 e59f5234 ldr r5, [pc, #0x234]
0000c e3a04000 mov r4, #0
00010 |$L32954|
; 260 : msWait(500);
00010 e3a00f7d mov r0, #0x7D, 30
00014 eb000000 bl msWait
; 261 : if(!IdeIsBusy())
00018 e1d530b0 ldrh r3, [r5]
0001c e3130080 tst r3, #0x80
00020 0a000002 beq |$L33399|
00024 e2844001 add r4, r4, #1
00028 e354000a cmp r4, #0xA
0002c bafffff7 blt |$L32954|
00030 |$L33399|
; 262 : break;
; 263 : }
; 264 : if(i>=10)
00030 e354000a cmp r4, #0xA
00034 aa00007c bge |$L33392|
; 265 : return;
; 266 :
; 267 : SetIdeCmd(0xec);
00038 e3a030ec mov r3, #0xEC
0003c e1c530b0 strh r3, [r5]
; 268 : //WaitIdeBusy();
; 269 : for(i=0; i<10; i++)
00040 e3a04000 mov r4, #0
00044 |$L32961|
; 270 : {
; 271 : msWait(500);
00044 e3a00f7d mov r0, #0x7D, 30
00048 eb000000 bl msWait
; 272 : if(!IdeIsBusy()) break;
0004c e1d530b0 ldrh r3, [r5]
00050 e3130080 tst r3, #0x80
00054 0a000002 beq |$L33400|
00058 e2844001 add r4, r4, #1
0005c e354000a cmp r4, #0xA
00060 bafffff7 blt |$L32961|
00064 |$L33400|
; 273 : }
; 274 :
; 275 : if(i>=10)
00064 e354000a cmp r4, #0xA
00068 aa00006f bge |$L33392|
; 276 : {
; 277 : //printf( "\nGet IDE Informatin is failed! \n" ) ;
; 278 : //printf( "Please make sure the hard disk is connected to the IDE and Power on! \n\n" ) ;
; 279 : return;
; 280 : }
; 281 :
; 282 : {
; 283 : HDPara.InstallWord = ReadIdeData();
0006c e3a094b6 mov r9, #0xB6, 8
00070 e389960a orr r9, r9, #0xA, 12
00074 e1d930b0 ldrh r3, [r9]
; 284 : HDPara.Cylinders = ReadIdeData();
00078 e1d920b0 ldrh r2, [r9]
0007c e59f81b8 ldr r8, [pc, #0x1B8]
; 285 : RETAILMSG(1,(TEXT("Cylinders : %d\r\n"), HDPara.Cylinders));
00080 e59f01b8 ldr r0, [pc, #0x1B8]
00084 e1a01002 mov r1, r2
00088 e1c830b0 strh r3, [r8]
0008c e1c820b2 strh r2, [r8, #2]
00090 eb000000 bl NKDbgPrintfW
; 286 : tmp = ReadIdeData();
00094 e1d950b0 ldrh r5, [r9]
; 287 : HDPara.Heads = ReadIdeData();
00098 e1d930b0 ldrh r3, [r9]
; 288 : HDPara.nFmtBytesPerTrack = ReadIdeData();
0009c e1d920b0 ldrh r2, [r9]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -