Do you modify your TS? / how to decompile a lob

All topics about specific development with COM interface, LIP language, API in VB, ...

Moderators: remi77, Daniel, jacs

Do you modify your TopSolid?

Yes, with LIP.
4
50%
Yes, with API
1
13%
Yes, i pay for it.
0
No votes
Yes, i change the complete menus.
1
13%
No, the TS functions are ok for me.
2
25%
 
Total votes: 8

Holzknoten
Master Corporal
Master Corporal
Posts: 36
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

Unread post by Holzknoten » Fri Oct 14, 2011 4:54 pm

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
by Holzknoten

Beco
Private
Private
Posts: 9
Joined: Mon Jul 02, 2007 11:50 am
Location: Yambol, Bulgaria
Contact:

Unread post by Beco » Sun Oct 23, 2011 4:44 pm

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!
Last edited by Beco on Mon Oct 24, 2011 8:03 pm, edited 1 time in total.
; )

Holzknoten
Master Corporal
Master Corporal
Posts: 36
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

Unread post by Holzknoten » Mon Oct 24, 2011 6:07 am

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.
by Holzknoten

Beco
Private
Private
Posts: 9
Joined: Mon Jul 02, 2007 11:50 am
Location: Yambol, Bulgaria
Contact:

Unread post by Beco » Mon Oct 24, 2011 9:12 am

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.
; )

Holzknoten
Master Corporal
Master Corporal
Posts: 36
Joined: Fri Apr 29, 2011 7:16 am
TopSolid Module: TopSolid'Wood
TopSolid Version: 6.17
Location: Hannover
Contact:

Unread post by Holzknoten » Sat Oct 29, 2011 9:40 pm

OK you are right. there are many dark areas in TS ;-)

where are my flashlight? ;-)


Thx for the information about the "toplip.syn".
by Holzknoten

AlexAS
Private First Class
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

Unread post by AlexAS » Mon Oct 29, 2018 3:05 pm

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

Holzknoten
Master Corporal
Master Corporal
Posts: 36
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

Unread post by Holzknoten » Mon Oct 29, 2018 4:54 pm

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
by Holzknoten

AlexAS
Private First Class
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

Unread post by AlexAS » Tue Oct 30, 2018 10:47 am

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

Post Reply