📄 mdppfs.cod
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 12.20.9615
TTL d:\wince420\platform\ep931x\eboot\.\mdppfs.c
CODE32
00000 AREA |.drectve|, DRECTVE
DCB "-defaultlib:coredll.lib "
DCB "-defaultlib:corelibc.lib "
EXPORT |NoPPFS| [ DATA ]
EXPORT |UART1Started| [ DATA ]
EXPORT |UART3Started| [ DATA ]
00000 AREA |.bss|, NOINIT
|NoPPFS| % 0x4
|UART1Started| % 0x4
|UART3Started| % 0x4
00000 AREA |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
DCW 0x0
DCD 0x4033
DCB 0x1
DCB "AD", 0x0
DCW 0x1050
DCW 0x940
DCD 0x4005
DCB 0x1
DCB "LS", 0x0
DCW 0x1050
DCW 0x940
DCD 0x2078
DCB 0x1
DCB "LS", 0x0
DCW 0x10ec
DCW 0x8029
DCD 0xc0f0
DCB 0x1
DCB "KS", 0x0
DCW 0x10ec
DCW 0x8129
DCD 0x0
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0x900b
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0xd0c9
DCB 0x4
DCB "RT", 0x0
DCW 0x10ec
DCW 0x8139
DCD 0xe04c
DCB 0x4
DCB "RT", 0x0
DCW 0x1186
DCW 0x1300
DCD 0x50ba
DCB 0x4
DCB "DL", 0x0
DCW 0x100b
DCW 0x20
DCD 0xa0cc
DCB 0x5
DCB "NG", 0x0
DCW 0x10b7
DCW 0x9050
DCD 0x6008
DCB 0x6
DCB "3C", 0x0
DCW 0x10b7
DCW 0x9200
DCD 0x476
DCB 0x6
DCB "3C", 0x0
EXPORT |OEMInitParallelPort|
; File d:\wince420\platform\ep931x\kernel\hal\mdppfs.c
00000 AREA |.text| { |OEMInitParallelPort| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMInitParallelPort|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInitParallelPort| } ; comdat associative
|$T36698| DCD |OEMInitParallelPort|
DCD 0x40000b00
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMInitParallelPort| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMInitParallelPort| PROC
; 91 : {
00000 |$M36696|
; 92 : *IDE_CTRL = PAR_NREAD | PAR_NWRITE | IDE_CTRL_CS1;
; 93 : *IDE_CFG = IDE_CFG_IDEEN | IDE_CFG_PIOEN | IDE_CFG_PIO4 | (3<<IDE_CFG_WST_SHIFT);
00000 e59f2020 ldr r2, [pc, #0x20]
00004 e3a01102 mov r1, #2, 2
00008 e3a00062 mov r0, #0x62
0000c e381180a orr r1, r1, #0xA, 16
00010 e5810000 str r0, [r1]
00014 e3a00d0d mov r0, #0xD, 26
00018 e3800003 orr r0, r0, #3
0001c e5820000 str r0, [r2]
; 94 : return 0;
00020 e3a00000 mov r0, #0
; 95 : }
00024 e12fff1e bx lr
00028 |$L36700|
00028 800a0004 DCD 0x800a0004
0002c |$M36697|
ENDP ; |OEMInitParallelPort|
EXPORT |??_C@_0CM@LLEK@OEMParallelPortGetByte?3?5status?5t@| [ DATA ] ; `string'
EXPORT |??_C@_0CM@NELM@OEMParallelPortGetByte?3?5status?5t@| [ DATA ] ; `string'
EXPORT |OEMParallelPortGetByte|
IMPORT |EdbgOutputDebugString|
00000 AREA |.text| { |OEMParallelPortGetByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMParallelPortGetByte|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMParallelPortGetByte| } ; comdat associative
|$T36736| DCD |OEMParallelPortGetByte|
DCD 0x40004801
00000 AREA |.rdata| { |??_C@_0CM@NELM@OEMParallelPortGetByte?3?5status?5t@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@NELM@OEMParallelPortGetByte?3?5status?5t@| DCB "OEMParallelPor"
DCB "tGetByte: status timeout 2.", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0CM@LLEK@OEMParallelPortGetByte?3?5status?5t@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@LLEK@OEMParallelPortGetByte?3?5status?5t@| DCB "OEMParallelPor"
DCB "tGetByte: status timeout 1.", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMParallelPortGetByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMParallelPortGetByte| PROC
; 105 : {
00000 e92d4070 stmdb sp!, {r4 - r6, lr}
00004 |$M36734|
; 106 : //DWORD dwStatus; // parallel port status
; 107 : unsigned int iWatchdog; // timeout counter
; 108 : int iByteReturned;
; 109 :
; 110 : //
; 111 : // if ppfs disconnected do nothing
; 112 : //
; 113 : if (NoPPFS)
00004 e59f4110 ldr r4, [pc, #0x110]
00008 e5940000 ldr r0, [r4]
0000c e3500000 cmp r0, #0
; 114 : return -1;
00010 1a00003b bne |$L36728|
; 115 :
; 116 : //
; 117 : // Clear busy.
; 118 : //
; 119 : *IDE_CTRL = PAR_NREAD| PAR_NWRITE ;
00014 e3a06102 mov r6, #2, 2
00018 e386680a orr r6, r6, #0xA, 16
0001c e3a05060 mov r5, #0x60
00020 e5865000 str r5, [r6]
00024 e3a02000 mov r2, #0
00028 |$L36572|
; 120 :
; 121 : //
; 122 : // Wait for the strobe to go low.
; 123 : //
; 124 : while(1)
; 125 : {
; 126 : for(iWatchdog = 0 ; ; iWatchdog++)
00028 e1a01002 mov r1, r2
; 127 : {
; 128 : if(!( *IDE_CTRL & PAR_STROBE))
0002c ea000002 b |$L36730|
00030 |$L36574|
; 129 : {
; 130 : break;
; 131 : }
; 132 :
; 133 : //
; 134 : // Check to see if the watchdog has timed out
; 135 : if (iWatchdog==PARALLEL_WAIT)
00030 e3510401 cmp r1, #1, 8
00034 0a00002d beq |$L36717|
; 120 :
; 121 : //
; 122 : // Wait for the strobe to go low.
; 123 : //
; 124 : while(1)
; 125 : {
; 126 : for(iWatchdog = 0 ; ; iWatchdog++)
00038 e2811001 add r1, r1, #1
0003c |$L36730|
; 127 : {
; 128 : if(!( *IDE_CTRL & PAR_STROBE))
0003c e5960000 ldr r0, [r6]
00040 e3100c02 tst r0, #2, 24
00044 1afffff9 bne |$L36574|
; 149 : }
; 150 : }
; 151 :
; 152 : //
; 153 : // Read strobe a four more times to make sure that it is low.
; 154 : //
; 155 : if(( *IDE_CTRL & PAR_STROBE))
00048 e5960000 ldr r0, [r6]
0004c e3100c02 tst r0, #2, 24
00050 1afffff4 bne |$L36572|
; 156 : {
; 157 : continue;
; 158 : }
; 159 : if(( *IDE_CTRL & PAR_STROBE))
00054 e5960000 ldr r0, [r6]
00058 e3100c02 tst r0, #2, 24
0005c 1afffff1 bne |$L36572|
; 160 : {
; 161 : continue;
; 162 : }
; 163 : if(( *IDE_CTRL & PAR_STROBE))
00060 e5960000 ldr r0, [r6]
00064 e3100c02 tst r0, #2, 24
00068 1affffee bne |$L36572|
; 164 : {
; 165 : continue;
; 166 : }
; 167 : if(!( *IDE_CTRL & PAR_STROBE))
0006c e5960000 ldr r0, [r6]
00070 e3100c02 tst r0, #2, 24
00074 1affffeb bne |$L36572|
; 168 : {
; 169 : break;
; 170 : }
; 171 :
; 172 : }
; 173 :
; 174 : //
; 175 : // Set the IDE port for Reading and set busy
; 176 : //
; 177 : *IDE_CTRL = PAR_NWRITE | PAR_BUSY ;
00078 e3a00044 mov r0, #0x44
0007c e5860000 str r0, [r6]
00080 |$L36592|
; 178 :
; 179 :
; 180 : //
; 181 : // Wait for the strobe to go high.
; 182 : //
; 183 : while(1)
; 184 : {
; 185 : for(iWatchdog = 0 ; ; iWatchdog++)
00080 e1a01002 mov r1, r2
; 186 : {
; 187 : if( *IDE_CTRL & PAR_STROBE)
00084 ea000002 b |$L36732|
00088 |$L36594|
; 188 : {
; 189 : break;
; 190 : }
; 191 :
; 192 : //
; 193 : // Check to see if the watchdog has timed out
; 194 : if (iWatchdog==PARALLEL_TIMEOUT)
00088 e3510401 cmp r1, #1, 8
0008c 0a000015 beq |$L36720|
; 178 :
; 179 :
; 180 : //
; 181 : // Wait for the strobe to go high.
; 182 : //
; 183 : while(1)
; 184 : {
; 185 : for(iWatchdog = 0 ; ; iWatchdog++)
00090 e2811001 add r1, r1, #1
00094 |$L36732|
; 186 : {
; 187 : if( *IDE_CTRL & PAR_STROBE)
00094 e5960000 ldr r0, [r6]
00098 e3100c02 tst r0, #2, 24
0009c 0afffff9 beq |$L36594|
; 208 : }
; 209 : }
; 210 : //
; 211 : // Read strobe a couple more time to make sure that strobe is high.
; 212 : // next state.
; 213 : //
; 214 : if(!( *IDE_CTRL & PAR_STROBE))
000a0 e5960000 ldr r0, [r6]
000a4 e3100c02 tst r0, #2, 24
000a8 0afffff4 beq |$L36592|
; 215 : {
; 216 : continue;
; 217 : }
; 218 : if(!( *IDE_CTRL & PAR_STROBE))
000ac e5960000 ldr r0, [r6]
000b0 e3100c02 tst r0, #2, 24
000b4 0afffff1 beq |$L36592|
; 219 : {
; 220 : continue;
; 221 : }
; 222 : if(!( *IDE_CTRL & PAR_STROBE))
000b8 e5960000 ldr r0, [r6]
000bc e3100c02 tst r0, #2, 24
000c0 0affffee beq |$L36592|
; 223 : {
; 224 : continue;
; 225 : }
; 226 : if(( *IDE_CTRL & PAR_STROBE))
000c4 e5960000 ldr r0, [r6]
000c8 e3100c02 tst r0, #2, 24
000cc 0affffeb beq |$L36592|
; 227 : {
; 228 : break;
; 229 : }
; 230 : }
; 231 :
; 232 : //
; 233 : // Clear Busy and DIOR. The data is now latched into the Data in register.
; 234 : //
; 235 : *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;
; 236 : iByteReturned = (*IDE_DATAIN & 0xFF);
000d0 e59f0040 ldr r0, [pc, #0x40]
000d4 e5865000 str r5, [r6]
000d8 e5900000 ldr r0, [r0]
000dc e20000ff and r0, r0, #0xFF
; 237 :
; 238 :
; 239 : return (iByteReturned);
; 240 : }
000e0 e8bd4070 ldmia sp!, {r4 - r6, lr}
000e4 e12fff1e bx lr
000e8 |$L36720|
; 195 : {
; 196 : //
; 197 : // Display error message
; 198 : //
; 199 : EdbgOutputDebugString("OEMParallelPortGetByte: status timeout 2.\r\n");
000e8 e59f0024 ldr r0, [pc, #0x24]
; 200 :
; 201 : //
; 202 : // set parallel port to disconnected and return failure
; 203 : //
; 204 : NoPPFS=TRUE;
; 205 :
; 206 : *IDE_CTRL = PAR_NWRITE| PAR_NREAD;
; 207 : return -1;
000ec ea000000 b |$L36733|
000f0 |$L36717|
; 136 : {
; 137 : //
; 138 : // Display error message
; 139 : //
; 140 : EdbgOutputDebugString("OEMParallelPortGetByte: status timeout 1.\r\n");
000f0 e59f0018 ldr r0, [pc, #0x18]
000f4 |$L36733|
000f4 eb000000 bl EdbgOutputDebugString
; 141 :
; 142 : //
; 143 : // set parallel port to disconnected and return failure
; 144 : //
; 145 : NoPPFS=TRUE;
000f8 e3a03001 mov r3, #1
000fc e5843000 str r3, [r4]
; 146 :
; 147 : *IDE_CTRL = PAR_NWRITE| PAR_NREAD;
00100 e5865000 str r5, [r6]
00104 |$L36728|
; 148 : return -1;
00104 e3e00000 mvn r0, #0
; 237 :
; 238 :
; 239 : return (iByteReturned);
; 240 : }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -