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

📄 isr.cod

📁 怎样在win2000下构造驱动程序znsoft_Serial2000_demo.ZIP
💻 COD
📖 第 1 页 / 共 5 页
字号:
  00120	0f 84 8a 00 00
	00		 je	 $ReceiveDoLineStatus$14886

; 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;

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

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

  0012a	e9 81 00 00 00	 jmp	 $ReceiveDoLineStatus$14886
$L14888:

; 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) {

  0012f	8b 86 10 01 00
	00		 mov	 eax, DWORD PTR [esi+272]
  00135	3b c5		 cmp	 eax, ebp
  00137	74 58		 je	 SHORT $L14904

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

  00139	a8 01		 test	 al, 1
  0013b	74 07		 je	 SHORT $L14902

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

  0013d	83 8e 14 01 00
	00 01		 or	 DWORD PTR [esi+276], 1
$L14902:

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

  00144	a8 02		 test	 al, 2
  00146	74 0f		 je	 SHORT $L14903
  00148	38 9e 6f 01 00
	00		 cmp	 BYTE PTR [esi+367], bl
  0014e	75 07		 jne	 SHORT $L14903

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

  00150	83 8e 14 01 00
	00 02		 or	 DWORD PTR [esi+276], 2
$L14903:

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

  00157	8d 8e 18 01 00
	00		 lea	 ecx, DWORD PTR [esi+280]
  0015d	8b 39		 mov	 edi, DWORD PTR [ecx]
  0015f	3b fd		 cmp	 edi, ebp
  00161	74 2e		 je	 SHORT $L14904
  00163	8d 86 14 01 00
	00		 lea	 eax, DWORD PTR [esi+276]
  00169	8b 10		 mov	 edx, DWORD PTR [eax]
  0016b	3b d5		 cmp	 edx, ebp
  0016d	74 22		 je	 SHORT $L14904

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

  0016f	89 17		 mov	 DWORD PTR [edi], edx

; 641  :                                 Extension->IrpMaskLocation = NULL;
; 642  :                                 Extension->HistoryMask = 0;

  00171	89 28		 mov	 DWORD PTR [eax], ebp

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

  00173	8b 86 d4 00 00
	00		 mov	 eax, DWORD PTR [esi+212]
  00179	89 29		 mov	 DWORD PTR [ecx], ebp

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

  0017b	56		 push	 esi
  0017c	55		 push	 ebp
  0017d	c7 40 1c 04 00
	00 00		 mov	 DWORD PTR [eax+28], 4
  00184	8d 86 ac 02 00
	00		 lea	 eax, DWORD PTR [esi+684]
  0018a	55		 push	 ebp
  0018b	50		 push	 eax
  0018c	e8 00 00 00 00	 call	 _SerialInsertQueueDpc@16
$L14904:

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

  00191	ff 74 24 10	 push	 DWORD PTR _ReceivedChar$14879[esp+20]
  00195	56		 push	 esi
  00196	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)) {

  0019b	8a 86 da 01 00
	00		 mov	 al, BYTE PTR [esi+474]
  001a1	84 c0		 test	 al, al
  001a3	74 0b		 je	 SHORT $ReceiveDoLineStatus$14886
  001a5	3a c3		 cmp	 al, bl
  001a7	75 07		 jne	 SHORT $ReceiveDoLineStatus$14886

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

  001a9	55		 push	 ebp
  001aa	56		 push	 esi
  001ab	e8 00 00 00 00	 call	 _SerialPutChar@8
$ReceiveDoLineStatus$14886:

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

  001b0	56		 push	 esi
  001b1	e8 00 00 00 00	 call	 _SerialProcessLSR@4
  001b6	a8 01		 test	 al, 1
  001b8	74 1e		 je	 SHORT $L14871

; 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) {

  001ba	a8 9e		 test	 al, -98			; ffffff9eH
  001bc	0f 84 ca fe ff
	ff		 je	 $L14880
  001c2	80 be da 01 00
	00 00		 cmp	 BYTE PTR [esi+474], 0
$L15242:
  001c9	0f 84 bd fe ff
	ff		 je	 $L14880

; 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);

  001cf	eb 07		 jmp	 SHORT $L14871
$L15016:

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

  001d1	55		 push	 ebp
  001d2	56		 push	 esi
  001d3	e8 00 00 00 00	 call	 _SerialHandleModemUpdate@8
$L14871:

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

  001d8	8b 86 98 00 00
	00		 mov	 eax, DWORD PTR [esi+152]
  001de	40		 inc	 eax
  001df	40		 inc	 eax
  001e0	50		 push	 eax
  001e1	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__READ_PORT_UCHAR@4
  001e7	8a d8		 mov	 bl, al
  001e9	f6 c3 01	 test	 bl, 1
  001ec	0f 84 66 fe ff
	ff		 je	 $L15238

; 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) {

  001f2	56		 push	 esi
  001f3	e8 00 00 00 00	 call	 _SerialProcessLSR@4
  001f8	a8 20		 test	 al, 32			; 00000020H
  001fa	0f 84 f1 03 00
	00		 je	 $L15226

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

  00200	39 ae 1c 01 00
	00		 cmp	 DWORD PTR [esi+284], ebp
  00206	0f 85 e5 03 00
	00		 jne	 $L15226
  0020c	39 ae e0 00 00
	00		 cmp	 DWORD PTR [esi+224], ebp
  00212	75 0d		 jne	 SHORT $L15241
  00214	80 be a1 01 00
	00 00		 cmp	 BYTE PTR [esi+417], 0
  0021b	0f 84 d0 03 00
	00		 je	 $L15226
$L15241:
  00221	8b 3d 00 00 00
	00		 mov	 edi, DWORD PTR __imp__WRITE_PORT_UCHAR@8
$doTrasmitStuff$14914:

; 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) {

  00227	39 ae e0 00 00
	00		 cmp	 DWORD PTR [esi+224], ebp
  0022d	c6 86 a0 01 00
	00 01		 mov	 BYTE PTR [esi+416], 1
  00234	75 1b		 jne	 SHORT $L14916
  00236	80 be a1 01 00
	00 00		 cmp	 BYTE PTR [esi+417], 0
  0023d	75 12		 jne	 SHORT $L14916
  0023f	80 be dc 01 00
	00 00		 cmp	 BYTE PTR [esi+476], 0
  00246	75 09		 jne	 SHORT $L14916
  00248	80 be db 01 00
	00 00		 cmp	 BYTE PTR [esi+475], 0
  0024f	74 87		 je	 SHORT $L14871
$L14916:

; 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) {

  00251	f6 86 74 01 00
	00 38		 test	 BYTE PTR [esi+372], 56	; 00000038H
  00258	c6 86 a2 01 00
	00 01		 mov	 BYTE PTR [esi+418], 1
  0025f	74 08		 je	 SHORT $L14918

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

  00261	6a 01		 push	 1
  00263	56		 push	 esi
  00264	e8 00 00 00 00	 call	 _SerialHandleModemUpdate@8
$L14918:

; 762  : 
; 763  :                         }
; 764  : 
; 765  :                         //
; 766  :                         // We can only send the xon character if
; 767  :                         // the only reason we are holding is because
; 768  :                         // of the xoff.  (Hardware flow control or
; 769  :                         // sending break preclude putting a new character
; 770  :                         // on the wire.)
; 771  :                         //
; 772  : 
; 773  :                         if (Extension->SendXonChar &&
; 774  :                             !(Extension->TXHolding & ~SERIAL_TX_XOFF)) {

  00269	80 be db 01 00
	00 00		 cmp	 BYTE PTR [esi+475], 0
  00270	0f 84 96 00 00
	00		 je	 $L14920
  00276	f7 86 1c 01 00
	00 f7 ff ff ff	 test	 DWORD PTR [esi+284], -9	; fffffff7H
  00280	0f 85 86 00 00
	00		 jne	 $L14920

⌨️ 快捷键说明

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