Changeset 36 in dev
- Timestamp:
- Jan 20, 2007, 4:55:26 AM (18 years ago)
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler32/CParameter.cpp
r31 r36 658 658 ParmSize+=sizeof(long); 659 659 } 660 else if(DummyTypeInfo.type==DEF_CHAR||DummyTypeInfo.type==DEF_BYTE ){660 else if(DummyTypeInfo.type==DEF_CHAR||DummyTypeInfo.type==DEF_BYTE||DummyTypeInfo.type==DEF_BOOLEAN){ 661 661 ChangeTypeToByte(CalcType); 662 662 ParmSize+=sizeof(long); -
BasicCompiler32/Compile_Calc.cpp
r28 r36 318 318 void ChangeTypeToInteger(int OldType){ 319 319 //現在のスタックの内容をInteger型に変換する 320 if(OldType==DEF_BYTE|| 320 if(OldType==DEF_BOOLEAN|| 321 OldType==DEF_BYTE|| 321 322 OldType==DEF_WORD||OldType==DEF_INTEGER) return; 322 323 else if(OldType==DEF_CHAR){ … … 567 568 ///////////////////////////////////////////////// 568 569 569 if(VarType==DEF_CHAR||VarType==DEF_BYTE){ 570 if(VarType==DEF_BOOLEAN){ 571 //bool 572 SetBooleanVariable(CalcType,&VarRelativeVar); 573 } 574 else if(VarType==DEF_CHAR||VarType==DEF_BYTE){ 570 575 //8ビット整数型変数へスタックの内容を格納する 571 576 Set8Variable(CalcType,VarRelativeVar.dwKind,VarRelativeVar.offset,VarRelativeVar.bOffsetOffset); -
BasicCompiler32/Compile_ProcOp.cpp
r34 r36 777 777 obp+=sizeof(long); 778 778 } 779 else if(i3==DEF_CHAR||i3==DEF_BYTE ){779 else if(i3==DEF_CHAR||i3==DEF_BYTE||i3==DEF_BOOLEAN){ 780 780 //xor eax,eax(eaxを0に初期化する) 781 781 op_zero_reg(REG_EAX); -
BasicCompiler32/Compile_Set_Var.cpp
r28 r36 874 874 } 875 875 } 876 void SetBooleanVariable(int type,RELATIVE_VAR *pRelative){ 877 if(type==DEF_DOUBLE){ 878 // TODO: 実装 879 } 880 else if(type==DEF_SINGLE){ 881 // TODO: 実装 882 } 883 else if(type==DEF_INT64||type==DEF_QWORD){ 884 // TODO: 実装 885 886 //pop eax 887 op_pop(REG_EAX); 888 889 //cmp eax,0 890 op_cmp_value(GetTypeSize(type,-1),REG_EAX,0); 891 892 //setne al 893 op_setne( REG_EAX ); 894 895 //pop ecx 896 op_pop(REG_ECX); 897 898 //cmp ecx,0 899 op_cmp_value(GetTypeSize(type,-1),REG_ECX,0); 900 901 //setne cl 902 op_setne( REG_ECX ); 903 904 //or al,cl 905 op_or_RR( sizeof( _int8 ), REG_EAX, REG_ECX ); 906 } 907 else{ 908 if(!IsWholeNumberType(type)){ 909 //不正な型の場合 910 SetError(9,NULL,cp); 911 return; 912 } 913 914 //pop eax 915 op_pop(REG_EAX); 916 } 917 918 //cmp eax,0 919 op_cmp_value(GetTypeSize(type,-1),REG_EAX,0); 920 921 //setne al 922 op_setne( REG_EAX ); 923 924 //push eax 925 op_push(REG_EAX); 926 927 Set8Variable(DEF_BYTE,pRelative->dwKind,pRelative->offset,pRelative->bOffsetOffset); 928 } -
BasicCompiler32/Compile_Statement.cpp
r34 r36 1011 1011 type1==DEF_WORD|| 1012 1012 type1==DEF_CHAR|| 1013 type1==DEF_BYTE) CaseTypeSize=sizeof(long); 1013 type1==DEF_BYTE|| 1014 type1==DEF_BOOLEAN) CaseTypeSize=sizeof(long); 1014 1015 else{ 1015 1016 CaseTypeSize=GetTypeSize(type1,lpIndex); -
BasicCompiler32/Compile_Var.cpp
r34 r36 837 837 else if(type==DEF_INTEGER||type==DEF_WORD) 838 838 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data; 839 else if(type==DEF_CHAR||type==DEF_BYTE )839 else if(type==DEF_CHAR||type==DEF_BYTE||type==DEF_BOOLEAN) 840 840 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data; 841 841 //String型が未完成 … … 1050 1050 obp+=sizeof(long); 1051 1051 } 1052 else if(type==DEF_CHAR||type==DEF_BYTE ){1052 else if(type==DEF_CHAR||type==DEF_BYTE||type==DEF_BOOLEAN){ 1053 1053 //mov byte ptr[ebp+offset],InitValue 1054 1054 OpBuffer[obp++]=(char)0xC6; -
BasicCompiler32/NumOpe.cpp
r35 r36 57 57 op_push(REG_EBX); 58 58 } 59 else if(type==DEF_DWORD||type==DEF_WORD||type==DEF_BYTE|| 59 else if(type==DEF_DWORD||type==DEF_WORD||type==DEF_BYTE||type==DEF_BOOLEAN|| 60 60 IsPtrType(type)){ 61 61 //push eax … … 418 418 PushCharVariable(&RelativeVar); 419 419 } 420 else if(i2==DEF_BYTE ){420 else if(i2==DEF_BYTE||i2==DEF_BOOLEAN){ 421 421 PushByteVariable(&RelativeVar); 422 422 } … … 718 718 i3=(long)i64data; 719 719 720 if(i2==DEF_CHAR||i2==DEF_BYTE ) i3=i3&0x000000FF;720 if(i2==DEF_CHAR||i2==DEF_BYTE||i2==DEF_BOOLEAN) i3=i3&0x000000FF; 721 721 if(i2==DEF_INTEGER||i2==DEF_WORD) i3=i3&0x0000FFFF; 722 722 -
BasicCompiler32/NumOpe_Logical.cpp
r3 r36 450 450 } 451 451 452 if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){ 452 if( type[sp - 1] == DEF_BOOLEAN ){ 453 //pop eax 454 op_pop( REG_EAX ); 455 456 //cmp eax,0 457 op_cmp_value(GetTypeSize(type[sp-1],-1),REG_EAX,0); 458 459 //setne al 460 op_setne( REG_EAX ); 461 462 //and eax,000000FFh 463 op_and_RV(REG_EAX,(int)0xFF); 464 465 //neg 466 op_neg( REG_EAX ); 467 468 //sbb eax, eax 469 op_sbb_RR( REG_EAX, REG_EAX ); 470 471 //add eax, 1 472 op_add_RV8( REG_EAX, 1 ); 473 474 //push eax 475 op_push( REG_EAX ); 476 } 477 else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){ 453 478 //////////////////// 454 479 // 64ビット整数演算 -
BasicCompiler32/NumOpe_Relation.cpp
r3 r36 84 84 OpBuffer[obp++]=(char)0xE0; 85 85 86 //mov ecx, 0xFFFFFFFF87 OpBuffer[obp++]=(char)0xB9; 88 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;86 //mov ecx,1 87 OpBuffer[obp++]=(char)0xB9; 88 *((long *)(OpBuffer+obp))=1; 89 89 obp+=sizeof(long); 90 90 … … 166 166 OpBuffer[TrueSchedule]=obp-(TrueSchedule+1); 167 167 168 //mov eax, 0FFFFFFFFh168 //mov eax,1 169 169 OpBuffer[obp++]=(char)0xB8; 170 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;170 *((long *)(OpBuffer+obp))=1; 171 171 obp+=sizeof(long); 172 172 … … 199 199 op_sub_esp(4); 200 200 201 //mov ecx, 0FFFFFFFFh202 OpBuffer[obp++]=(char)0xB9; 203 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;201 //mov ecx,1 202 OpBuffer[obp++]=(char)0xB9; 203 *((long *)(OpBuffer+obp))=1; 204 204 obp+=sizeof(long); 205 205 … … 235 235 236 236 sp--; 237 type_stack[sp-1]=DEF_ LONG;237 type_stack[sp-1]=DEF_BOOLEAN; 238 238 239 239 *pStackPointer=sp; … … 320 320 OpBuffer[obp++]=(char)0xE0; 321 321 322 //mov ecx, 0xFFFFFFFF323 OpBuffer[obp++]=(char)0xB9; 324 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;322 //mov ecx,1 323 OpBuffer[obp++]=(char)0xB9; 324 *((long *)(OpBuffer+obp))=1; 325 325 obp+=sizeof(long); 326 326 … … 404 404 OpBuffer[TrueSchedule]=obp-(TrueSchedule+1); 405 405 406 //mov eax, 0FFFFFFFFh406 //mov eax,1 407 407 OpBuffer[obp++]=(char)0xB8; 408 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;408 *((long *)(OpBuffer+obp))=1; 409 409 obp+=sizeof(long); 410 410 … … 437 437 op_sub_esp(4); 438 438 439 //mov ecx, 0FFFFFFFFh440 OpBuffer[obp++]=(char)0xB9; 441 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;439 //mov ecx,1 440 OpBuffer[obp++]=(char)0xB9; 441 *((long *)(OpBuffer+obp))=1; 442 442 obp+=sizeof(long); 443 443 … … 473 473 474 474 sp--; 475 type_stack[sp-1]=DEF_ LONG;475 type_stack[sp-1]=DEF_BOOLEAN; 476 476 477 477 *pStackPointer=sp; … … 561 561 OpBuffer[obp++]=(char)0xE0; 562 562 563 //mov ecx, 0xFFFFFFFF564 OpBuffer[obp++]=(char)0xB9; 565 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;563 //mov ecx,1 564 OpBuffer[obp++]=(char)0xB9; 565 *((long *)(OpBuffer+obp))=1; 566 566 obp+=sizeof(long); 567 567 … … 656 656 OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1); 657 657 658 //mov eax, 0FFFFFFFFh658 //mov eax,1 659 659 OpBuffer[obp++]=(char)0xB8; 660 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;660 *((long *)(OpBuffer+obp))=1; 661 661 obp+=sizeof(long); 662 662 … … 678 678 op_sub_esp(4); 679 679 680 //mov ecx, 0FFFFFFFFh681 OpBuffer[obp++]=(char)0xB9; 682 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;680 //mov ecx,1 681 OpBuffer[obp++]=(char)0xB9; 682 *((long *)(OpBuffer+obp))=1; 683 683 obp+=sizeof(long); 684 684 … … 714 714 715 715 sp--; 716 type_stack[sp-1]=DEF_ LONG;716 type_stack[sp-1]=DEF_BOOLEAN; 717 717 718 718 *pStackPointer=sp; … … 798 798 OpBuffer[obp++]=(char)0xE0; 799 799 800 //mov ecx, 0xFFFFFFFF801 OpBuffer[obp++]=(char)0xB9; 802 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;800 //mov ecx,1 801 OpBuffer[obp++]=(char)0xB9; 802 *((long *)(OpBuffer+obp))=1; 803 803 obp+=sizeof(long); 804 804 … … 893 893 OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1); 894 894 895 //mov eax, 0FFFFFFFFh895 //mov eax,1 896 896 OpBuffer[obp++]=(char)0xB8; 897 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;897 *((long *)(OpBuffer+obp))=1; 898 898 obp+=sizeof(long); 899 899 … … 915 915 op_sub_esp(4); 916 916 917 //mov ecx, 0FFFFFFFFh918 OpBuffer[obp++]=(char)0xB9; 919 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;917 //mov ecx,1 918 OpBuffer[obp++]=(char)0xB9; 919 *((long *)(OpBuffer+obp))=1; 920 920 obp+=sizeof(long); 921 921 … … 947 947 948 948 sp--; 949 type_stack[sp-1]=DEF_ LONG;949 type_stack[sp-1]=DEF_BOOLEAN; 950 950 951 951 *pStackPointer=sp; … … 1029 1029 OpBuffer[obp++]=(char)0xE0; 1030 1030 1031 //mov ecx, 0xFFFFFFFF1032 OpBuffer[obp++]=(char)0xB9; 1033 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;1031 //mov ecx,1 1032 OpBuffer[obp++]=(char)0xB9; 1033 *((long *)(OpBuffer+obp))=1; 1034 1034 obp+=sizeof(long); 1035 1035 … … 1096 1096 OpBuffer[TrueSchedule2]=obp-(TrueSchedule2+1); 1097 1097 1098 //mov eax, 0FFFFFFFFh1098 //mov eax,1 1099 1099 OpBuffer[obp++]=(char)0xB8; 1100 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;1100 *((long *)(OpBuffer+obp))=1; 1101 1101 obp+=sizeof(long); 1102 1102 … … 1126 1126 OpBuffer[obp++]=(char)0x05; 1127 1127 1128 //mov eax, 0FFFFFFFFh1128 //mov eax,1 1129 1129 OpBuffer[obp++]=(char)0xB8; 1130 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;1130 *((long *)(OpBuffer+obp))=1; 1131 1131 obp+=sizeof(long); 1132 1132 … … 1138 1138 1139 1139 sp--; 1140 type[sp-1]=DEF_ LONG;1140 type[sp-1]=DEF_BOOLEAN; 1141 1141 1142 1142 *pStackPointer=sp; … … 1220 1220 OpBuffer[obp++]=(char)0xE0; 1221 1221 1222 //mov ecx, 0xFFFFFFFF1223 OpBuffer[obp++]=(char)0xB9; 1224 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;1222 //mov ecx,1 1223 OpBuffer[obp++]=(char)0xB9; 1224 *((long *)(OpBuffer+obp))=1; 1225 1225 obp+=sizeof(long); 1226 1226 … … 1276 1276 obp++; 1277 1277 1278 //mov eax, 0FFFFFFFFh1278 //mov eax,1 1279 1279 OpBuffer[obp++]=(char)0xB8; 1280 *((long *)(OpBuffer+obp))= 0xFFFFFFFF;1280 *((long *)(OpBuffer+obp))=1; 1281 1281 obp+=sizeof(long); 1282 1282 … … 1313 1313 OpBuffer[obp++]=(char)0xC3; 1314 1314 1315 //j z 5(次のmovを飛び越す)1315 //jnz 4(次のxorとjmpを飛び越す) 1316 1316 OpBuffer[obp++]=(char)0x74; 1317 OpBuffer[obp++]=(char)0x04; 1318 1319 //xor eax,eax 1320 OpBuffer[obp++]=(char)0x33; 1321 OpBuffer[obp++]=(char)0xC0; 1322 1323 //jmp 5 1324 OpBuffer[obp++]=(char)0xEB; 1317 1325 OpBuffer[obp++]=(char)0x05; 1318 1326 1319 //mov eax, 0FFFFFFFFh1327 //mov eax,1 1320 1328 OpBuffer[obp++]=(char)0xB8; 1321 *((long *)(OpBuffer+obp))=0xFFFFFFFF; 1322 obp+=sizeof(long); 1323 1324 //not eax 1325 OpBuffer[obp++]=(char)0xF7; 1326 OpBuffer[obp++]=(char)0xD0; 1329 *((long *)(OpBuffer+obp))=1; 1330 obp+=sizeof(long); 1327 1331 1328 1332 //mov dword ptr[esp],eax … … 1333 1337 1334 1338 sp--; 1335 type[sp-1]=DEF_ LONG;1339 type[sp-1]=DEF_BOOLEAN; 1336 1340 1337 1341 *pStackPointer=sp; -
BasicCompiler32/NumOpe_TypeOperation.cpp
r3 r36 87 87 op_push(REG_EAX); 88 88 } 89 else if(type==DEF_BYTE ){89 else if(type==DEF_BYTE||type==DEF_BOOLEAN){ 90 90 //pop eax 91 91 op_pop(REG_EAX); -
BasicCompiler32/Opcode.h
r34 r36 140 140 void Set16Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset); 141 141 void Set8Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset); 142 void SetBooleanVariable(int type,RELATIVE_VAR *pRelative); 142 143 143 144 //increment.cpp … … 296 297 void op_sub_RV8 (int reg,char cValue); 297 298 void op_sbb_RV8 (int reg,char cValue); 299 void op_sbb_RR ( int reg1, int reg2 ); 298 300 void op_and_RV (int reg,int value); 301 void op_or_RR ( int op_size, int reg1, int reg2 ); 302 void op_neg ( int reg ); 299 303 void op_cdq (); 300 304 … … 306 310 void op_add_esp(int num); 307 311 void op_sub_esp(int num); 312 void op_cmp_value(int op_size,int reg,char byte_data); 313 void op_setne( int reg ); 308 314 void op_test(int reg1,int reg2); 309 315 void op_fld_ptr_esp(int type); -
BasicCompiler32/VarList.cpp
r3 r36 128 128 temporary[1]=0; 129 129 sprintf(lptv->item.pszText,"%s %d(&H%X)'%s'",VarName,byteData,byteData,temporary); 130 } 131 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 132 } 133 else if(type==DEF_BOOLEAN){ 134 if(ReadProcessMemory(hDebugProcess,(void *)offset,&byteData,sizeof(BYTE),&dwAccessByte)){ 135 if( byteData ) lstrcpy( temporary, "True" ); 136 else lstrcpy( temporary, "False" ); 137 sprintf(lptv->item.pszText,"%s %s",VarName,temporary); 130 138 } 131 139 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); -
BasicCompiler32/increment.cpp
r11 r36 92 92 op_movsx_R32R8(reg,reg); 93 93 } 94 else if(type==DEF_BYTE ){94 else if(type==DEF_BYTE||type==DEF_BOOLEAN){ 95 95 //and reg,000000FFh 96 96 op_and_RV(reg,(int)0xFF); … … 102 102 op_movsx_R16R8(reg,reg); 103 103 } 104 else if(type==DEF_BYTE ){104 else if(type==DEF_BYTE||type==DEF_BOOLEAN){ 105 105 //and reg,000000FFh 106 106 op_and_RV(reg,(int)0xFF); -
BasicCompiler32/op32_main.cpp
r3 r36 360 360 OpBuffer[obp++]=cValue; 361 361 } 362 void op_sbb_RR( int reg1, int reg2 ){ 363 //sbb reg1,reg2 364 365 //オペコード 366 OpBuffer[obp++]=(char)0x1B; 367 368 //レジスタ 369 OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)); 370 } 371 362 372 363 373 … … 370 380 //and reg,value 371 381 372 //16ビット演算の命令プリフィックス 373 char op_prefix=0; 374 375 //オペコード 376 char opcode=(char)0x81; 377 378 __op_format(op_prefix,opcode,0,0,reg,value,MOD_REG); 382 if(reg==REG_RAX){ 383 //eaxのみ特殊 384 385 // [8bit rex] 0010 0101 [32bit offset] 386 OpBuffer[obp++]=(char)0x25; 387 *((long *)(OpBuffer+obp))=value; 388 obp+=sizeof(long); 389 } 390 else{ 391 //16ビット演算の命令プリフィックス 392 char op_prefix=0; 393 394 //オペコード 395 char opcode=(char)0x81; 396 397 __op_format(op_prefix,opcode,0,0,reg,value,MOD_REG); 398 } 399 } 400 401 void op_or_RR( int op_size, int reg1, int reg2 ){ 402 //16ビット演算のプリフィックス 403 if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66; 404 405 //オペコード 406 if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x0A; 407 else OpBuffer[obp++]=(char)0x0B; 408 409 //レジスタ 410 OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)); 411 } 412 413 414 415 void op_neg( int reg ){ 416 //neg reg 417 418 //オペコード 419 OpBuffer[obp++]=(char)0xF7; 420 421 //レジスタ 422 OpBuffer[obp++]=(char)(0xD8| REGISTER_OPERAND(reg)); 379 423 } 380 424 … … 481 525 OpBuffer[obp++]=(char)num; 482 526 } 527 } 528 529 530 531 ///////////////////// 532 // cmp関連 533 ///////////////////// 534 void op_cmp_value(int op_size,int reg,char byte_data){ 535 //cmp reg,byte_data 536 537 if(op_size==sizeof(char)&®==REG_EAX){ 538 //alレジスタの場合は特殊 539 OpBuffer[obp++]=(char)0x3C; 540 541 //8ビット値 542 OpBuffer[obp++]=byte_data; 543 544 return; 545 } 546 547 //16ビット演算のプリフィックス 548 if(op_size==sizeof(short)) OpBuffer[obp++]=(char)0x66; 549 550 //オペコード 551 if(op_size==sizeof(char)) OpBuffer[obp++]=(char)0x80; 552 else OpBuffer[obp++]=(char)0x83; 553 554 //レジスタ 555 OpBuffer[obp++]=(char)(0xF8| REGISTER_OPERAND(reg)); 556 557 //8ビット値 558 OpBuffer[obp++]=byte_data; 559 } 560 void op_setne( int reg ){ 561 //オペコード 562 OpBuffer[obp++]=(char)0x0F; 563 OpBuffer[obp++]=(char)0x95; 564 565 //レジスタ 566 OpBuffer[obp++]=(char)( 0xC0 | REGISTER_OPERAND(reg) ); 483 567 } 484 568 -
BasicCompiler64/Compile_Calc.cpp
r11 r36 2 2 #include "Opcode.h" 3 3 4 void ChangeTypeToDouble_ToFpuReg(int OldType){5 //現在のスタックの内容を実数レジスタに保存する6 //NumOpeの直後専用7 if(OldType==DEF_DOUBLE){8 //fld qword ptr[esp]9 op_fld_ptr_esp(DEF_DOUBLE);10 11 //add esp,812 op_add_esp(8);13 }14 else if(OldType==DEF_SINGLE){15 //fld dword ptr[esp]16 op_fld_ptr_esp(DEF_SINGLE);17 18 //add esp,419 op_add_esp(4);20 }21 else if(OldType==DEF_LONG){22 //fild dword ptr[esp]23 op_fld_ptr_esp(DEF_LONG);24 25 //add esp,426 op_add_esp(4);27 }28 else if(OldType==DEF_DWORD){29 //pop eax30 op_pop(REG_EAX);31 32 //push 033 op_push_value(0);34 35 //push eax36 op_push(REG_EAX);37 38 //fild qword ptr[esp]39 OpBuffer[obp++]=(char)0xDF;40 OpBuffer[obp++]=(char)0x2C;41 OpBuffer[obp++]=(char)0x24;42 43 //add esp,844 op_add_esp(8);45 }46 }47 void ChangeTypeToDouble(int OldType){48 //現在のスタックの内容をdouble型に変換する49 //NumOpeの直後専用50 if(OldType==DEF_DOUBLE) return;51 else if(OldType==DEF_SINGLE){52 //fld dword ptr[esp]53 op_fld_ptr_esp(DEF_SINGLE);54 55 //sub esp,456 op_sub_esp(4);57 58 //fstp qword ptr[esp]59 OpBuffer[obp++]=(char)0xDD;60 OpBuffer[obp++]=(char)0x1C;61 OpBuffer[obp++]=(char)0x24;62 }63 else if(OldType==DEF_INT64||OldType==DEF_QWORD){64 //64ビット整数型65 66 //fild qword ptr[esp]67 op_fld_ptr_esp(DEF_INT64);68 69 //fstp qword ptr[esp]70 OpBuffer[obp++]=(char)0xDD;71 OpBuffer[obp++]=(char)0x1C;72 OpBuffer[obp++]=(char)0x24;73 }74 else if(IsWholeNumberType(OldType)){75 //その他整数型76 77 if(IsSignedType(OldType)){78 //符号あり79 80 if(OldType==DEF_INTEGER){81 //pop eax82 op_pop(REG_EAX);83 84 //movsx eax,ax85 OpBuffer[obp++]=(char)0x0F;86 OpBuffer[obp++]=(char)0xBF;87 OpBuffer[obp++]=(char)0xC0;88 89 //push eax90 op_push(REG_EAX);91 }92 else if(OldType==DEF_CHAR){93 //pop eax94 op_pop(REG_EAX);95 96 //movsx eax,al97 OpBuffer[obp++]=(char)0x0F;98 OpBuffer[obp++]=(char)0xBE;99 OpBuffer[obp++]=(char)0xC0;100 101 //push eax102 op_push(REG_EAX);103 }104 105 //fild dword ptr[esp]106 op_fld_ptr_esp(DEF_LONG);107 108 //sub esp,4109 op_sub_esp(4);110 }111 else{112 //符号なし113 114 //pop eax115 op_pop(REG_EAX);116 117 //push 0118 op_push_value(0);119 120 //push eax121 op_push(REG_EAX);122 123 //fild qword ptr[esp]124 OpBuffer[obp++]=(char)0xDF;125 OpBuffer[obp++]=(char)0x2C;126 OpBuffer[obp++]=(char)0x24;127 }128 129 //fstp qword ptr[esp]130 OpBuffer[obp++]=(char)0xDD;131 OpBuffer[obp++]=(char)0x1C;132 OpBuffer[obp++]=(char)0x24;133 }134 else SetError(9,NULL,cp);135 }136 void ChangeTypeToSingle(int OldType){137 //現在のスタックの内容をfloat型に変換する138 //NumOpeの直後専用139 if(OldType==DEF_SINGLE) return;140 else if(OldType==DEF_DOUBLE){141 //fld qword ptr[esp]142 op_fld_ptr_esp(DEF_DOUBLE);143 144 //add esp,4145 op_add_esp(4);146 147 //fstp dword ptr[esp]148 OpBuffer[obp++]=(char)0xD9;149 OpBuffer[obp++]=(char)0x1C;150 OpBuffer[obp++]=(char)0x24;151 }152 else if(OldType==DEF_INT64||OldType==DEF_QWORD){153 //64ビット整数型154 155 //fild qword ptr[esp]156 op_fld_ptr_esp(DEF_INT64);157 158 //add esp,4159 op_add_esp(4);160 161 //fstp dword ptr[esp]162 OpBuffer[obp++]=(char)0xD9;163 OpBuffer[obp++]=(char)0x1C;164 OpBuffer[obp++]=(char)0x24;165 }166 else if(IsWholeNumberType(OldType)){167 //その他整数型168 169 if(IsSignedType(OldType)){170 //符号あり171 172 if(OldType==DEF_INTEGER){173 //pop eax174 op_pop(REG_EAX);175 176 //movsx eax,ax177 OpBuffer[obp++]=(char)0x0F;178 OpBuffer[obp++]=(char)0xBF;179 OpBuffer[obp++]=(char)0xC0;180 181 //push eax182 op_push(REG_EAX);183 }184 else if(OldType==DEF_CHAR){185 //pop eax186 op_pop(REG_EAX);187 188 //movsx eax,al189 OpBuffer[obp++]=(char)0x0F;190 OpBuffer[obp++]=(char)0xBE;191 OpBuffer[obp++]=(char)0xC0;192 193 //push eax194 op_push(REG_EAX);195 }196 197 //fild dword ptr[esp]198 op_fld_ptr_esp(DEF_LONG);199 }200 else{201 //符号なし202 203 //fild dword ptr[esp]204 op_fld_ptr_esp(DEF_LONG);205 }206 207 //fstp dword ptr[esp]208 OpBuffer[obp++]=(char)0xD9;209 OpBuffer[obp++]=(char)0x1C;210 OpBuffer[obp++]=(char)0x24;211 }212 else SetError(9,NULL,cp);213 }214 void ChangeTypeToInt64(int OldType){215 //現在のスタックの内容をInt64型に変換する216 //NumOpeの直後専用217 if(Is64Type(OldType)) return;218 219 else if(OldType==DEF_DOUBLE){220 //fld qword ptr[esp]221 op_fld_ptr_esp(DEF_DOUBLE);222 223 //fistp qword ptr[esp]224 OpBuffer[obp++]=(char)0xDF;225 OpBuffer[obp++]=(char)0x3C;226 OpBuffer[obp++]=(char)0x24;227 }228 else if(OldType==DEF_SINGLE){229 //fld dword ptr[esp]230 op_fld_ptr_esp(DEF_SINGLE);231 232 //sub esp,4233 op_sub_esp(4);234 235 //fistp qword ptr[esp]236 OpBuffer[obp++]=(char)0xDF;237 OpBuffer[obp++]=(char)0x3C;238 OpBuffer[obp++]=(char)0x24;239 }240 else if(IsWholeNumberType(OldType)){241 //その他整数242 243 if(IsSignedType(OldType)){244 //符号あり245 246 //pop eax247 op_pop(REG_EAX);248 249 //cdq250 OpBuffer[obp++]=(char)0x99;251 252 //push edx253 op_push(REG_EDX);254 255 //push eax256 op_push(REG_EAX);257 }258 else{259 //符号なし260 261 //pop eax262 op_pop(REG_EAX);263 264 //push 0265 op_push_value(0);266 267 //push eax268 op_push(REG_EAX);269 }270 }271 else SetError(9,NULL,cp);272 }273 void ChangeTypeToLong(int OldType){274 //現在のスタックの内容をLong型に変換する275 //NumOpeの直後専用276 if(OldType==DEF_DOUBLE){277 //fld qword ptr[esp]278 op_fld_ptr_esp(DEF_DOUBLE);279 280 //add esp,4281 op_add_esp(4);282 283 //fistp dword ptr[esp]284 OpBuffer[obp++]=(char)0xDB;285 OpBuffer[obp++]=(char)0x1C;286 OpBuffer[obp++]=(char)0x24;287 }288 else if(OldType==DEF_SINGLE){289 //fld dword ptr[esp]290 op_fld_ptr_esp(DEF_SINGLE);291 292 //fistp dword ptr[esp]293 OpBuffer[obp++]=(char)0xDB;294 OpBuffer[obp++]=(char)0x1C;295 OpBuffer[obp++]=(char)0x24;296 }297 else if(OldType==DEF_INT64||OldType==DEF_QWORD){298 //pop eax299 op_pop(REG_EAX);300 301 //add esp,4302 op_add_esp(4);303 304 //push eax305 op_push(REG_EAX);306 }307 }308 void ChangeTypeToInteger(int OldType){309 //現在のスタックの内容をInteger型に変換する310 if(OldType==DEF_BYTE||OldType==DEF_CHAR||311 OldType==DEF_WORD||OldType==DEF_INTEGER) return;312 313 ChangeTypeToLong(OldType);314 315 //pop eax316 op_pop(REG_EAX);317 318 //and eax,0000FFFFh319 OpBuffer[obp++]=(char)0x25;320 *((long *)(OpBuffer+obp))=0x0000FFFF;321 obp+=sizeof(long);322 323 //push eax324 op_push(REG_EAX);325 }326 void ChangeTypeToByte(int OldType){327 //現在のスタックの内容をbyte型に変換する328 if(OldType==DEF_BYTE||OldType==DEF_CHAR) return;329 330 ChangeTypeToLong(OldType);331 332 //pop eax333 op_pop(REG_EAX);334 335 //and eax,000000FFh336 OpBuffer[obp++]=(char)0x25;337 *((long *)(OpBuffer+obp))=0x000000FF;338 obp+=sizeof(long);339 340 //push eax341 op_push(REG_EAX);342 }343 344 4 void SetVariableFromRax(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar){ 345 5 ///////////////////////////////////////////////// … … 347 7 ///////////////////////////////////////////////// 348 8 9 if(VarType==DEF_BOOLEAN){ 10 //bool 11 SetBooleanVariable(CalcType,pRelativeVar); 12 } 349 13 if(VarType==DEF_CHAR||VarType==DEF_BYTE){ 350 14 //8ビット変数へalレジスタの内容を格納する -
BasicCompiler64/Compile_Set_Var.cpp
r28 r36 298 298 } 299 299 } 300 void SetBooleanVariable(int type,RELATIVE_VAR *pRelative){ 301 if(type==DEF_DOUBLE){ 302 //Double型 303 304 //cvttsd2si rax,xmm0 305 op_cvttsd2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0); 306 } 307 else if(type==DEF_SINGLE){ 308 //Single型 309 310 //cvttss2si rax,xmm0 311 op_cvttss2si_xmm(sizeof(_int64),REG_RAX,REG_XMM0); 312 } 313 314 //cmp rax,0 315 op_cmp_value(GetTypeSize(type,-1),REG_RAX,0); 316 317 //setne al 318 op_setne( REG_RAX ); 319 320 SetWholeVariable( sizeof(char), DEF_BYTE, pRelative); 321 } 300 322 void SetWholeVariable(int var_size,int type,RELATIVE_VAR *pRelative){ 301 323 if(type==DEF_DOUBLE){ -
BasicCompiler64/Compile_Statement.cpp
r34 r36 293 293 void OpcodeWhile(char *Parameter){ 294 294 extern HANDLE hHeap; 295 int i2;296 295 297 296 //Continueアドレスのバックアップとセット -
BasicCompiler64/Compile_Var.cpp
r34 r36 864 864 else if(type==DEF_INTEGER||type==DEF_WORD) 865 865 *(WORD *)(initGlobalBuf+offset)=(WORD)i64data; 866 else if(type==DEF_CHAR||type==DEF_BYTE )866 else if(type==DEF_CHAR||type==DEF_BYTE||type==DEF_BOOLEAN) 867 867 *(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data; 868 868 … … 1034 1034 obp+=sizeof(long)+sizeof(short); 1035 1035 } 1036 else if(type==DEF_CHAR||type==DEF_BYTE ){1036 else if(type==DEF_CHAR||type==DEF_BYTE||type==DEF_BOOLEAN){ 1037 1037 //mov byte ptr[rsp+offset],value 1038 1038 op_mov_MV(sizeof(char),REG_RSP,offset,USE_OFFSET,(int)i64data); -
BasicCompiler64/NumOpe_Logical.cpp
r3 r36 88 88 int reg; 89 89 90 if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){ 90 if( type[sp - 1] == DEF_BOOLEAN ){ 91 SetOneTermToReg_Whole32Calc(type[sp-1],®); 92 93 if( reg != REG_RAX ){ 94 //mov rax,qword ptr[rsp+offset] ※スタックフレームを利用 95 pobj_sf->pop(REG_RAX); 96 } 97 98 //cmp reg,0 99 op_cmp_value(GetTypeSize(type[sp-1],-1),reg,0); 100 101 //setne al 102 op_setne( REG_RAX ); 103 104 //and rax,000000FFh 105 op_and64_value(REG_RAX,(int)0xFF); 106 107 //neg 108 op_neg( REG_RAX ); 109 110 //sbb rax, rax 111 op_sbb_RR( sizeof(_int64), REG_RAX, REG_RAX ); 112 113 //add rax, 1 114 op_add64_value( REG_RAX, 1 ); 115 116 if( reg != REG_RAX ){ 117 //mov reg,rax 118 op_mov_RR( reg, REG_RAX ); 119 120 //mov qword ptr[rsp+offset],rax ※スタックフレームを利用 121 pobj_sf->push(REG_RAX); 122 } 123 124 if(reg==REG_R14){ 125 //mov qword ptr[rsp+offset],r14 ※スタックフレームを利用 126 pobj_sf->push(REG_R14); 127 } 128 } 129 else if(type[sp-1]==DEF_INT64||type[sp-1]==DEF_QWORD){ 91 130 SetOneTermToReg_Whole64Calc(type[sp-1],®); 92 131 -
BasicCompiler64/NumOpe_Relation.cpp
r3 r36 137 137 op_zero_reg(reg1); 138 138 139 //jmp 7( xorを飛び越す)139 //jmp 7(次のmovを飛び越す) 140 140 OpBuffer[obp++]=(char)0xEB; 141 141 OpBuffer[obp++]=(char)0x07; … … 143 143 144 144 /////////////////// 145 // T RUEをセット145 // Trueをセット 146 146 /////////////////// 147 147 148 //mov reg1, -1149 op_mov_RV(sizeof(_int64),reg1, -1);148 //mov reg1,1 149 op_mov_RV(sizeof(_int64),reg1,1); 150 150 151 151 … … 159 159 *pStackPointer=sp; 160 160 161 type[sp-1]=DEF_ LONG;161 type[sp-1]=DEF_BOOLEAN; 162 162 163 163 return 1; -
BasicCompiler64/NumOpe_TypeOperation.cpp
r3 r36 22 22 op_movsx64_FromReg8(reg,reg); 23 23 } 24 else if(type==DEF_BYTE ){24 else if(type==DEF_BYTE || type==DEF_BOOLEAN){ 25 25 //and reg,00000000000000FFh 26 26 op_and64_value(reg,(int)0x00FF); … … 40 40 op_movsx32_FromReg8(reg,reg); 41 41 } 42 else if(type==DEF_BYTE ){42 else if(type==DEF_BYTE || type==DEF_BOOLEAN){ 43 43 //and reg,000000FFh 44 44 op_and32_value(reg,(int)0xFF); -
BasicCompiler64/Opcode.h
r34 r36 243 243 244 244 //Compile_Calc.cpp 245 void ChangeTypeToDouble_ToFpuReg(int OldType);246 void ChangeTypeToDouble(int OldType);247 void ChangeTypeToSingle(int OldType);248 void ChangeTypeToInt64(int OldType);249 void ChangeTypeToLong(int OldType);250 void ChangeTypeToInteger(int OldType);251 void ChangeTypeToByte(int OldType);252 245 void SetVariableFromRax(int VarType,int CalcType,RELATIVE_VAR *pRelativeVar); 253 246 void OpcodeCalc(char *Command); … … 292 285 void SetDoubleVariable(int type,RELATIVE_VAR *pRelative); 293 286 void SetSingleVariable(int type,RELATIVE_VAR *pRelative); 287 void SetBooleanVariable(int type,RELATIVE_VAR *pRelative); 294 288 void SetWholeVariable(int var_size,int type,RELATIVE_VAR *pRelative); 295 289 … … 303 297 #define EXP_TYPE_VAR 4 304 298 int NumOpEx(char *Command,double *pDbl,DWORD *pdwType,RELATIVE_VAR *pRelativeVar); 305 306 //SetVar.cpp307 BOOL SetVariable(DWORD dwVarType,RELATIVE_VAR *pVarRelativeVar,308 DWORD dwExpType,DWORD dwType,void *data);309 299 310 300 //Compile_Calc_PushVar.cpp … … 475 465 void op_sub64_reg (int reg1,int reg2); 476 466 void op_sub32_reg (int reg1,int reg2); 467 void op_sbb_RR ( int op_size, int reg1, int reg2 ); 477 468 void op_imul_reg (int op_size,int reg1,int reg2); 478 469 void op_imul_value (int op_size,int reg,int i32data); … … 488 479 void op_xor_reg (int op_size,int reg1,int reg2); 489 480 void op_not_reg (int op_size,int reg); 481 void op_neg ( int reg ); 490 482 void op_test (int reg1,int reg2); 491 483 void op_cmp_reg (int op_size,int reg1,int reg2); 492 484 void op_cmp_value (int op_size,int reg,char byte_data); 485 void op_setne (int reg); 493 486 void op_movlpd_MR (int xmm_reg,int base_reg,int offset,char mod); 494 487 void op_movlpd_RM (int xmm_reg,int base_reg,int offset,char mod); -
BasicCompiler64/amd64_main.cpp
r19 r36 824 824 OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)); 825 825 } 826 void op_sbb_RR( int op_size, int reg1, int reg2 ){ 827 //sbb reg1,reg2 828 829 //rexプリフィックス 830 set_rex(0,reg1,0,reg2); 831 832 //オペコード 833 OpBuffer[obp++]=(char)0x1B; 834 835 //レジスタ 836 OpBuffer[obp++]=(char)(0xC0| REGISTER_OPERAND(reg1)<<3 | REGISTER_OPERAND(reg2)); 837 } 826 838 827 839 … … 1283 1295 OpBuffer[obp++]=(char)(0xD0| REGISTER_OPERAND(reg)); 1284 1296 } 1297 void op_neg( int reg ){ 1298 //neg reg 1299 1300 //オペコード 1301 OpBuffer[obp++]=(char)0xF7; 1302 1303 //レジスタ 1304 OpBuffer[obp++]=(char)(0xD8| REGISTER_OPERAND(reg)); 1305 } 1285 1306 1286 1307 … … 1382 1403 //8ビット値 1383 1404 OpBuffer[obp++]=byte_data; 1405 } 1406 void op_setne( int reg ){ 1407 //オペコード 1408 OpBuffer[obp++]=(char)0x0F; 1409 OpBuffer[obp++]=(char)0x95; 1410 1411 //レジスタ 1412 OpBuffer[obp++]=(char)( 0xC0 | REGISTER_OPERAND(reg) ); 1384 1413 } 1385 1414 -
BasicCompiler64/varlist.cpp
r3 r36 129 129 temporary[1]=0; 130 130 sprintf(lptv->item.pszText,"%s %d(&H%X)'%s'",VarName,byteData,byteData,temporary); 131 } 132 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); 133 } 134 else if(type==DEF_BOOLEAN){ 135 if(ReadProcessMemory(hDebugProcess,(void *)offset,&byteData,sizeof(BYTE),&stAccBytes)){ 136 if( byteData ) lstrcpy( temporary, "True" ); 137 else lstrcpy( temporary, "False" ); 138 139 wsprintf(lptv->item.pszText,"%s %s",VarName,temporary); 131 140 } 132 141 else sprintf(lptv->item.pszText,"%s %s",VarName,STRING_CANNOTACCESS); -
BasicCompiler_Common/BasicFixed.h
r26 r36 32 32 #define DEF_DOUBLE 0x0000000A 33 33 34 //bool型 35 #define DEF_BOOLEAN 0x0000000B 36 34 37 //文字列型 35 #define DEF_STRING 0x0000000 B38 #define DEF_STRING 0x0000000C 36 39 37 40 //ポインタ型 38 #define DEF_PTR_VOID 0x0000000 C39 #define DEF_PTR_PROC 0x0000000 D41 #define DEF_PTR_VOID 0x0000000D 42 #define DEF_PTR_PROC 0x0000000E 40 43 41 44 //特殊型 -
BasicCompiler_Common/Overload.cpp
r31 r36 46 46 } 47 47 48 BOOL OverloadCheck(PARAMETER_INFO *ppi1,int ParmNum1,PARAMETER_INFO *ppi2,int ParmNum2){49 //パラメータの個数が不一致の場合50 if(ParmNum1!=ParmNum2) return 0;51 52 int i;53 for(i=0;i<ParmNum1;i++){54 if(ppi1[i].type!=ppi2[i].type) return 0;55 else{56 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT){57 if(ppi1[i].u.index!=ppi2[i].u.index) return 0;58 }59 }60 }61 62 return 1;63 }64 BOOL OverloadCheckLevel2(PARAMETER_INFO *ppi1,int ParmNum1,PARAMETER_INFO *ppi2,int ParmNum2){65 //パラメータの個数が不一致の場合66 if(ParmNum1!=ParmNum2) return 0;67 68 int i;69 for(i=0;i<ParmNum1;i++){70 if(ppi1[i].type!=ppi2[i].type){71 if(!(72 IsNaturalWholeNumberType(ppi1[i].type)&&IsNaturalWholeNumberType(ppi2[i].type)||73 IsRealNumberType(ppi1[i].type)&&IsRealNumberType(ppi2[i].type)74 )) return 0;75 }76 else{77 if(NATURAL_TYPE(ppi1[i].type)==DEF_OBJECT){78 if(ppi1[i].u.index!=ppi2[i].u.index) return 0;79 }80 }81 }82 83 return 1;84 }85 48 SUBINFO *OverloadSolution(char *name,SUBINFO **ppsi,int num,PARAMETER_INFO *ppi,int ParmNum,TYPEINFO *pReturnTypeInfo){ 86 49 // オーバーロードの解決 -
BasicCompiler_Common/Variable.cpp
r34 r36 56 56 } 57 57 BOOL IsWholeNumberType(int type){ 58 return (IsNaturalWholeNumberType(type)||IsPtrType(type)); 58 return ( 59 IsNaturalWholeNumberType(type) 60 || IsPtrType(type) 61 || type == DEF_BOOLEAN 62 ); 59 63 } 60 64 BOOL IsRealNumberType(int type){ … … 132 136 else if(type==DEF_INTEGER||type==DEF_WORD) 133 137 return sizeof(WORD); 134 else if(type==DEF_CHAR||type==DEF_BYTE )138 else if(type==DEF_CHAR||type==DEF_BYTE || type == DEF_BOOLEAN) 135 139 return sizeof(BYTE); 136 140 … … 187 191 else if(lstrcmpi(TypeName,"Double")==0) return DEF_DOUBLE; 188 192 193 //bool型 194 else if( lstrcmpi( TypeName, "Boolean" ) == 0 ) return DEF_BOOLEAN; 195 189 196 //ポインタ型 190 197 //※VoidPtr型以外のポインタ型はTypeDef宣言により定義される … … 253 260 else if(type==DEF_SINGLE) lstrcpy(name,"Single"); 254 261 else if(type==DEF_DOUBLE) lstrcpy(name,"Double"); 262 263 //bool型 264 else if(type==DEF_BOOLEAN) lstrcpy(name,"Boolean"); 255 265 256 266 //オブジェクト -
BasicCompiler_Common/calculation.cpp
r15 r36 628 628 } 629 629 } 630 else if(i2==DEF_BOOLEAN){ 631 BYTE byteData; 632 if(i3=ReadProcessMemory(hDebugProcess,offset,&byteData,sizeof(BYTE),&stAccBytes)){ 633 i64nums[pnum]=(_int64)byteData; 634 } 635 } 630 636 else return 0; 631 637 -
ProjectEditor/SubOperation.cpp
r24 r36 415 415 if(str[0]=='a'||str[0]=='A'){ 416 416 if(lstrcmpi(str,"Abstract")==0) return COM_ABSTRACT; 417 if(lstrcmpi(str,"As")==0) return -1; 417 418 } 418 419 else if(str[0]=='b'||str[0]=='B'){ 419 420 if(lstrcmpi(str,"Beep")==0) return COM_BEEP; 421 if(lstrcmpi(str,"Boolean")==0) return -1; 422 if(lstrcmpi(str,"Byte")==0) return -1; 420 423 } 421 424 else if(str[0]=='c'||str[0]=='C'){ 422 425 if(lstrcmpi(str,"Case")==0) return -1; 426 if(lstrcmpi(str,"Char")==0) return -1; 423 427 if(lstrcmpi(str,"ChDir")==0) return COM_CHDIR; 424 428 if(lstrcmpi(str,"Circle")==0) return COM_CIRCLE; … … 438 442 if(lstrcmpi(str,"Dim")==0) return COM_DIM; 439 443 if(lstrcmpi(str,"Do")==0) return COM_DO; 444 if(lstrcmpi(str,"Double")==0) return -1; 445 if(lstrcmpi(str,"DWord")==0) return -1; 440 446 } 441 447 else if(str[0]=='e'||str[0]=='E'){ … … 458 464 } 459 465 else if(str[0]=='f'||str[0]=='F'){ 466 if(lstrcmp(str,"False")==0) return -1; 460 467 if(lstrcmpi(str,"Field")==0) return COM_FIELD; 461 468 if(lstrcmpi(str,"For")==0) return COM_FOR; … … 471 478 if(lstrcmpi(str,"Inherits")==0) return COM_INHERITS; 472 479 if(lstrcmpi(str,"Input")==0) return COM_INPUT; 480 if(lstrcmpi(str,"Int64")==0) return -1; 481 if(lstrcmpi(str,"Integer")==0) return -1; 473 482 if(lstrcmpi(str,"Interface")==0) return COM_INTERFACE; 474 483 } … … 480 489 if(lstrcmpi(str,"Line")==0) return COM_LINE; 481 490 if(lstrcmpi(str,"Locate")==0) return COM_LOCATE; 491 if(lstrcmpi(str,"Long")==0) return -1; 482 492 if(lstrcmpi(str,"Loop")==0) return COM_LOOP; 483 493 } … … 503 513 if(lstrcmpi(str,"Public")==0) return COM_PUBLIC; 504 514 } 515 else if(str[0]=='q'||str[0]=='Q'){ 516 if(lstrcmpi(str,"QWord")==0) return -1; 517 } 505 518 else if(str[0]=='r'||str[0]=='R'){ 506 519 if(lstrcmpi(str,"Randomize")==0) return COM_RANDOMIZE; … … 511 524 if(lstrcmpi(str,"Select")==0) return COM_SELECT; 512 525 if(lstrcmpi(str,"SelectCase")==0) return COM_SELECT; 526 if(lstrcmpi(str,"Single")==0) return -1; 513 527 if(lstrcmpi(str,"Sleep")==0) return COM_SLEEP; 514 528 if(lstrcmpi(str,"Static")==0) return -1; … … 518 532 else if(str[0]=='t'||str[0]=='T'){ 519 533 if(lstrcmpi(str,"Then")==0) return -1; 534 if(lstrcmp(str,"True")==0) return -1; 520 535 if(lstrcmpi(str,"Type")==0) return COM_TYPE; 521 536 if(lstrcmpi(str,"TypeDef")==0) return COM_TYPEDEF; … … 532 547 if(lstrcmpi(str,"Window")==0) return COM_WINDOW; 533 548 if(lstrcmpi(str,"With")==0) return COM_WITH; 549 if(lstrcmpi(str,"Word")==0) return -1; 534 550 if(lstrcmpi(str,"Write")==0) return COM_WRITE; 535 551 }
Note:
See TracChangeset
for help on using the changeset viewer.