Do you modify your TS? / how to decompile a lob
Moderators: remi77, jacs, Daniel
-
- Master Corporal
- Posts: 43
- Joined: Fri Apr 29, 2011 7:16 am
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
- Location: Hannover
- Contact:
Do you modify your TS? / how to decompile a lob
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
.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
by Holzknoten
-
- Private First Class
- Posts: 10
- Joined: Mon Jul 02, 2007 11:50 am
- Location: Yambol, Bulgaria
- Contact:
You can read lob files directly. Format is not very complicated. Here is an example with some explanation:
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!
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
Good luck!
Last edited by Beco on Mon Oct 24, 2011 8:03 pm, edited 1 time in total.
; )
-
- Master Corporal
- Posts: 43
- Joined: Fri Apr 29, 2011 7:16 am
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
- Location: Hannover
- Contact:
-
- Private First Class
- Posts: 10
- Joined: Mon Jul 02, 2007 11:50 am
- Location: Yambol, Bulgaria
- Contact:
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.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.
; )
-
- Master Corporal
- Posts: 43
- Joined: Fri Apr 29, 2011 7:16 am
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
- Location: Hannover
- Contact:
-
- Private First Class
- Posts: 11
- Joined: Mon Sep 24, 2018 6:25 pm
- TopSolid Module: TopSolid'Progress
- TopSolid Version: 6.17
Re: Do you modify your TS? / how to decompile a lob
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
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
-
- Master Corporal
- Posts: 43
- Joined: Fri Apr 29, 2011 7:16 am
- TopSolid Module: TopSolid'Wood
- TopSolid Version: 6.17
- Location: Hannover
- Contact:
Re: Do you modify your TS? / how to decompile a lob
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:
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:
After Converting use PrintS for String:
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!
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
Code: Select all
FeedLine "What is hide = " PrintS hide? PrintS
by Holzknoten
-
- Private First Class
- Posts: 11
- Joined: Mon Sep 24, 2018 6:25 pm
- TopSolid Module: TopSolid'Progress
- TopSolid Version: 6.17
Re: Do you modify your TS? / how to decompile a lob
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
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