Page 1 of 1
Do you modify your TS? / how to decompile a lob
Posted: Fri Oct 14, 2011 4:54 pm
by Holzknoten
is it possible to decompile a lob-file?
.lob --> TopLip.exe --> .lip
i want to learn from original lip/lob codes of Missler.
the normal way is to compile the own code of a lip-file.
.lip --> TopLip.exe --> .lob
Posted: Sun Oct 23, 2011 4:44 pm
by Beco
You can read lob files directly. Format is not very complicated. Here is an example with some explanation:
Code: Select all
testLOB.lip:
INT myvarint
INT myvarint2
111 myvarint!
myvarint? 222 333 + + myvarint2! myvarint2?
testLOB.lob:
5 -number of functions used
0 -???
LWnum -1-st used function - in the body of program = W0
LVARWintpop -2-nd used function - in the body of program = W1
LVARWpush - . used function - in the body of program = W2
LWadd - . used function - in the body of program = W3
LWend - . used function - in the body of program = W4
76 -control sum
0 -this number + number on the next row = offset in symbols,
from <START> to "OnBreak" section of program, without \n \r
0 -here is length of "OnInit - EndInit" section of program in symbols, without \n \r
W0 -call LWnum <START>
I111 to put value 111 on top of stack
W1 -call LVARWintpop : myvarint!
Smyvarint -variable symbol name
I0 -this can be "I1" if myvarint is declared as STATIC
W2 -call LVARWpush : myvarint?
Smyvarint
I0
W0 -call LWnum
I222 to put value 222 on top of stack
W0 -call LWnum
I333 to put value 333 on top of stack
W3 -call LWadd : +
W3 -call LWadd : +
W1 -call LVARWintpop : myvarint2!
Smyvarint2
I0
W2 -call LVARWpush : myvarint2?
Smyvarint2 to put var myvarint2 on top of stack
I0
W4 -call LWend this is the end
P.S. Open with text editor file toplip.syn from TopSolid bin folder. It is a dictionary for LIP -> LOB commands. I suggest you to copy your LOB file and do some replace of Wn-W0 with their commands, to make it more readable.
Good luck!
Posted: Mon Oct 24, 2011 6:07 am
by Holzknoten
thx for answer.
i get the information from support, that every lob-file have also a lip-file in same folder.
so i can learn the original code.
Posted: Mon Oct 24, 2011 9:12 am
by Beco
Holzknoten wrote:thx for answer.
i get the information from support, that every lob-file have also a lip-file in same folder.
so i can learn the original code.
That is not exactly true. Not all files have source with them. I have ~4100 lob files in my instalation and only ~2600 lip files. There is no lip files in zmi folder for TopSolid'CAM.
Posted: Sat Oct 29, 2011 9:40 pm
by Holzknoten
OK you are right. there are many dark areas in TS
where are my flashlight?
Thx for the information about the "toplip.syn".
Re: Do you modify your TS? / how to decompile a lob
Posted: Mon Oct 29, 2018 3:05 pm
by AlexAS
Hello,
I'm trying to modify my BOM by TOPLIP, but I cannot get the full meaning in some existing *.lip files:
for example, if a open C:\Missler\V617\d\table\alg\parts\bom\l fdcreat.lip file, I find this
DWreadconfint
I cannot find the meaning in toplip.syn.
Can you help me please with all those commands?
Thanks a lot
Re: Do you modify your TS? / how to decompile a lob
Posted: Mon Oct 29, 2018 4:54 pm
by Holzknoten
Hi AlexAS,
if documentation is missing i try to understand the command.
for example "DWreadconfint"
I search all lisp files for text "DWreadconfint" with the tool notepad++.
results are:
Code: Select all
hide? DWreadconfint hide!
value? DWreadconfint value!
0 DWreadconfint chooseset!
addauxis? DWreadconfint addauxis!
copy? DWreadconfint copy!
So i think this command convert integer (0,1,2 ...) to string ("0","1","2" ...) .
read integer from parameter(left) -> convert it with "DWreadconfint"(center) -> save the same parameter with converted string(right).
On the left is a parameter like hide, value, addauxis, copy.
This parameter is reading with "?" for example "hide?" .
In the center the "DWreadconfint " convert the integer to a string (or something other).
On the right side the converted integer is saved back to the used parameter like hide!, value!, addauxis!, copy!
To be realy sure it converts to a string you have to test the parameter by print it to the screen (Alphazone).
Before converting use PrintI for Integer:
Code: Select all
FeedLine "What is hide = " PrintS hide? PrintI
After Converting use PrintS for String:
Code: Select all
FeedLine "What is hide = " PrintS hide? PrintS
Re: Do you modify your TS? / how to decompile a lob
Posted: Tue Oct 30, 2018 10:47 am
by AlexAS
Thanks for your help!
I will try your way of working, even if sometimes is really hard to get the meaning of each LIP command!
Have a nice day