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

📄 isr.cod

📁 怎样在win2000下构造驱动程序znsoft_Serial2000_demo.ZIP
💻 COD
📖 第 1 页 / 共 5 页
字号:
; 949  :                                 Extension->PerfStats.TransmittedCount++;
; 950  :                                 Extension->WmiPerfData.TransmittedCount++;
; 951  :                                 WRITE_TRANSMIT_HOLDING(
; 952  :                                     Extension->Controller,
; 953  :                                     Extension->ImmediateChar
; 954  :                                     );

  0043e	8a 86 d8 01 00
	00		 mov	 al, BYTE PTR [esi+472]
  00444	ff 86 88 01 00
	00		 inc	 DWORD PTR [esi+392]
  0044a	ff 86 1c 06 00
	00		 inc	 DWORD PTR [esi+1564]
  00450	50		 push	 eax
  00451	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]
  00457	ff d7		 call	 edi
$L14977:

; 955  : 
; 956  :                             }
; 957  : 
; 958  :                             Extension->HoldingEmpty = FALSE;

  00459	80 a6 a0 01 00
	00 00		 and	 BYTE PTR [esi+416], 0

; 959  : 
; 960  :                             SerialInsertQueueDpc(
; 961  :                                 &Extension->CompleteImmediateDpc,
; 962  :                                 NULL,
; 963  :                                 NULL,
; 964  :                                 Extension
; 965  :                                 );

  00460	8d 86 cc 02 00
	00		 lea	 eax, DWORD PTR [esi+716]
$L15244:
  00466	56		 push	 esi
  00467	55		 push	 ebp
  00468	55		 push	 ebp
  00469	50		 push	 eax
  0046a	e8 00 00 00 00	 call	 _SerialInsertQueueDpc@16

; 966  : 
; 967  :                         } else if (!Extension->TXHolding) {

  0046f	e9 64 fd ff ff	 jmp	 $L14871
$L14963:
  00474	39 ae 1c 01 00
	00		 cmp	 DWORD PTR [esi+284], ebp
  0047a	0f 85 58 fd ff
	ff		 jne	 $L14871

; 968  : 
; 969  :                             ULONG amountToWrite;
; 970  : 
; 971  :                             if (Extension->FifoPresent) {

  00480	80 be dd 01 00
	00 00		 cmp	 BYTE PTR [esi+477], 0
  00487	74 14		 je	 SHORT $L14984

; 972  : 
; 973  :                                 amountToWrite = (Extension->TxFifoAmount <
; 974  :                                                  Extension->WriteLength)?
; 975  :                                                 Extension->TxFifoAmount:
; 976  :                                                 Extension->WriteLength;

  00489	8b 86 50 01 00
	00		 mov	 eax, DWORD PTR [esi+336]
  0048f	8b be e0 00 00
	00		 mov	 edi, DWORD PTR [esi+224]
  00495	3b c7		 cmp	 eax, edi
  00497	73 07		 jae	 SHORT $L14985
  00499	8b f8		 mov	 edi, eax
  0049b	eb 03		 jmp	 SHORT $L14985
$L14984:

; 977  : 
; 978  :                             } else {
; 979  : 
; 980  :                                 amountToWrite = 1;

  0049d	33 ff		 xor	 edi, edi
  0049f	47		 inc	 edi
$L14985:

; 981  : 
; 982  :                             }
; 983  :                             if ((Extension->HandFlow.FlowReplace &
; 984  :                                  SERIAL_RTS_MASK) ==
; 985  :                                  SERIAL_TRANSMIT_TOGGLE) {

  004a0	8b 86 78 01 00
	00		 mov	 eax, DWORD PTR [esi+376]
  004a6	66 25 c0 00	 and	 ax, 192			; 000000c0H
  004aa	3c c0		 cmp	 al, 192			; 000000c0H
  004ac	75 68		 jne	 SHORT $L14988

; 986  : 
; 987  :                                 //
; 988  :                                 // We have to raise if we're sending
; 989  :                                 // this character.
; 990  :                                 //
; 991  : 
; 992  :                                 SerialSetRTS(Extension);

  004ae	56		 push	 esi
  004af	e8 00 00 00 00	 call	 _SerialSetRTS@4

; 993  : 
; 994  :                                 if (amountToWrite == 1) {

  004b4	83 ff 01	 cmp	 edi, 1
  004b7	75 23		 jne	 SHORT $L14989

; 995  : 
; 996  :                                     Extension->PerfStats.TransmittedCount++;
; 997  :                                     Extension->WmiPerfData.TransmittedCount++;
; 998  :                                     WRITE_TRANSMIT_HOLDING(
; 999  :                                         Extension->Controller,
; 1000 :                                         *(Extension->WriteCurrentChar)
; 1001 :                                         );

  004b9	8b 86 e4 00 00
	00		 mov	 eax, DWORD PTR [esi+228]
  004bf	ff 86 88 01 00
	00		 inc	 DWORD PTR [esi+392]
  004c5	ff 86 1c 06 00
	00		 inc	 DWORD PTR [esi+1564]
  004cb	8a 00		 mov	 al, BYTE PTR [eax]
  004cd	50		 push	 eax
  004ce	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]
  004d4	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WRITE_PORT_UCHAR@8

; 1002 : 
; 1003 :                                 } else {

  004da	eb 1f		 jmp	 SHORT $L14997
$L14989:

; 1004 : 
; 1005 :                                     Extension->PerfStats.TransmittedCount +=
; 1006 :                                         amountToWrite;

  004dc	01 be 88 01 00
	00		 add	 DWORD PTR [esi+392], edi

; 1007 :                                     Extension->WmiPerfData.TransmittedCount +=
; 1008 :                                        amountToWrite;

  004e2	01 be 1c 06 00
	00		 add	 DWORD PTR [esi+1564], edi

; 1009 :                                     WRITE_TRANSMIT_FIFO_HOLDING(
; 1010 :                                         Extension->Controller,
; 1011 :                                         Extension->WriteCurrentChar,
; 1012 :                                         amountToWrite
; 1013 :                                         );

  004e8	57		 push	 edi
  004e9	ff b6 e4 00 00
	00		 push	 DWORD PTR [esi+228]
  004ef	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]
  004f5	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WRITE_PORT_BUFFER_UCHAR@12
$L14997:

; 1014 : 
; 1015 :                                 }
; 1016 : 
; 1017 :                                 SerialInsertQueueDpc(
; 1018 :                                     &Extension->StartTimerLowerRTSDpc,
; 1019 :                                     NULL,
; 1020 :                                     NULL,
; 1021 :                                     Extension
; 1022 :                                     )?Extension->CountOfTryingToLowerRTS++:0;

  004fb	56		 push	 esi
  004fc	55		 push	 ebp
  004fd	8d 86 4c 03 00
	00		 lea	 eax, DWORD PTR [esi+844]
  00503	55		 push	 ebp
  00504	50		 push	 eax
  00505	e8 00 00 00 00	 call	 _SerialInsertQueueDpc@16
  0050a	84 c0		 test	 al, al
  0050c	74 4f		 je	 SHORT $L15010
  0050e	ff 86 3c 01 00
	00		 inc	 DWORD PTR [esi+316]

; 1023 : 
; 1024 :                             } else {

  00514	eb 47		 jmp	 SHORT $L15010
$L14988:

; 1025 : 
; 1026 :                                 if (amountToWrite == 1) {

  00516	83 ff 01	 cmp	 edi, 1
  00519	75 23		 jne	 SHORT $L15002

; 1027 : 
; 1028 :                                     Extension->PerfStats.TransmittedCount++;
; 1029 :                                     Extension->WmiPerfData.TransmittedCount++;
; 1030 :                                     WRITE_TRANSMIT_HOLDING(
; 1031 :                                         Extension->Controller,
; 1032 :                                         *(Extension->WriteCurrentChar)
; 1033 :                                         );

  0051b	8b 86 e4 00 00
	00		 mov	 eax, DWORD PTR [esi+228]
  00521	ff 86 88 01 00
	00		 inc	 DWORD PTR [esi+392]
  00527	ff 86 1c 06 00
	00		 inc	 DWORD PTR [esi+1564]
  0052d	8a 00		 mov	 al, BYTE PTR [eax]
  0052f	50		 push	 eax
  00530	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]
  00536	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WRITE_PORT_UCHAR@8

; 1034 : 
; 1035 :                                 } else {

  0053c	eb 1f		 jmp	 SHORT $L15010
$L15002:

; 1036 : 
; 1037 :                                     Extension->PerfStats.TransmittedCount +=
; 1038 :                                         amountToWrite;

  0053e	01 be 88 01 00
	00		 add	 DWORD PTR [esi+392], edi

; 1039 :                                     Extension->WmiPerfData.TransmittedCount +=
; 1040 :                                         amountToWrite;

  00544	01 be 1c 06 00
	00		 add	 DWORD PTR [esi+1564], edi

; 1041 :                                     WRITE_TRANSMIT_FIFO_HOLDING(
; 1042 :                                         Extension->Controller,
; 1043 :                                         Extension->WriteCurrentChar,
; 1044 :                                         amountToWrite
; 1045 :                                         );

  0054a	57		 push	 edi
  0054b	ff b6 e4 00 00
	00		 push	 DWORD PTR [esi+228]
  00551	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]
  00557	ff 15 00 00 00
	00		 call	 DWORD PTR __imp__WRITE_PORT_BUFFER_UCHAR@12
$L15010:

; 1046 : 
; 1047 :                                 }
; 1048 : 
; 1049 :                             }
; 1050 : 
; 1051 :                             Extension->HoldingEmpty = FALSE;

  0055d	80 a6 a0 01 00
	00 00		 and	 BYTE PTR [esi+416], 0

; 1052 :                             Extension->WriteCurrentChar += amountToWrite;

  00564	01 be e4 00 00
	00		 add	 DWORD PTR [esi+228], edi

; 1053 :                             Extension->WriteLength -= amountToWrite;

  0056a	29 be e0 00 00
	00		 sub	 DWORD PTR [esi+224], edi

; 1054 : 
; 1055 :                             if (!Extension->WriteLength) {

  00570	0f 85 62 fc ff
	ff		 jne	 $L14871

; 1056 : 
; 1057 :                                 PIO_STACK_LOCATION IrpSp;
; 1058 :                                 //
; 1059 :                                 // No More characters left.  This
; 1060 :                                 // write is complete.  Take care
; 1061 :                                 // when updating the information field,
; 1062 :                                 // we could have an xoff counter masquerading
; 1063 :                                 // as a write irp.
; 1064 :                                 //
; 1065 : 
; 1066 :                                 IrpSp = IoGetCurrentIrpStackLocation(
; 1067 :                                             Extension->CurrentWriteIrp
; 1068 :                                             );

  00576	8b 86 c8 00 00
	00		 mov	 eax, DWORD PTR [esi+200]
  0057c	8b 48 60	 mov	 ecx, DWORD PTR [eax+96]

; 1069 : 
; 1070 :                                 Extension->CurrentWriteIrp->
; 1071 :                                     IoStatus.Information =
; 1072 :                                     (IrpSp->MajorFunction == IRP_MJ_WRITE)?
; 1073 :                                         (IrpSp->Parameters.Write.Length):
; 1074 :                                         (1);

  0057f	80 39 04	 cmp	 BYTE PTR [ecx], 4
  00582	75 05		 jne	 SHORT $L15211
  00584	8b 49 04	 mov	 ecx, DWORD PTR [ecx+4]
  00587	eb 03		 jmp	 SHORT $L15212
$L15211:
  00589	33 c9		 xor	 ecx, ecx
  0058b	41		 inc	 ecx
$L15212:
  0058c	89 48 1c	 mov	 DWORD PTR [eax+28], ecx

; 1075 : 
; 1076 :                                 SerialInsertQueueDpc(
; 1077 :                                     &Extension->CompleteWriteDpc,
; 1078 :                                     NULL,
; 1079 :                                     NULL,
; 1080 :                                     Extension
; 1081 :                                     );

  0058f	8d 86 ec 01 00
	00		 lea	 eax, DWORD PTR [esi+492]

; 1082 : 
; 1083 :                             }
; 1084 : 
; 1085 :                         }
; 1086 : 
; 1087 :                     }
; 1088 : 
; 1089 :                     break;

  00595	e9 cc fe ff ff	 jmp	 $L15244
$L14852:

; 425  : 
; 426  : 
; 427  :         //
; 428  :         // We got an interrupt with the device being closed or when the
; 429  :         // device is supposed to be powered down.  This
; 430  :         // is not unlikely with a serial device.  We just quietly
; 431  :         // keep servicing the causes until it calms down.
; 432  :         //
; 433  : 
; 434  :         ServicedAnInterrupt = TRUE;

  0059a	c6 44 24 1c 01	 mov	 BYTE PTR _ServicedAnInterrupt$[esp+16], 1
$L14853:

; 435  :         do {
; 436  : 
; 437  :             InterruptIdReg &= (~SERIAL_IIR_FIFOS_ENABLED);

  0059f	83 e3 3f	 and	 ebx, 63			; 0000003fH

; 438  :             switch (InterruptIdReg) {

  005a2	2b dd		 sub	 ebx, ebp
  005a4	74 2d		 je	 SHORT $L14865
  005a6	4b		 dec	 ebx
  005a7	4b		 dec	 ebx
  005a8	74 20		 je	 SHORT $L14864
  005aa	4b		 dec	 ebx
  005ab	4b		 dec	 ebx
  005ac	74 09		 je	 SHORT $L14862
  005ae	4b		 dec	 ebx
  005af	4b		 dec	 ebx
  005b0	74 0d		 je	 SHORT $L14860
  005b2	83 eb 06	 sub	 ebx, 6
  005b5	75 28		 jne	 SHORT $L14854
$L14862:

; 444  : 
; 445  :                 }
; 446  : 
; 447  :                 case SERIAL_IIR_RDA:
; 448  :                 case SERIAL_IIR_CTI: {
; 449  : 
; 450  : 
; 451  :                     READ_RECEIVE_BUFFER(Extension->Controller);

  005b7	ff b6 98 00 00
	00		 push	 DWORD PTR [esi+152]

; 452  :                     break;

  005bd	eb 1e		 jmp	 SHORT $L15246
$L14860:

; 439  : 
; 440  :                 case SERIAL_IIR_RLS: {
; 441  : 
; 442  :                     READ_LINE_STATUS(Extension->Controller);

  005bf	8b 86 98 00 00
	00		 mov	 eax, DWORD PTR [esi+152]
  005c5	83 c0 05	 add	 eax, 5

; 443  :                     break;

⌨️ 快捷键说明

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