list.cod
来自「模拟电梯程序」· COD 代码 · 共 1,647 行 · 第 1/4 页
COD
1,647 行
00088 8b 55 f8 mov edx, DWORD PTR _curruntptr$[ebp]
0008b 8b 45 fc mov eax, DWORD PTR _newptr$[ebp]
0008e 89 42 08 mov DWORD PTR [edx+8], eax
$L52997:
; 166 : else
00091 eb 0d jmp SHORT $L53002
$L52990:
; 167 : printf("输入错误,请重新输入。\n");
00093 68 00 00 00 00 push OFFSET FLAT:??_C@_0BH@CIGK@?J?d?H?k?$LE?m?N?s?0?G?k?V?X?P?B?J?d?H?k?$KB?$KD?6?$AA@ ; `string'
00098 e8 00 00 00 00 call _printf
0009d 83 c4 04 add esp, 4
$L53002:
; 168 : }
000a0 5f pop edi
000a1 5e pop esi
000a2 5b pop ebx
000a3 83 c4 48 add esp, 72 ; 00000048H
000a6 3b ec cmp ebp, esp
000a8 e8 00 00 00 00 call __chkesp
000ad 8b e5 mov esp, ebp
000af 5d pop ebp
000b0 c3 ret 0
_Storenode ENDP
_TEXT ENDS
PUBLIC _Deletenode
EXTRN _free:NEAR
EXTRN _State:DWORD
EXTRN _CurrentDirection:DWORD
; COMDAT _Deletenode
_TEXT SEGMENT
_startPtr$ = 8
_previousptr$ = -4
_currentptr$ = -8
_tempptr$ = -12
_Deletenode PROC NEAR ; COMDAT
; 173 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 83 ec 4c sub esp, 76 ; 0000004cH
00006 53 push ebx
00007 56 push esi
00008 57 push edi
00009 8d 7d b4 lea edi, DWORD PTR [ebp-76]
0000c b9 13 00 00 00 mov ecx, 19 ; 00000013H
00011 b8 cc cc cc cc mov eax, -858993460 ; ccccccccH
00016 f3 ab rep stosd
; 174 : CALLPTR previousptr, currentptr, tempptr;
; 175 : n3=0;
00018 c7 05 00 00 00
00 00 00 00 00 mov DWORD PTR _n3, 0
; 176 :
; 177 : if(*startPtr!=NULL){
00022 8b 45 08 mov eax, DWORD PTR _startPtr$[ebp]
00025 83 38 00 cmp DWORD PTR [eax], 0
00028 0f 84 04 04 00
00 je $L53071
; 178 : if(CurrentDirection==1){//如果电梯正在上行
0002e 83 3d 00 00 00
00 01 cmp DWORD PTR _CurrentDirection, 1
00035 0f 85 fe 01 00
00 jne $L53012
$L53015:
; 179 : while(State==1&&(*startPtr!=NULL)&&(StatusFloor==(*startPtr)->CallFloor)&&
; 180 : ((*startPtr)->CallDirection==1||(*startPtr)->CallDirection==0)){//若为头结点
0003b 83 3d 00 00 00
00 01 cmp DWORD PTR _State, 1
00042 75 71 jne SHORT $L53016
00044 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
00047 83 39 00 cmp DWORD PTR [ecx], 0
0004a 74 69 je SHORT $L53016
0004c 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
0004f 8b 02 mov eax, DWORD PTR [edx]
00051 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
00057 3b 48 04 cmp ecx, DWORD PTR [eax+4]
0005a 75 59 jne SHORT $L53016
0005c 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
0005f 8b 02 mov eax, DWORD PTR [edx]
00061 83 38 01 cmp DWORD PTR [eax], 1
00064 74 0a je SHORT $L53017
00066 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
00069 8b 11 mov edx, DWORD PTR [ecx]
0006b 83 3a 00 cmp DWORD PTR [edx], 0
0006e 75 45 jne SHORT $L53016
$L53017:
; 181 :
; 182 : if((*startPtr)->CallDirection==1)
00070 8b 45 08 mov eax, DWORD PTR _startPtr$[ebp]
00073 8b 08 mov ecx, DWORD PTR [eax]
00075 83 39 01 cmp DWORD PTR [ecx], 1
00078 75 0a jne SHORT $L53018
; 183 : n3=1;
0007a c7 05 00 00 00
00 01 00 00 00 mov DWORD PTR _n3, 1
$L53018:
; 184 : tempptr=(*startPtr);
00084 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
00087 8b 02 mov eax, DWORD PTR [edx]
00089 89 45 f4 mov DWORD PTR _tempptr$[ebp], eax
; 185 : ControlCallFlash(tempptr, FALSE);
0008c 6a 00 push 0
0008e 8b 4d f4 mov ecx, DWORD PTR _tempptr$[ebp]
00091 51 push ecx
00092 e8 00 00 00 00 call _ControlCallFlash
00097 83 c4 08 add esp, 8
; 186 : *startPtr=(*startPtr)->Nextptr;
0009a 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
0009d 8b 02 mov eax, DWORD PTR [edx]
0009f 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
000a2 8b 50 08 mov edx, DWORD PTR [eax+8]
000a5 89 11 mov DWORD PTR [ecx], edx
; 187 : free(tempptr);
000a7 8b 45 f4 mov eax, DWORD PTR _tempptr$[ebp]
000aa 50 push eax
000ab e8 00 00 00 00 call _free
000b0 83 c4 04 add esp, 4
; 188 : }
000b3 eb 86 jmp SHORT $L53015
$L53016:
; 189 : if(*startPtr!=NULL){
000b5 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
000b8 83 39 00 cmp DWORD PTR [ecx], 0
000bb 0f 84 8f 00 00
00 je $L53024
; 190 : currentptr=(*startPtr)->Nextptr;
000c1 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
000c4 8b 02 mov eax, DWORD PTR [edx]
000c6 8b 48 08 mov ecx, DWORD PTR [eax+8]
000c9 89 4d f8 mov DWORD PTR _currentptr$[ebp], ecx
; 191 : previousptr=*startPtr;
000cc 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
000cf 8b 02 mov eax, DWORD PTR [edx]
000d1 89 45 fc mov DWORD PTR _previousptr$[ebp], eax
$L53023:
; 192 : while(currentptr!=NULL){
000d4 83 7d f8 00 cmp DWORD PTR _currentptr$[ebp], 0
000d8 74 76 je SHORT $L53024
; 193 : if((currentptr->CallFloor==StatusFloor)&&State==1&&
; 194 : (currentptr->CallDirection==1||currentptr->CallDirection==0)){
000da 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
000dd 8b 51 04 mov edx, DWORD PTR [ecx+4]
000e0 3b 15 00 00 00
00 cmp edx, DWORD PTR _StatusFloor
000e6 75 57 jne SHORT $L53025
000e8 83 3d 00 00 00
00 01 cmp DWORD PTR _State, 1
000ef 75 4e jne SHORT $L53025
000f1 8b 45 f8 mov eax, DWORD PTR _currentptr$[ebp]
000f4 83 38 01 cmp DWORD PTR [eax], 1
000f7 74 08 je SHORT $L53026
000f9 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
000fc 83 39 00 cmp DWORD PTR [ecx], 0
000ff 75 3e jne SHORT $L53025
$L53026:
; 195 : // if(currentptr->CallDirection==1)
; 196 : n3=1;
00101 c7 05 00 00 00
00 01 00 00 00 mov DWORD PTR _n3, 1
; 197 : tempptr=currentptr;
0010b 8b 55 f8 mov edx, DWORD PTR _currentptr$[ebp]
0010e 89 55 f4 mov DWORD PTR _tempptr$[ebp], edx
; 198 : ControlCallFlash(tempptr, FALSE);
00111 6a 00 push 0
00113 8b 45 f4 mov eax, DWORD PTR _tempptr$[ebp]
00116 50 push eax
00117 e8 00 00 00 00 call _ControlCallFlash
0011c 83 c4 08 add esp, 8
; 199 : currentptr=currentptr->Nextptr;
0011f 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
00122 8b 51 08 mov edx, DWORD PTR [ecx+8]
00125 89 55 f8 mov DWORD PTR _currentptr$[ebp], edx
; 200 : previousptr->Nextptr=currentptr;
00128 8b 45 fc mov eax, DWORD PTR _previousptr$[ebp]
0012b 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
0012e 89 48 08 mov DWORD PTR [eax+8], ecx
; 201 : free(tempptr);
00131 8b 55 f4 mov edx, DWORD PTR _tempptr$[ebp]
00134 52 push edx
00135 e8 00 00 00 00 call _free
0013a 83 c4 04 add esp, 4
; 203 : else{
0013d eb 0f jmp SHORT $L53027
$L53025:
; 204 : previousptr=currentptr;
0013f 8b 45 f8 mov eax, DWORD PTR _currentptr$[ebp]
00142 89 45 fc mov DWORD PTR _previousptr$[ebp], eax
; 205 : currentptr=currentptr->Nextptr;
00145 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
00148 8b 51 08 mov edx, DWORD PTR [ecx+8]
0014b 89 55 f8 mov DWORD PTR _currentptr$[ebp], edx
$L53027:
; 207 : }
0014e eb 84 jmp SHORT $L53023
$L53024:
; 209 : if(n3==0){
00150 83 3d 00 00 00
00 00 cmp DWORD PTR _n3, 0
00157 0f 85 d7 00 00
00 jne $L53040
; 210 : if(*startPtr!=NULL){
0015d 8b 45 08 mov eax, DWORD PTR _startPtr$[ebp]
00160 83 38 00 cmp DWORD PTR [eax], 0
00163 74 52 je SHORT $L53034
$L53033:
; 211 : while(State==1&&(*startPtr!=NULL)&&(StatusFloor==(*startPtr)->CallFloor)){//若为头结点
00165 83 3d 00 00 00
00 01 cmp DWORD PTR _State, 1
0016c 75 49 jne SHORT $L53034
0016e 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
00171 83 39 00 cmp DWORD PTR [ecx], 0
00174 74 41 je SHORT $L53034
00176 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
00179 8b 02 mov eax, DWORD PTR [edx]
0017b 8b 0d 00 00 00
00 mov ecx, DWORD PTR _StatusFloor
00181 3b 48 04 cmp ecx, DWORD PTR [eax+4]
00184 75 31 jne SHORT $L53034
; 212 : tempptr=(*startPtr);
00186 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
00189 8b 02 mov eax, DWORD PTR [edx]
0018b 89 45 f4 mov DWORD PTR _tempptr$[ebp], eax
; 213 : ControlCallFlash(tempptr, FALSE);
0018e 6a 00 push 0
00190 8b 4d f4 mov ecx, DWORD PTR _tempptr$[ebp]
00193 51 push ecx
00194 e8 00 00 00 00 call _ControlCallFlash
00199 83 c4 08 add esp, 8
; 214 : *startPtr=(*startPtr)->Nextptr;
0019c 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
0019f 8b 02 mov eax, DWORD PTR [edx]
001a1 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
001a4 8b 50 08 mov edx, DWORD PTR [eax+8]
001a7 89 11 mov DWORD PTR [ecx], edx
; 215 : free(tempptr);
001a9 8b 45 f4 mov eax, DWORD PTR _tempptr$[ebp]
001ac 50 push eax
001ad e8 00 00 00 00 call _free
001b2 83 c4 04 add esp, 4
; 216 : }
001b5 eb ae jmp SHORT $L53033
$L53034:
; 218 : if(*startPtr!=NULL){
001b7 8b 4d 08 mov ecx, DWORD PTR _startPtr$[ebp]
001ba 83 39 00 cmp DWORD PTR [ecx], 0
001bd 74 75 je SHORT $L53040
; 219 : currentptr=(*startPtr)->Nextptr;
001bf 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
001c2 8b 02 mov eax, DWORD PTR [edx]
001c4 8b 48 08 mov ecx, DWORD PTR [eax+8]
001c7 89 4d f8 mov DWORD PTR _currentptr$[ebp], ecx
; 220 : previousptr=*startPtr;
001ca 8b 55 08 mov edx, DWORD PTR _startPtr$[ebp]
001cd 8b 02 mov eax, DWORD PTR [edx]
001cf 89 45 fc mov DWORD PTR _previousptr$[ebp], eax
$L53039:
; 221 : while(currentptr!=NULL){
001d2 83 7d f8 00 cmp DWORD PTR _currentptr$[ebp], 0
001d6 74 5c je SHORT $L53040
; 222 : if((currentptr->CallFloor==StatusFloor)&&State==1){
001d8 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
001db 8b 51 04 mov edx, DWORD PTR [ecx+4]
001de 3b 15 00 00 00
00 cmp edx, DWORD PTR _StatusFloor
001e4 75 3d jne SHORT $L53041
001e6 83 3d 00 00 00
00 01 cmp DWORD PTR _State, 1
001ed 75 34 jne SHORT $L53041
; 223 : tempptr=currentptr;
001ef 8b 45 f8 mov eax, DWORD PTR _currentptr$[ebp]
001f2 89 45 f4 mov DWORD PTR _tempptr$[ebp], eax
; 224 : ControlCallFlash(tempptr, FALSE);
001f5 6a 00 push 0
001f7 8b 4d f4 mov ecx, DWORD PTR _tempptr$[ebp]
001fa 51 push ecx
001fb e8 00 00 00 00 call _ControlCallFlash
00200 83 c4 08 add esp, 8
; 225 : currentptr=currentptr->Nextptr;
00203 8b 55 f8 mov edx, DWORD PTR _currentptr$[ebp]
00206 8b 42 08 mov eax, DWORD PTR [edx+8]
00209 89 45 f8 mov DWORD PTR _currentptr$[ebp], eax
; 226 : previousptr->Nextptr=currentptr;
0020c 8b 4d fc mov ecx, DWORD PTR _previousptr$[ebp]
0020f 8b 55 f8 mov edx, DWORD PTR _currentptr$[ebp]
00212 89 51 08 mov DWORD PTR [ecx+8], edx
; 227 : free(tempptr);
00215 8b 45 f4 mov eax, DWORD PTR _tempptr$[ebp]
00218 50 push eax
00219 e8 00 00 00 00 call _free
0021e 83 c4 04 add esp, 4
; 229 : else{
00221 eb 0f jmp SHORT $L53042
$L53041:
; 230 : previousptr=currentptr;
00223 8b 4d f8 mov ecx, DWORD PTR _currentptr$[ebp]
00226 89 4d fc mov DWORD PTR _previousptr$[ebp], ecx
; 231 : currentptr=currentptr->Nextptr;
00229 8b 55 f8 mov edx, DWORD PTR _currentptr$[ebp]
0022c 8b 42 08 mov eax, DWORD PTR [edx+8]
0022f 89 45 f8 mov DWORD PTR _currentptr$[ebp], eax
$L53042:
; 233 : }
00232 eb 9e jmp SHORT $L53039
$L53040:
; 237 : else{
00234 e9 f9 01 00 00 jmp $L53071
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?