outputflash.cod
来自「模拟电梯程序」· COD 代码 · 共 1,756 行 · 第 1/4 页
COD
1,756 行
0000c b9 12 00 00 00 mov ecx, 18 ; 00000012H
00011 b8 cc cc cc cc mov eax, -858993460 ; ccccccccH
00016 f3 ab rep stosd
; 157 : int i, j;
; 158 : static int lastfloor=1;
; 159 :
; 160 : if(State==0||State==1){
00018 83 3d 00 00 00
00 00 cmp DWORD PTR _State, 0
0001f 74 0d je SHORT $L53018
00021 83 3d 00 00 00
00 01 cmp DWORD PTR _State, 1
00028 0f 85 9c 00 00
00 jne $L53017
$L53018:
; 161 : SetActiveEgg(hEggs[44]);
0002e a1 b0 00 00 00 mov eax, DWORD PTR _hEggs+176
00033 50 push eax
00034 e8 00 00 00 00 call _SetActiveEgg
00039 83 c4 04 add esp, 4
; 162 : ShowEgg (0);
0003c 6a 00 push 0
0003e e8 00 00 00 00 call _ShowEgg
00043 83 c4 04 add esp, 4
; 163 : SetActiveEgg(hEggs[45]);
00046 8b 0d b4 00 00
00 mov ecx, DWORD PTR _hEggs+180
0004c 51 push ecx
0004d e8 00 00 00 00 call _SetActiveEgg
00052 83 c4 04 add esp, 4
; 164 : ShowEgg (0);
00055 6a 00 push 0
00057 e8 00 00 00 00 call _ShowEgg
0005c 83 c4 04 add esp, 4
; 165 :
; 166 : if (StatusFloor!=lastfloor) {
0005f 8b 15 00 00 00
00 mov edx, DWORD PTR _StatusFloor
00065 3b 15 00 00 00
00 cmp edx, DWORD PTR _?lastfloor@?1??ControlFlash@@9@9
0006b 74 4b je SHORT $L53019
; 167 : SetActiveEgg(hEggs[34+lastfloor]);
0006d a1 00 00 00 00 mov eax, DWORD PTR _?lastfloor@?1??ControlFlash@@9@9
00072 8b 0c 85 88 00
00 00 mov ecx, DWORD PTR _hEggs[eax*4+136]
00079 51 push ecx
0007a e8 00 00 00 00 call _SetActiveEgg
0007f 83 c4 04 add esp, 4
; 168 : ShowEgg (0);
00082 6a 00 push 0
00084 e8 00 00 00 00 call _ShowEgg
00089 83 c4 04 add esp, 4
; 169 : SetActiveEgg(hEggs[34+StatusFloor]);
0008c 8b 15 00 00 00
00 mov edx, DWORD PTR _StatusFloor
00092 8b 04 95 88 00
00 00 mov eax, DWORD PTR _hEggs[edx*4+136]
00099 50 push eax
0009a e8 00 00 00 00 call _SetActiveEgg
0009f 83 c4 04 add esp, 4
; 170 : ShowEgg (1);
000a2 6a 01 push 1
000a4 e8 00 00 00 00 call _ShowEgg
000a9 83 c4 04 add esp, 4
; 171 : lastfloor = StatusFloor;
000ac 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
000b2 89 0d 00 00 00
00 mov DWORD PTR _?lastfloor@?1??ControlFlash@@9@9, ecx
$L53019:
; 173 : WaitFor(835);
000b8 68 43 03 00 00 push 835 ; 00000343H
000bd e8 00 00 00 00 call _WaitFor
000c2 83 c4 04 add esp, 4
; 175 : else{
000c5 e9 64 01 00 00 jmp $L53028
$L53017:
; 176 : if(CurrentDirection==1){
000ca 83 3d 00 00 00
00 01 cmp DWORD PTR _CurrentDirection, 1
000d1 0f 85 9f 00 00
00 jne $L53021
; 177 : SetActiveEgg(hEggs[45]);
000d7 8b 15 b4 00 00
00 mov edx, DWORD PTR _hEggs+180
000dd 52 push edx
000de e8 00 00 00 00 call _SetActiveEgg
000e3 83 c4 04 add esp, 4
; 178 : ShowEgg (0);
000e6 6a 00 push 0
000e8 e8 00 00 00 00 call _ShowEgg
000ed 83 c4 04 add esp, 4
; 179 : SetActiveEgg(hEggs[44]);
000f0 a1 b0 00 00 00 mov eax, DWORD PTR _hEggs+176
000f5 50 push eax
000f6 e8 00 00 00 00 call _SetActiveEgg
000fb 83 c4 04 add esp, 4
; 180 : ShowEgg (1);
000fe 6a 01 push 1
00100 e8 00 00 00 00 call _ShowEgg
00105 83 c4 04 add esp, 4
; 181 : SetActiveEgg(hEggs[34+StatusFloor]);
00108 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
0010e 8b 14 8d 88 00
00 00 mov edx, DWORD PTR _hEggs[ecx*4+136]
00115 52 push edx
00116 e8 00 00 00 00 call _SetActiveEgg
0011b 83 c4 04 add esp, 4
; 182 : ShowEgg (1);
0011e 6a 01 push 1
00120 e8 00 00 00 00 call _ShowEgg
00125 83 c4 04 add esp, 4
; 183 : for(i=1;i<=8;i++){
00128 c7 45 fc 01 00
00 00 mov DWORD PTR _i$[ebp], 1
0012f eb 09 jmp SHORT $L53022
$L53023:
00131 8b 45 fc mov eax, DWORD PTR _i$[ebp]
00134 83 c0 01 add eax, 1
00137 89 45 fc mov DWORD PTR _i$[ebp], eax
$L53022:
0013a 83 7d fc 08 cmp DWORD PTR _i$[ebp], 8
0013e 7f 31 jg SHORT $L53024
; 184 : SetActiveEgg(hEggs[1]);
00140 8b 0d 04 00 00
00 mov ecx, DWORD PTR _hEggs+4
00146 51 push ecx
00147 e8 00 00 00 00 call _SetActiveEgg
0014c 83 c4 04 add esp, 4
; 185 : OffsetEgg(0, 0.1375);
0014f 68 99 99 c1 3f push 1069652377 ; 3fc19999H
00154 68 9a 99 99 99 push -1717986918 ; 9999999aH
00159 6a 00 push 0
0015b 6a 00 push 0
0015d e8 00 00 00 00 call _OffsetEgg
00162 83 c4 10 add esp, 16 ; 00000010H
; 186 : WaitFor(104);
00165 6a 68 push 104 ; 00000068H
00167 e8 00 00 00 00 call _WaitFor
0016c 83 c4 04 add esp, 4
; 187 : }
0016f eb c0 jmp SHORT $L53023
$L53024:
; 189 : else{
00171 e9 b8 00 00 00 jmp $L53028
$L53021:
; 190 : SetActiveEgg(hEggs[44]);
00176 8b 15 b0 00 00
00 mov edx, DWORD PTR _hEggs+176
0017c 52 push edx
0017d e8 00 00 00 00 call _SetActiveEgg
00182 83 c4 04 add esp, 4
; 191 : ShowEgg (0);
00185 6a 00 push 0
00187 e8 00 00 00 00 call _ShowEgg
0018c 83 c4 04 add esp, 4
; 192 : SetActiveEgg(hEggs[45]);
0018f a1 b4 00 00 00 mov eax, DWORD PTR _hEggs+180
00194 50 push eax
00195 e8 00 00 00 00 call _SetActiveEgg
0019a 83 c4 04 add esp, 4
; 193 : ShowEgg (1);
0019d 6a 01 push 1
0019f e8 00 00 00 00 call _ShowEgg
001a4 83 c4 04 add esp, 4
; 194 : SetActiveEgg(hEggs[34+StatusFloor+1]);
001a7 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
001ad 8b 14 8d 8c 00
00 00 mov edx, DWORD PTR _hEggs[ecx*4+140]
001b4 52 push edx
001b5 e8 00 00 00 00 call _SetActiveEgg
001ba 83 c4 04 add esp, 4
; 195 : ShowEgg (0);
001bd 6a 00 push 0
001bf e8 00 00 00 00 call _ShowEgg
001c4 83 c4 04 add esp, 4
; 196 : SetActiveEgg(hEggs[34+StatusFloor]);
001c7 a1 00 00 00 00 mov eax, DWORD PTR _StatusFloor
001cc 8b 0c 85 88 00
00 00 mov ecx, DWORD PTR _hEggs[eax*4+136]
001d3 51 push ecx
001d4 e8 00 00 00 00 call _SetActiveEgg
001d9 83 c4 04 add esp, 4
; 197 : ShowEgg (1);
001dc 6a 01 push 1
001de e8 00 00 00 00 call _ShowEgg
001e3 83 c4 04 add esp, 4
; 198 : for(i=1;i<=8;i++){
001e6 c7 45 fc 01 00
00 00 mov DWORD PTR _i$[ebp], 1
001ed eb 09 jmp SHORT $L53026
$L53027:
001ef 8b 55 fc mov edx, DWORD PTR _i$[ebp]
001f2 83 c2 01 add edx, 1
001f5 89 55 fc mov DWORD PTR _i$[ebp], edx
$L53026:
001f8 83 7d fc 08 cmp DWORD PTR _i$[ebp], 8
001fc 7f 30 jg SHORT $L53028
; 199 : SetActiveEgg(hEggs[1]);
001fe a1 04 00 00 00 mov eax, DWORD PTR _hEggs+4
00203 50 push eax
00204 e8 00 00 00 00 call _SetActiveEgg
00209 83 c4 04 add esp, 4
; 200 : OffsetEgg(0, -0.1375);
0020c 68 99 99 c1 bf push -1077831271 ; bfc19999H
00211 68 9a 99 99 99 push -1717986918 ; 9999999aH
00216 6a 00 push 0
00218 6a 00 push 0
0021a e8 00 00 00 00 call _OffsetEgg
0021f 83 c4 10 add esp, 16 ; 00000010H
; 201 : WaitFor(104);
00222 6a 68 push 104 ; 00000068H
00224 e8 00 00 00 00 call _WaitFor
00229 83 c4 04 add esp, 4
; 202 : }
0022c eb c1 jmp SHORT $L53027
$L53028:
; 206 : lastfloor=StatusFloor;
0022e 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
00234 89 0d 00 00 00
00 mov DWORD PTR _?lastfloor@?1??ControlFlash@@9@9, ecx
; 207 : }
0023a 5f pop edi
0023b 5e pop esi
0023c 5b pop ebx
0023d 83 c4 48 add esp, 72 ; 00000048H
00240 3b ec cmp ebp, esp
00242 e8 00 00 00 00 call __chkesp
00247 8b e5 mov esp, ebp
00249 5d pop ebp
0024a c3 ret 0
_ControlFlash ENDP
_TEXT ENDS
PUBLIC _ControlCallFlash
; COMDAT _ControlCallFlash
_TEXT SEGMENT
_Newptr$ = 8
_isLighted$ = 12
_ControlCallFlash PROC NEAR ; COMDAT
; 210 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 44 sub esp, 68 ; 00000044H
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 8d 7d bc lea edi, DWORD PTR [ebp-68]
0000c b9 11 00 00 00 mov ecx, 17 ; 00000011H
00011 b8 cc cc cc cc mov eax, -858993460 ; ccccccccH
00016 f3 ab rep stosd
; 211 :
; 212 : if(Newptr!=NULL){
00018 83 7d 08 00 cmp DWORD PTR _Newptr$[ebp], 0
0001c 0f 84 86 00 00
00 je $L53037
; 213 : switch(Newptr->CallDirection){
00022 8b 45 08 mov eax, DWORD PTR _Newptr$[ebp]
00025 8b 08 mov ecx, DWORD PTR [eax]
00027 89 4d fc mov DWORD PTR -4+[ebp], ecx
0002a 83 7d fc 00 cmp DWORD PTR -4+[ebp], 0
0002e 74 0e je SHORT $L53040
00030 83 7d fc 01 cmp DWORD PTR -4+[ebp], 1
00034 74 2c je SHORT $L53041
00036 83 7d fc 02 cmp DWORD PTR -4+[ebp], 2
0003a 74 4a je SHORT $L53042
0003c eb 6a jmp SHORT $L53037
$L53040:
; 214 : case 0:
; 215 : SetActiveEgg(hEggs[Newptr->CallFloor+54]);
0003e 8b 55 08 mov edx, DWORD PTR _Newptr$[ebp]
00041 8b 42 04 mov eax, DWORD PTR [edx+4]
00044 8b 0c 85 d8 00
00 00 mov ecx, DWORD PTR _hEggs[eax*4+216]
0004b 51 push ecx
0004c e8 00 00 00 00 call _SetActiveEgg
00051 83 c4 04 add esp, 4
; 216 : ShowEgg (isLighted);
00054 8b 55 0c mov edx, DWORD PTR _isLighted$[ebp]
00057 52 push edx
00058 e8 00 00 00 00 call _ShowEgg
0005d 83 c4 04 add esp, 4
; 217 : break;
00060 eb 46 jmp SHORT $L53037
$L53041:
; 218 : case 1:
; 219 : SetActiveEgg(hEggs[Newptr->CallFloor+10]);
00062 8b 45 08 mov eax, DWORD PTR _Newptr$[ebp]
00065 8b 48 04 mov ecx, DWORD PTR [eax+4]
00068 8b 14 8d 28 00
00 00 mov edx, DWORD PTR _hEggs[ecx*4+40]
0006f 52 push edx
00070 e8 00 00 00 00 call _SetActiveEgg
00075 83 c4 04 add esp, 4
; 220 : ShowEgg (isLighted);
00078 8b 45 0c mov eax, DWORD PTR _isLighted$[ebp]
0007b 50 push eax
0007c e8 00 00 00 00 call _ShowEgg
00081 83 c4 04 add esp, 4
; 221 : break;
00084 eb 22 jmp SHORT $L53037
$L53042:
; 222 : case 2:
; 223 : SetActiveEgg(hEggs[Newptr->CallFloor+25]);
00086 8b 4d 08 mov ecx, DWORD PTR _Newptr$[ebp]
00089 8b 51 04 mov edx, DWORD PTR [ecx+4]
0008c 8b 04 95 64 00
00 00 mov eax, DWORD PTR _hEggs[edx*4+100]
00093 50 push eax
00094 e8 00 00 00 00 call _SetActiveEgg
00099 83 c4 04 add esp, 4
; 224 : ShowEgg (isLighted);
0009c 8b 4d 0c mov ecx, DWORD PTR _isLighted$[ebp]
0009f 51 push ecx
000a0 e8 00 00 00 00 call _ShowEgg
000a5 83 c4 04 add esp, 4
$L53037:
; 229 : }
000a8 5f pop edi
000a9 5e pop esi
000aa 5b pop ebx
000ab 83 c4 44 add esp, 68 ; 00000044H
000ae 3b ec cmp ebp, esp
000b0 e8 00 00 00 00 call __chkesp
000b5 8b e5 mov esp, ebp
000b7 5d pop ebp
000b8 c3 ret 0
_ControlCallFlash ENDP
_TEXT ENDS
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?