📄 mdppfs.cod
字号:
00108 e8bd4070 ldmia sp!, {r4 - r6, lr}
0010c e12fff1e bx lr
00110 |$L36738|
00110 00000000 DCD |??_C@_0CM@LLEK@OEMParallelPortGetByte?3?5status?5t@|
00114 00000000 DCD |??_C@_0CM@NELM@OEMParallelPortGetByte?3?5status?5t@|
00118 800a0014 DCD 0x800a0014
0011c 00000000 DCD |NoPPFS|
00120 |$M36735|
ENDP ; |OEMParallelPortGetByte|
EXPORT |OEMParallelPortSendByte|
EXPORT |??_C@_0CM@JKCL@OEMParallelPortSendByte?3?5status?5@| [ DATA ] ; `string'
EXPORT |??_C@_0CN@GLKP@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
|$T36772| DCD |OEMParallelPortSendByte|
DCD 0x40004901
00000 AREA |.rdata| { |??_C@_0CN@GLKP@OEMParallelPortSendByte?3?5status?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CN@GLKP@OEMParallelPortSendByte?3?5status?5@| DCB "OEMParallelPor"
DCB "tSendByte: status timeout 2.", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0CM@JKCL@OEMParallelPortSendByte?3?5status?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0CM@JKCL@OEMParallelPortSendByte?3?5status?5@| DCB "OEMParallelPor"
DCB "tSendByte: status timeout 1.", 0xa, 0x0 ; `string'
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMParallelPortSendByte| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMParallelPortSendByte| PROC
; 250 : {
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M36770|
00004 e1a01000 mov r1, r0
; 251 : unsigned int iWatchdog;
; 252 :
; 253 : //
; 254 : // if ppfs disconnected do nothing
; 255 : //
; 256 : if (NoPPFS)
00008 e59f4110 ldr r4, [pc, #0x110]
0000c e5940000 ldr r0, [r4]
00010 e3500000 cmp r0, #0
00014 1a00003c bne |$L36615|
; 257 : return;
; 258 :
; 259 :
; 260 : //
; 261 : // Get ready to output data.
; 262 : //
; 263 : *IDE_DATAOUT = (ULONG)chData;
00018 e59f20fc ldr r2, [pc, #0xFC]
; 264 :
; 265 : //
; 266 : // Initialize the IDE interface/ Parallel Port for writing.
; 267 : //
; 268 : *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;
0001c e3a05102 mov r5, #2, 2
00020 e20100ff and r0, r1, #0xFF
00024 e385580a orr r5, r5, #0xA, 16
00028 e5820000 str r0, [r2]
0002c e3a03060 mov r3, #0x60
00030 e5853000 str r3, [r5]
00034 e3a02000 mov r2, #0
00038 |$L36622|
; 269 :
; 270 :
; 271 : //
; 272 : // Wait for the AUTOFD to go high.
; 273 : //
; 274 : while (1)
; 275 : {
; 276 : for(iWatchdog = 0 ; ; iWatchdog++)
00038 e1a01002 mov r1, r2
; 277 : {
; 278 : if(( *IDE_CTRL & PAR_AUTOFD))
0003c ea000002 b |$L36766|
00040 |$L36624|
; 279 : {
; 280 : break;
; 281 : }
; 282 :
; 283 : //
; 284 : // Check to see if the watchdog has timed out
; 285 : //
; 286 : if (iWatchdog==PARALLEL_WAIT)
00040 e3510401 cmp r1, #1, 8
00044 0a00002c beq |$L36755|
; 269 :
; 270 :
; 271 : //
; 272 : // Wait for the AUTOFD to go high.
; 273 : //
; 274 : while (1)
; 275 : {
; 276 : for(iWatchdog = 0 ; ; iWatchdog++)
00048 e2811001 add r1, r1, #1
0004c |$L36766|
; 277 : {
; 278 : if(( *IDE_CTRL & PAR_AUTOFD))
0004c e5950000 ldr r0, [r5]
00050 e3100b01 tst r0, #1, 22
00054 0afffff9 beq |$L36624|
; 297 : return;
; 298 : }
; 299 : }
; 300 :
; 301 : //
; 302 : // Read auto FD two times to make sure that it is set again.
; 303 : //
; 304 : if( !(*IDE_CTRL & PAR_AUTOFD))
00058 e5950000 ldr r0, [r5]
0005c e3100b01 tst r0, #1, 22
00060 0afffff4 beq |$L36622|
; 305 : {
; 306 : continue;
; 307 : }
; 308 : if( !(*IDE_CTRL & PAR_AUTOFD))
00064 e5950000 ldr r0, [r5]
00068 e3100b01 tst r0, #1, 22
0006c 0afffff1 beq |$L36622|
; 309 : {
; 310 : continue;
; 311 : }
; 312 : if( !(*IDE_CTRL & PAR_AUTOFD))
00070 e5950000 ldr r0, [r5]
00074 e3100b01 tst r0, #1, 22
00078 0affffee beq |$L36622|
; 313 : {
; 314 : continue;
; 315 : }
; 316 :
; 317 : if( (*IDE_CTRL & PAR_AUTOFD))
0007c e5950000 ldr r0, [r5]
00080 e3100b01 tst r0, #1, 22
00084 0affffeb beq |$L36622|
; 318 : {
; 319 : break;
; 320 : }
; 321 :
; 322 : }
; 323 :
; 324 : //
; 325 : // Set PAR_ACK
; 326 : //
; 327 : *IDE_CTRL = PAR_NREAD | PAR_ACK ;
00088 e3a00021 mov r0, #0x21
0008c e5850000 str r0, [r5]
00090 |$L36641|
; 328 :
; 329 : //
; 330 : // Wait for the AUTOFD to go low.
; 331 : //
; 332 : while (1)
; 333 : {
; 334 : for(iWatchdog = 0 ; ; iWatchdog++)
00090 e1a01002 mov r1, r2
; 335 : {
; 336 : if( !(*IDE_CTRL & PAR_AUTOFD))
00094 ea000002 b |$L36768|
00098 |$L36643|
; 337 : {
; 338 : break;
; 339 : }
; 340 :
; 341 : //
; 342 : // Check to see if the watchdog has timed out
; 343 : //
; 344 : if (iWatchdog == PARALLEL_TIMEOUT)
00098 e3510401 cmp r1, #1, 8
0009c 0a000014 beq |$L36758|
; 328 :
; 329 : //
; 330 : // Wait for the AUTOFD to go low.
; 331 : //
; 332 : while (1)
; 333 : {
; 334 : for(iWatchdog = 0 ; ; iWatchdog++)
000a0 e2811001 add r1, r1, #1
000a4 |$L36768|
; 335 : {
; 336 : if( !(*IDE_CTRL & PAR_AUTOFD))
000a4 e5950000 ldr r0, [r5]
000a8 e3100b01 tst r0, #1, 22
000ac 1afffff9 bne |$L36643|
; 356 : }
; 357 : }
; 358 :
; 359 : //
; 360 : // Read auto FD two times to make sure that it is set again.
; 361 : //
; 362 : if(( *IDE_CTRL & PAR_AUTOFD))
000b0 e5950000 ldr r0, [r5]
000b4 e3100b01 tst r0, #1, 22
000b8 1afffff4 bne |$L36641|
; 363 : {
; 364 : continue;
; 365 : }
; 366 : if(( *IDE_CTRL & PAR_AUTOFD))
000bc e5950000 ldr r0, [r5]
000c0 e3100b01 tst r0, #1, 22
000c4 1afffff1 bne |$L36641|
; 367 : {
; 368 : continue;
; 369 : }
; 370 : if(( *IDE_CTRL & PAR_AUTOFD))
000c8 e5950000 ldr r0, [r5]
000cc e3100b01 tst r0, #1, 22
000d0 1affffee bne |$L36641|
; 371 : {
; 372 : continue;
; 373 : }
; 374 :
; 375 : if( !(*IDE_CTRL & PAR_AUTOFD))
000d4 e5950000 ldr r0, [r5]
000d8 e3100b01 tst r0, #1, 22
000dc 1affffeb bne |$L36641|
; 376 : {
; 377 : break;
; 378 : }
; 379 :
; 380 : }
; 381 : //
; 382 : // Clear Ack
; 383 : //
; 384 : *IDE_CTRL = PAR_NREAD ;
000e0 e3a00020 mov r0, #0x20
000e4 e5850000 str r0, [r5]
; 385 :
; 386 : //
; 387 : // Put a little delay in here.
; 388 : //
; 389 : //VosDelayInuS(20);
; 390 :
; 391 : //
; 392 : // Assert Busy and nAcknowledge. Back to the default Parallel port state
; 393 : //
; 394 : *IDE_CTRL = PAR_NWRITE | PAR_NREAD ;
000e8 e5853000 str r3, [r5]
; 395 : }
000ec e8bd4030 ldmia sp!, {r4, r5, lr}
000f0 e12fff1e bx lr
000f4 |$L36758|
; 345 : {
; 346 : //
; 347 : // Display error message
; 348 : //
; 349 : EdbgOutputDebugString("OEMParallelPortSendByte: status timeout 2.\r\n");
000f4 e59f001c ldr r0, [pc, #0x1C]
; 350 :
; 351 : //
; 352 : // set parallel port to disconnected and return failure
; 353 : //
; 354 : NoPPFS=TRUE;
; 355 : return;
000f8 ea000000 b |$L36769|
000fc |$L36755|
; 287 : {
; 288 : //
; 289 : // Display error message
; 290 : //
; 291 : EdbgOutputDebugString("OEMParallelPortSendByte: status timeout 1.\n");
000fc e59f0010 ldr r0, [pc, #0x10]
00100 |$L36769|
00100 eb000000 bl EdbgOutputDebugString
; 292 :
; 293 : //
; 294 : // set parallel port to disconnected and return failure
; 295 : //
; 296 : NoPPFS=TRUE;
00104 e3a03001 mov r3, #1
00108 e5843000 str r3, [r4]
0010c |$L36615|
; 395 : }
0010c e8bd4030 ldmia sp!, {r4, r5, lr}
00110 e12fff1e bx lr
00114 |$L36774|
00114 00000000 DCD |??_C@_0CM@JKCL@OEMParallelPortSendByte?3?5status?5@|
00118 00000000 DCD |??_C@_0CN@GLKP@OEMParallelPortSendByte?3?5status?5@|
0011c 800a0010 DCD 0x800a0010
00120 00000000 DCD |NoPPFS|
00124 |$M36771|
ENDP ; |OEMParallelPortSendByte|
EXPORT |OEMIsParallelReady|
IMPORT |GetSystemTimeInMsec|
00000 AREA |.text| { |OEMIsParallelReady| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMIsParallelReady|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMIsParallelReady| } ; comdat associative
|$T36785| DCD |OEMIsParallelReady|
DCD 0x40001701
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMIsParallelReady| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMIsParallelReady| PROC
; 404 : {
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M36783|
; 405 : DWORD dwStart;
; 406 :
; 407 : //
; 408 : // Find the initial time in seconds.
; 409 : //
; 410 : dwStart= GetSystemTimeInMsec();
00004 eb000000 bl GetSystemTimeInMsec
; 411 :
; 412 : //
; 413 : // Set direction to write and latch in the line data.
; 414 : //
; 415 : *IDE_CTRL = PAR_NREAD| PAR_NWRITE |PAR_ACK ;
00008 e3a05102 mov r5, #2, 2
0000c e1a04000 mov r4, r0
00010 e385580a orr r5, r5, #0xA, 16
00014 e3a00061 mov r0, #0x61
00018 e5850000 str r0, [r5]
; 416 :
; 417 : //
; 418 : // Wait for AUTOFD
; 419 : //
; 420 : while (*IDE_CTRL & PAR_AUTOFD)
0001c ea000005 b |$L36782|
00020 |$L36667|
; 421 : {
; 422 : if (GetSystemTimeInMsec() - dwStart > 3000)
00020 eb000000 bl GetSystemTimeInMsec
00024 e3a02ebb mov r2, #0xBB, 28
00028 e0401004 sub r1, r0, r4
0002c e3822008 orr r2, r2, #8
00030 e1510002 cmp r1, r2
00034 8a000005 bhi |$L36778|
00038 |$L36782|
; 416 :
; 417 : //
; 418 : // Wait for AUTOFD
; 419 : //
; 420 : while (*IDE_CTRL & PAR_AUTOFD)
00038 e5950000 ldr r0, [r5]
0003c e3100b01 tst r0, #1, 22
00040 1afffff6 bne |$L36667|
; 424 : }
; 425 : return TRUE;
00044 e3a00001 mov r0, #1
; 426 : }
00048 e8bd4030 ldmia sp!, {r4, r5, lr}
0004c e12fff1e bx lr
00050 |$L36778|
; 423 : return FALSE;
00050 e3a00000 mov r0, #0
; 426 : }
00054 e8bd4030 ldmia sp!, {r4, r5, lr}
00058 e12fff1e bx lr
0005c |$M36784|
ENDP ; |OEMIsParallelReady|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -