⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isr.cod

📁 怎样在win2000下构造驱动程序znsoft_Serial2000_demo.ZIP
💻 COD
📖 第 1 页 / 共 5 页
字号:
  00136	6a 00		 push	 0
  00138	50		 push	 eax
  00139	e8 00 00 00 00	 call	 _SerialInsertQueueDpc@16
  0013e	84 c0		 test	 al, al
  00140	0f 84 a7 00 00
	00		 je	 $ReceiveDoLineStatus$14931
  00146	ff 86 3c 01 00
	00		 inc	 DWORD PTR [esi+316]

; 583  : 
; 584  :                                 }
; 585  : 
; 586  : 
; 587  :                             } else {

  0014c	e9 9c 00 00 00	 jmp	 $ReceiveDoLineStatus$14931
$L14935:

; 588  : 
; 589  :                                 if (Extension->TXHolding & SERIAL_TX_XOFF) {

  00151	8d 8e 1c 01 00
	00		 lea	 ecx, DWORD PTR [esi+284]
  00157	8b 01		 mov	 eax, DWORD PTR [ecx]
  00159	a8 08		 test	 al, 8
  0015b	0f 84 8c 00 00
	00		 je	 $ReceiveDoLineStatus$14931

; 590  : 
; 591  :                                     //
; 592  :                                     // We got the xon char **AND*** we
; 593  :                                     // were being held up on transmission
; 594  :                                     // by xoff.  Clear that we are holding
; 595  :                                     // due to xoff.  Transmission will
; 596  :                                     // automatically restart because of
; 597  :                                     // the code outside the main loop that
; 598  :                                     // catches problems chips like the
; 599  :                                     // SMC and the Winbond.
; 600  :                                     //
; 601  : 
; 602  :                                     Extension->TXHolding &= ~SERIAL_TX_XOFF;

  00161	24 f7		 and	 al, -9			; fffffff7H
  00163	89 01		 mov	 DWORD PTR [ecx], eax

; 603  : 
; 604  :                                 }
; 605  : 
; 606  :                             }
; 607  : 
; 608  :                             goto ReceiveDoLineStatus;

  00165	e9 83 00 00 00	 jmp	 $ReceiveDoLineStatus$14931
$L14933:

; 609  : 
; 610  :                         }
; 611  : 
; 612  :                         //
; 613  :                         // Check to see if we should note
; 614  :                         // the receive character or special
; 615  :                         // character event.
; 616  :                         //
; 617  : 
; 618  :                         if (Extension->IsrWaitMask) {

  0016a	8b 86 10 01 00
	00		 mov	 eax, DWORD PTR [esi+272]
  00170	85 c0		 test	 eax, eax
  00172	74 5a		 je	 SHORT $L14949

; 619  : 
; 620  :                             if (Extension->IsrWaitMask &
; 621  :                                 SERIAL_EV_RXCHAR) {

  00174	a8 01		 test	 al, 1
  00176	74 07		 je	 SHORT $L14947

; 622  : 
; 623  :                                 Extension->HistoryMask |= SERIAL_EV_RXCHAR;

  00178	83 8e 14 01 00
	00 01		 or	 DWORD PTR [esi+276], 1
$L14947:

; 624  : 
; 625  :                             }
; 626  : 
; 627  :                             if ((Extension->IsrWaitMask &
; 628  :                                  SERIAL_EV_RXFLAG) &&
; 629  :                                 (Extension->SpecialChars.EventChar ==
; 630  :                                  ReceivedChar)) {

  0017f	a8 02		 test	 al, 2
  00181	74 0f		 je	 SHORT $L14948
  00183	38 9e 6f 01 00
	00		 cmp	 BYTE PTR [esi+367], bl
  00189	75 07		 jne	 SHORT $L14948

; 631  : 
; 632  :                                 Extension->HistoryMask |= SERIAL_EV_RXFLAG;

  0018b	83 8e 14 01 00
	00 02		 or	 DWORD PTR [esi+276], 2
$L14948:

; 633  : 
; 634  :                             }
; 635  : 
; 636  :                             if (Extension->IrpMaskLocation &&
; 637  :                                 Extension->HistoryMask) {

  00192	8d 8e 18 01 00
	00		 lea	 ecx, DWORD PTR [esi+280]
  00198	8b 39		 mov	 edi, DWORD PTR [ecx]
  0019a	85 ff		 test	 edi, edi
  0019c	74 30		 je	 SHORT $L14949
  0019e	8d 86 14 01 00
	00		 lea	 eax, DWORD PTR [esi+276]
  001a4	8b 10		 mov	 edx, DWORD PTR [eax]
  001a6	85 d2		 test	 edx, edx
  001a8	74 24		 je	 SHORT $L14949

; 638  : 
; 639  :                                 *Extension->IrpMaskLocation =
; 640  :                                  Extension->HistoryMask;

  001aa	89 17		 mov	 DWORD PTR [edi], edx

; 641  :                                 Extension->IrpMaskLocation = NULL;

  001ac	33 d2		 xor	 edx, edx

; 642  :                                 Extension->HistoryMask = 0;

  001ae	89 10		 mov	 DWORD PTR [eax], edx

; 643  : 
; 644  :                                 Extension->CurrentWaitIrp->
; 645  :                                     IoStatus.Information = sizeof(ULONG);

  001b0	8b 86 d4 00 00
	00		 mov	 eax, DWORD PTR [esi+212]
  001b6	89 11		 mov	 DWORD PTR [ecx], edx

; 646  :                                 SerialInsertQueueDpc(
; 647  :                                     &Extension->CommWaitDpc,
; 648  :                                     NULL,
; 649  :                                     NULL,
; 650  :                                     Extension
; 651  :                                     );

  001b8	56		 push	 esi
  001b9	c7 40 1c 04 00
	00 00		 mov	 DWORD PTR [eax+28], 4
  001c0	52		 push	 edx
  001c1	8d 86 ac 02 00
	00		 lea	 eax, DWORD PTR [esi+684]
  001c7	52		 push	 edx
  001c8	50		 push	 eax
  001c9	e8 00 00 00 00	 call	 _SerialInsertQueueDpc@16
$L14949:

; 652  : 
; 653  :                             }
; 654  : 
; 655  :                         }
; 656  : 
; 657  :                         SerialPutChar(
; 658  :                             Extension,
; 659  :                             ReceivedChar
; 660  :                             );

  001ce	ff 75 fc	 push	 DWORD PTR _ReceivedChar$14924[ebp]
  001d1	56		 push	 esi
  001d2	e8 00 00 00 00	 call	 _SerialPutChar@8

; 661  : 
; 662  :                         //
; 663  :                         // If we're doing line status and modem
; 664  :                         // status insertion then we need to insert
; 665  :                         // a zero following the character we just
; 666  :                         // placed into the buffer to mark that this
; 667  :                         // was reception of what we are using to
; 668  :                         // escape.
; 669  :                         //
; 670  : 
; 671  :                         if (Extension->EscapeChar &&
; 672  :                             (Extension->EscapeChar ==
; 673  :                              ReceivedChar)) {

  001d7	8a 86 da 01 00
	00		 mov	 al, BYTE PTR [esi+474]
  001dd	84 c0		 test	 al, al
  001df	74 0c		 je	 SHORT $ReceiveDoLineStatus$14931
  001e1	3a c3		 cmp	 al, bl
  001e3	75 08		 jne	 SHORT $ReceiveDoLineStatus$14931

; 674  : 
; 675  :                             SerialPutChar(
; 676  :                                 Extension,
; 677  :                                 SERIAL_LSRMST_ESCAPE
; 678  :                                 );

  001e5	6a 00		 push	 0
  001e7	56		 push	 esi
  001e8	e8 00 00 00 00	 call	 _SerialPutChar@8
$ReceiveDoLineStatus$14931:

; 679  : 
; 680  :                         }
; 681  : 
; 682  : 
; 683  : ReceiveDoLineStatus:    ;
; 684  : 
; 685  :                         if (!((tempLSR = SerialProcessLSR(Extension)) &
; 686  :                               SERIAL_LSR_DR)) {

  001ed	56		 push	 esi
  001ee	e8 00 00 00 00	 call	 _SerialProcessLSR@4
  001f3	a8 01		 test	 al, 1
  001f5	74 1f		 je	 SHORT $L14916

; 687  : 
; 688  :                             //
; 689  :                             // No more characters, get out of the
; 690  :                             // loop.
; 691  :                             //
; 692  : 
; 693  :                             break;
; 694  : 
; 695  :                         }
; 696  : 
; 697  :                         if ((tempLSR & ~(SERIAL_LSR_THRE | SERIAL_LSR_TEMT |
; 698  :                                          SERIAL_LSR_DR)) &&
; 699  :                             Extension->EscapeChar) {

  001f7	a8 9e		 test	 al, -98			; ffffff9eH
  001f9	0f 84 c7 fe ff
	ff		 je	 $L14925
  001ff	80 be da 01 00
	00 00		 cmp	 BYTE PTR [esi+474], 0
$L15312:
  00206	0f 84 ba fe ff
	ff		 je	 $L14925

; 700  : 
; 701  :                            //
; 702  :                            // An error was indicated and inserted into the
; 703  :                            // stream, get out of the loop.
; 704  :                            //
; 705  : 
; 706  :                            break;
; 707  :                         }
; 708  : 
; 709  :                     } while (TRUE);

  0020c	eb 08		 jmp	 SHORT $L14916
$L15061:

; 1090 : 
; 1091 :                 }
; 1092 : 
; 1093 :                 case SERIAL_IIR_MS: {
; 1094 : 
; 1095 :                     SerialHandleModemUpdate(
; 1096 :                         Extension,
; 1097 :                         FALSE
; 1098 :                         );

  0020e	6a 00		 push	 0
  00210	56		 push	 esi
  00211	e8 00 00 00 00	 call	 _SerialHandleModemUpdate@8
$L14916:

; 1099 : 
; 1100 :                     break;
; 1101 : 
; 1102 :                 }
; 1103 : 
; 1104 :             }
; 1105 : 
; 1106 :         } while (!((InterruptIdReg =
; 1107 :                     READ_INTERRUPT_ID_REG(Extension->Controller))
; 1108 :                     & SERIAL_IIR_NO_INTERRUPT_PENDING));

  00216	8b 86 98 00 00
	00		 mov	 eax, DWORD PTR [esi+152]
  0021c	40		 inc	 eax
  0021d	40		 inc	 eax
  0021e	50		 push	 eax
  0021f	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__READ_PORT_UCHAR@4
  00225	8a d8		 mov	 bl, al
  00227	f6 c3 01	 test	 bl, 1
  0022a	0f 84 61 fe ff
	ff		 je	 $L15303

; 1109 : 
; 1110 :         //
; 1111 :         // Besides catching the WINBOND and SMC chip problems this
; 1112 :         // will also cause transmission to restart incase of an xon
; 1113 :         // char being received.  Don't remove.
; 1114 :         //
; 1115 : 
; 1116 :         if (SerialProcessLSR(Extension) & SERIAL_LSR_THRE) {

  00230	56		 push	 esi
  00231	e8 00 00 00 00	 call	 _SerialProcessLSR@4
  00236	a8 20		 test	 al, 32			; 00000020H
  00238	0f 84 18 04 00
	00		 je	 $L15291

; 1117 : 
; 1118 :             if (!Extension->TXHolding &&
; 1119 :                 (Extension->WriteLength ||
; 1120 :                  Extension->TransmitImmediate)) {

  0023e	83 be 1c 01 00
	00 00		 cmp	 DWORD PTR [esi+284], 0
  00245	0f 85 0b 04 00
	00		 jne	 $L15291
  0024b	83 be e0 00 00
	00 00		 cmp	 DWORD PTR [esi+224], 0
  00252	75 0d		 jne	 SHORT $L15305
  00254	80 be a1 01 00
	00 00		 cmp	 BYTE PTR [esi+417], 0
  0025b	0f 84 f5 03 00
	00		 je	 $L15291
$L15305:
  00261	8b 3d 00 00 00
	00		 mov	 edi, DWORD PTR __imp__WRITE_PORT_UCHAR@8
$doTrasmitStuff$14959:

; 710  : 
; 711  :                     break;
; 712  : 
; 713  :                 }
; 714  : 
; 715  :                 case SERIAL_IIR_THR: {
; 716  : 
; 717  : doTrasmitStuff:;
; 718  :                     Extension->HoldingEmpty = TRUE;
; 719  : 
; 720  :                     if (Extension->WriteLength ||
; 721  :                         Extension->TransmitImmediate ||
; 722  :                         Extension->SendXoffChar ||
; 723  :                         Extension->SendXonChar) {

  00267	33 db		 xor	 ebx, ebx
  00269	c6 86 a0 01 00
	00 01		 mov	 BYTE PTR [esi+416], 1
  00270	39 9e e0 00 00
	00		 cmp	 DWORD PTR [esi+224], ebx
  00276	75 18		 jne	 SHORT $L14961
  00278	38 9e a1 01 00
	00		 cmp	 BYTE PTR [esi+417], bl
  0027e	75 10		 jne	 SHORT $L14961
  00280	38 9e dc 01 00
	00		 cmp	 BYTE PTR [esi+476], bl
  00286	75 08		 jne	 SHORT $L14961
  00288	38 9e db 01 00
	00		 cmp	 BYTE PTR [esi+475], bl
  0028e	74 86		 je	 SHORT $L14916
$L14961:

; 724  : 
; 725  :                         //
; 726  :                         // Even though all of the characters being
; 727  :                         // sent haven't all been sent, this variable
; 728  :                         // will be checked when the transmit queue is
; 729  :                         // empty.  If it is still true and there is a
; 730  :                         // wait on the transmit queue being empty then
; 731  :                         // we know we finished transmitting all characters
; 732  :                         // following the initiation of the wait since
; 733  :                         // the code that initiates the wait will set
; 734  :                         // this variable to false.
; 735  :                         //
; 736  :                         // One reason it could be false is that
; 737  :                         // the writes were cancelled before they
; 738  :                         // actually started, or that the writes
; 739  :                         // failed due to timeouts.  This variable
; 740  :                         // basically says a character was written
; 741  :                         // by the isr at some point following the
; 742  :                         // initiation of the wait.
; 743  :                         //
; 744  : 
; 745  :                         Extension->EmptiedTransmit = TRUE;
; 746  : 
; 747  :                         //
; 748  :                         // If we have output flow control based on
; 749  :                         // the modem status lines, then we have to do
; 750  :                         // all the modem work before we output each
; 751  :                         // character. (Otherwise we might miss a
; 752  :                         // status line change.)
; 753  :                         //
; 754  : 
; 755  :                         if (Extension->HandFlow.ControlHandShake &
; 756  :                             SERIAL_OUT_HANDSHAKEMASK) {

  00290	f6 86 74 01 00
	00 38		 test	 BYTE PTR [esi+372], 56	; 00000038H
  00297	c6 86 a2 01 00
	00 01		 mov	 BYTE PTR [esi+418], 1
  0029e	74 08		 je	 SHORT $L14963

; 757  : 
; 758  :                             SerialHandleModemUpdate(
; 759  :                                 Extension,
; 760  :                                 TRUE
; 761  :                                 );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -