In the bottom i add my project in c++ with .exe and example .qb code. I define all codes from http://thmods.com/forum/viewtopic.php?f=6&t=26
I'm doing right? I have problem with test qb script ( you must download file and to test yourself ) i don't know what it ts -> 10 00 39 16, so program return error. You can update source file.
Now program haven't compilator, only parser. When parser will work, i create compilator function in class CDecompiler.
I use Code::Blocks but in DevC++ it's too working.
== EDIT
okey 39 is NOT and 16 is NEW_ADRESS, but what it is in code? : 10 00 , 0f 00 , 4b 00
code:
Code: Select all
01 16 07 63 7d 4c 01 47
39 16 4b 6b da 94 01 16
55 2c 3c 09 01 28 01 47
0f 00 16 60 7e b8 9c 01
16 3d 21 6e 0a 01 28 01
47 4b 00 16 31 21 7b 43
4a 18 00 00 00 00 00 00
01 00 08 00 00 00 00 1b
00 00 af 98 c6 40 8b 2d
58 47 00 00 00 00 01 16
b6 e9 15 3c 4a 18 00 00
00 00 00 00 01 00 08 00
00 00 00 1b 00 00 af 98
c6 40 8b 2d 58 47 00 00
00 00 01 28 01 24
Code: Select all
01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
07 63 7d 4c - ADDRESS - push to stack
01 - NEW_INSTRUCT = :i
47 - I_IF = IF
10 00 - ??
39 - E_NOT = NOT
16 - NEW_ADDRES = $[value]$
4b 6b da 94 - ADDRESS - push to stack
01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
55 2c 3c 09 - ADDRESS - push to stack
01 - NEW_INSTRUCT = :i
28 - I_ENDIF = endif
01 - NEW_INSTRUCT = :i
47 - I_IF = IF
0f 00 - ??
16 - NEW_ADDRES = $[value]$
60 7e b8 9c - ADDRESS - push to stack
01 - NEW_INSTRUCT = :i
16 - NEW_ADDRES = $[value]$
3d 21 6e 0a - ADDRESS - push to stack
01 - NEW_INSTRUCT = :i
28 - I_ENDIF = endif
01 - NEW_INSTRUCT = :i
47 - I_IF = IF
4b 00 - ??
16 - NEW_ADDRES = $[value]$
31 21 7b 43 - ADDRESS - push to stack
4a - SCRIPT_STRUCT_ITEAM = ?
18 00 - (byte count/pointer to the next instruction) = ?
00 00 00 - null bytes = ?
00 00 01 00 - start of the byte count = ?
08 00 00 00 - pointer to byte 8 = ?
.... i don't know what now:
1b 00
00 af 98 c6 40 8b 2d 58
47 00 00 00 00 01 16 b6
e9 15 3c 4a 18 00 00 00
00 00 00 01 00 08 00 00
00 00 1b 00 00 af 98 c6
40 8b 2d 58 47 00 00 00
00 01 28 01 24
Code: Select all
:i $[07637d4c]$
:i if NOT $[4b6bda94]$
:i $[552c3c09]$
:i endif
:i if $[607eb89c]$
:i $[3d216e0a]$
:i endif
:i if $[31217b43] I DON'T KNOW WHAT'S NOW