📄 mdppfs.cod
字号:
000e8 eaffffd1 b |$L38197|
000ec |$L38082|
; 174 : }
; 175 : if(!( *IDE_CTRL & PAR_STROBE))
000ec e3a03102 mov r3, #2, 2
000f0 e383380a orr r3, r3, #0xA, 16
000f4 e5933000 ldr r3, [r3]
000f8 e3130c02 tst r3, #2, 24
000fc 1a000000 bne |$L38084|
; 176 : {
; 177 : break;
00100 ea000000 b |$L38068|
00104 |$L38084|
; 178 : }
; 179 :
; 180 : }
00104 eaffffca b |$L38198|
00108 |$L38068|
; 181 :
; 182 : //
; 183 : // Set the IDE port for Reading and set busy
; 184 : //
; 185 : *IDE_CTRL = PAR_NWRITE | PAR_BUSY ;
00108 e3a03102 mov r3, #2, 2
0010c e383280a orr r2, r3, #0xA, 16
00110 e3a03044 mov r3, #0x44
00114 e5823000 str r3, [r2]
00118 |$L38201|
00118 |$L38200|
00118 |$L38199|
00118 |$L38087|
; 186 :
; 187 :
; 188 : //
; 189 : // Wait for the strobe to go high.
; 190 : //
; 191 : while(1)
; 192 : {
; 193 : for(iWatchdog = 0 ; ; iWatchdog++)
00118 e3a03000 mov r3, #0
0011c e58d3000 str r3, [sp]
00120 ea000002 b |$L38089|
00124 |$L38090|
00124 e59d3000 ldr r3, [sp]
00128 e2833001 add r3, r3, #1
0012c e58d3000 str r3, [sp]
00130 |$L38089|
; 194 : {
; 195 : if( *IDE_CTRL & PAR_STROBE)
00130 e3a03102 mov r3, #2, 2
00134 e383380a orr r3, r3, #0xA, 16
00138 e5933000 ldr r3, [r3]
0013c e3130c02 tst r3, #2, 24
00140 0a000000 beq |$L38093|
; 196 : {
; 197 : break;
00144 ea00000f b |$L38091|
00148 |$L38093|
; 198 : }
; 199 :
; 200 : //
; 201 : // Check to see if the watchdog has timed out
; 202 : if (iWatchdog==PARALLEL_TIMEOUT)
00148 e59d3000 ldr r3, [sp]
0014c e3530401 cmp r3, #1, 8
00150 1a00000b bne |$L38094|
; 203 : {
; 204 : //
; 205 : // Display error message
; 206 : //
; 207 : EdbgOutputDebugString("OEMParallelPortGetByte: status timeout 2.\r\n");
00154 e59f00d0 ldr r0, [pc, #0xD0]
00158 eb000000 bl EdbgOutputDebugString
; 208 :
; 209 : //
; 210 : // set parallel port to disconnected and return failure
; 211 : //
; 212 : NoPPFS=TRUE;
0015c e59f20c4 ldr r2, [pc, #0xC4]
00160 e3a03001 mov r3, #1
00164 e5823000 str r3, [r2]
; 213 :
; 214 : *IDE_CTRL = PAR_NWRITE| PAR_NREAD;
00168 e3a03102 mov r3, #2, 2
0016c e383280a orr r2, r3, #0xA, 16
00170 e3a03060 mov r3, #0x60
00174 e5823000 str r3, [r2]
; 215 : return -1;
00178 e3e03000 mvn r3, #0
0017c e58d3008 str r3, [sp, #8]
00180 ea000023 b |$L38061|
00184 |$L38094|
; 216 : }
; 217 : }
00184 eaffffe6 b |$L38090|
00188 |$L38091|
; 218 : //
; 219 : // Read strobe a couple more time to make sure that strobe is high.
; 220 : // next state.
; 221 : //
; 222 : if(!( *IDE_CTRL & PAR_STROBE))
00188 e3a03102 mov r3, #2, 2
0018c e383380a orr r3, r3, #0xA, 16
00190 e5933000 ldr r3, [r3]
00194 e3130c02 tst r3, #2, 24
00198 1a000000 bne |$L38098|
; 223 : {
; 224 : continue;
0019c eaffffdd b |$L38087|
001a0 |$L38098|
; 225 : }
; 226 : if(!( *IDE_CTRL & PAR_STROBE))
001a0 e3a03102 mov r3, #2, 2
001a4 e383380a orr r3, r3, #0xA, 16
001a8 e5933000 ldr r3, [r3]
001ac e3130c02 tst r3, #2, 24
001b0 1a000000 bne |$L38100|
; 227 : {
; 228 : continue;
001b4 eaffffd7 b |$L38199|
001b8 |$L38100|
; 229 : }
; 230 : if(!( *IDE_CTRL & PAR_STROBE))
001b8 e3a03102 mov r3, #2, 2
001bc e383380a orr r3, r3, #0xA, 16
001c0 e5933000 ldr r3, [r3]
001c4 e3130c02 tst r3, #2, 24
001c8 1a000000 bne |$L38102|
; 231 : {
; 232 : continue;
001cc eaffffd1 b |$L38200|
001d0 |$L38102|
; 233 : }
; 234 : if(( *IDE_CTRL & PAR_STROBE))
001d0 e3a03102 mov r3, #2, 2
001d4 e383380a orr r3, r3, #0xA, 16
001d8 e5933000 ldr r3, [r3]
001dc e3130c02 tst r3, #2, 24
001e0 0a000000 beq |$L38104|
; 235 : {
; 236 : break;
001e4 ea000000 b |$L38088|
001e8 |$L38104|
; 237 : }
; 238 : }
001e8 eaffffca b |$L38201|
001ec |$L38088|
; 239 :
; 240 : //
; 241 : // Clear Busy and DIOR. The data is now latched into the Data in register.
; 242 : //
; 243 : *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;
001ec e3a03102 mov r3, #2, 2
001f0 e383280a orr r2, r3, #0xA, 16
001f4 e3a03060 mov r3, #0x60
001f8 e5823000 str r3, [r2]
; 244 : iByteReturned = (*IDE_DATAIN & 0xFF);
001fc e59f3020 ldr r3, [pc, #0x20]
00200 e5933000 ldr r3, [r3]
00204 e20330ff and r3, r3, #0xFF
00208 e58d3004 str r3, [sp, #4]
; 245 :
; 246 :
; 247 : return (iByteReturned);
0020c e59d3004 ldr r3, [sp, #4]
00210 e58d3008 str r3, [sp, #8]
00214 |$L38061|
; 122 : return -1;
00214 e59d0008 ldr r0, [sp, #8]
; 248 : }
00218 e28dd00c add sp, sp, #0xC
0021c e49de004 ldr lr, [sp], #4
00220 e12fff1e bx lr
00224 |$L38208|
00224 800a0014 DCD 0x800a0014
00228 00000000 DCD |NoPPFS|
0022c 00000000 DCD |??_C@_0CM@EHKFDPED@OEMParallelPortGetByte?3?5status?5t@|
00230 00000000 DCD |??_C@_0CM@FEFJD@OEMParallelPortGetByte?3?5status?5t@|
00234 |$M38204|
ENDP ; |OEMParallelPortGetByte|
EXPORT |OEMParallelPortSendByte|
EXPORT |??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| [ DATA ] ; `string'
EXPORT |??_C@_0CN@FHIBGCLO@OEMParallelPortSendByte?3?5status?5@| [ DATA ] ; `string'
00000 AREA |.text| { |OEMParallelPortSendByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMParallelPortSendByte|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMParallelPortSendByte| } ; comdat associative
|$T38220| DCD |$L38219|
DCD 0x40008104
00000 AREA |.rdata| { |??_C@_0CN@FHIBGCLO@OEMParallelPortSendByte?3?5status?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CN@FHIBGCLO@OEMParallelPortSendByte?3?5status?5@| DCB "OEMParalle"
DCB "lPortSendByte: status timeout 2.", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@FEPGELED@OEMParallelPortSendByte?3?5status?5@| DCB "OEMParalle"
DCB "lPortSendByte: status timeout 1.", 0xa, 0x0 ; `string'
; Function compile flags: /Ods
00000 AREA |.text| { |OEMParallelPortSendByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMParallelPortSendByte| PROC
; 258 : {
00000 |$L38219|
00000 e1a0c00d mov r12, sp
00004 e92d0001 stmdb sp!, {r0}
00008 e92d5000 stmdb sp!, {r12, lr}
0000c e24dd004 sub sp, sp, #4
00010 |$M38217|
; 259 : unsigned int iWatchdog;
; 260 :
; 261 : //
; 262 : // if ppfs disconnected do nothing
; 263 : //
; 264 : if (NoPPFS)
00010 e59f31dc ldr r3, [pc, #0x1DC]
00014 e5933000 ldr r3, [r3]
00018 e3530000 cmp r3, #0
0001c 0a000000 beq |$L38112|
; 265 : return;
00020 ea000070 b |$L38110|
00024 |$L38112|
; 266 :
; 267 :
; 268 : //
; 269 : // Get ready to output data.
; 270 : //
; 271 : *IDE_DATAOUT = (ULONG)chData;
00024 e5dd200c ldrb r2, [sp, #0xC]
00028 e59f31d0 ldr r3, [pc, #0x1D0]
0002c e5832000 str r2, [r3]
; 272 :
; 273 : //
; 274 : // Initialize the IDE interface/ Parallel Port for writing.
; 275 : //
; 276 : *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;
00030 e3a03102 mov r3, #2, 2
00034 e383280a orr r2, r3, #0xA, 16
00038 e3a03060 mov r3, #0x60
0003c e5823000 str r3, [r2]
00040 |$L38213|
00040 |$L38212|
00040 |$L38211|
00040 |$L38117|
; 277 :
; 278 :
; 279 : //
; 280 : // Wait for the AUTOFD to go high.
; 281 : //
; 282 : while (1)
; 283 : {
; 284 : for(iWatchdog = 0 ; ; iWatchdog++)
00040 e3a03000 mov r3, #0
00044 e58d3000 str r3, [sp]
00048 ea000002 b |$L38119|
0004c |$L38120|
0004c e59d3000 ldr r3, [sp]
00050 e2833001 add r3, r3, #1
00054 e58d3000 str r3, [sp]
00058 |$L38119|
; 285 : {
; 286 : if(( *IDE_CTRL & PAR_AUTOFD))
00058 e3a03102 mov r3, #2, 2
0005c e383380a orr r3, r3, #0xA, 16
00060 e5933000 ldr r3, [r3]
00064 e3130b01 tst r3, #1, 22
00068 0a000000 beq |$L38123|
; 287 : {
; 288 : break;
0006c ea000009 b |$L38121|
00070 |$L38123|
; 289 : }
; 290 :
; 291 : //
; 292 : // Check to see if the watchdog has timed out
; 293 : //
; 294 : if (iWatchdog==PARALLEL_WAIT)
00070 e59d3000 ldr r3, [sp]
00074 e3530401 cmp r3, #1, 8
00078 1a000005 bne |$L38124|
; 295 : {
; 296 : //
; 297 : // Display error message
; 298 : //
; 299 : EdbgOutputDebugString("OEMParallelPortSendByte: status timeout 1.\n");
0007c e59f0178 ldr r0, [pc, #0x178]
00080 eb000000 bl EdbgOutputDebugString
; 300 :
; 301 : //
; 302 : // set parallel port to disconnected and return failure
; 303 : //
; 304 : NoPPFS=TRUE;
00084 e59f2168 ldr r2, [pc, #0x168]
00088 e3a03001 mov r3, #1
0008c e5823000 str r3, [r2]
; 305 : return;
00090 ea000054 b |$L38110|
00094 |$L38124|
; 306 : }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -