What about source code for Library Functions?

General discussion on mikroBasic.
Post Reply
Author
Message
Charles_neff
Posts: 125
Joined: 26 Aug 2005 04:11
Location: Houston

What about source code for Library Functions?

#1 Post by Charles_neff » 31 Aug 2005 11:00

I got pretty excited today when I found a file 16F877ref.pbas in one of the MikroBaic installed sub-directories. I printed out the pbas source and it's a list of includes... lots of *.pbas files referenced here that I would like to know where and how to get their source code...especially if they are in *.PBAS which i beleive I could decifer.

The point is that many of these routines are very close to what many of us could for examples in writing our own librarys of useful and dedicated procedures/functions.

In my opinion, as customers ( and me being a very optimistic, potential customester) would like to have accessto all of the routines that I am purchasing by license agreement.

By having access to these sources, we all could stand to gain by having the code to modify, as necessary for our applications, develop our own library of functions/procedures )Library-File.pbas name re-named (for our own use of-course) without any infinngment of modifying a sampled routine . This, by the way, is lots less worse than those who cracked this proggie so as not to limit the base MikroBasic.

as paying customers, we deerve the right to see all the predefined libraies procedures and functions i the .pbas source taht is refered to in the ref files.

Anyone have the source for these files or know how to get the source?

Charles Neff

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: What about source code for Library Functions?

#2 Post by zristic » 31 Aug 2005 14:06

The conflict is simple: The develompent team wants to publish the sources, but the management does not want to do that. :?

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

#3 Post by xor » 31 Aug 2005 21:19

If I want to get nosey I take a look at the assembly language after compiling. mBasic is well documented in the assembler. It's what the language is really doing behind all those high-level words you enjoy using so much.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

Charles_neff
Posts: 125
Joined: 26 Aug 2005 04:11
Location: Houston

Reply to zristic

#4 Post by Charles_neff » 01 Sep 2005 06:14

Dear Zristic,

What the developers know is the tremendous amout of constructive feedback that they will receive in not only prog. improvements but additionally a ton of user routines for interface to the on-going development of serial protocols, communications standards, and a whole lot of stuff. Somewhere out there right now is someone writing an interface to the old IEE-488 bus. Sounds kinda stupid but there are a dozen others who right now would like to have a routine to do this but don't know where to start. The sales and marketing types need to understand that to promote a product is time consuming and expensive, but positive customer feed-back works better than anything.

Of course my opinion is biased, I'm a hardware developer of 20+ years and when they held sales meetings at my last job... I took that day off. I listened to the customer calls and designed not what they wanted but what they needed... Usually, the end product was more than what they ever wanted, or needed, but filled the requirements of many.

Charles

kjennejohn
Posts: 71
Joined: 29 Dec 2004 05:16
Location: North of Bay Area

The reality sux

#5 Post by kjennejohn » 02 Sep 2005 07:49

Charles, we now come to the classic business model in the digital world as we know it:
The guy paying your salary, and the guy paying Zyristic's, wish to "protect their intellectual property". They wish to realize a profit before someone else reverse engineers your good work and builds a competing product without all the up front work and expense, thereby allowing them to sell cheaper, thereby putting your boss (and you) out of business. They also don't want to carry the expense of having their staff constantly test and verify the veracity of other people's new routines, libraries or whatever, to forestall "blowing up" the code at a later time. Still, sales meetings suck.

As opposed to the open-source community:
The people actually writing it know collaboration among their peers will allow a larger body of experienced and knowledge to correct and grow the code. The computer software industry in general will prosper accordingly, as this body of work grows, allowing the plain user to obtain good resources for little or no cost. Which leads to the question: do all these guys still live in their parent's basements? How do they make a living writing free software?!

Reality, meet ideals. Ideals, bow to reality.
If it wasn't for hunger, taxes and shelter, we'd probably do this for free.

End of $0.02,
kenjj
All my pencils *used* to have erasers!

xor
Posts: 5465
Joined: 18 May 2005 00:59
Location: NYC
Contact:

Re: The reality sux

#6 Post by xor » 02 Sep 2005 21:54

kjennejohn wrote:End of $0.02,
kenjj
Here's $0.03. There are no secrets with mBasic. mBasic is completely transparent. Just compile and look at the assembler. The assembly language is commented very well. Anyone willing to put in the time to read it will see exactly how the language and routines work. It would require little reverse engineering to make something of it.

The difficult part is the Windows program that examines some text written by fools like me and then has to make sense of it so that it can be callled a working program.
[color=darkred][b]xor[/b][/color]
[url=http://circuit-ed.com]CircuitED -[/url]

Charles_neff
Posts: 125
Joined: 26 Aug 2005 04:11
Location: Houston

#7 Post by Charles_neff » 03 Sep 2005 05:49

kjennejohn,

First, thanks for your well thought out comments regarding whether to, or not to, provide source code for library routines.

First, I guess there is always a risk of someone copying anything that have ever been invented or whatever. I understand what you are saying about those risk and the potential loss to one party or partys as a result of another.

To me, I wish to simplify the issue by saing that virtually "anything" can reverse engineered and duplicated and/or the findings used for purposes such as making a mouse trap better than their competitators by first exploring all the innermost working of a already existing design... namely, their competitors product.

I would say that the technique of applying modern day technology (in duplicate) has evolved as a result of supply and demand not to mention a whole new way of doing business in competative markets and price having a very strong impact on the success of a product rather than the level of quality of the product.

Can the logic you apply to protecting a sole "invention" of sorts such as that of a compiler be applied different than to other competative markets such as to why doesn't Ford motor company Fully pot and enclose their starters in a solid block of epoxy or weld them in assembly so as to prevent aftermarket companies such a Borg-warner or Chrystler Corp. or GM from copying their design? And, it is of suprise that over the past 30 years or so, I have yet to see a significant difference in the design of Chrystler, GM, and Ford starters or a ban on the sell of 2nd and third party starters or anything which me from going down and purchasing individual parts OEM or aftermarket) such brushes or bearings to repair such starters without absolutely no revenue gain to the Origional manufacturer, designer, or related supplier.

As a further example, I have several chain saws...like 15 or so... some are Poulan and some are from Sears. All of the ones I bought from Sears I got a really good deal on as used with new warranty. All of my Sears saw model numers have a 358- prefix which means they were manufactured by Poulan but to Sears specifications. With minor exceptions, 1 for 1, Poulan parts can directly replace any part on the Sears saw having a -358 prefix. Why would I not buy Sears parts? Well, for one thing, often Sears wants as much in shipping for their part as the part is worth. If it's a wear item, I go to poulan and buy 2 parts for the same price as 1 Sears part.

As fars as the source code for the library functions and procedures... Yes, it's availiable at some cost. No doubt there are many (non-developers) who have it in their hands right now. As yesiam has explained more than once, it's a simple matter of writing a program as simple as Main, LCD_Init(arguments), and end and then do a compile, view the assembly and Bingo!, you have the source.. Almost!

That is , you have the asm of the source as generated by the compiler...not the source, which we all have to believe is in .pbas .
For the 80xxx family, and many others there are disassemblers availiable which do a great (some teriffic) job of converting .hex files to pseudo.asm files. I have yet seen a dis-compiler to convert .asm back to basic, C, forth, or whatver. Maybe one does exist.

The fact remains that as yesiam explained, it is possible to look at the source and derive the function and re-write it in PBAS or C or whatever. But why would someone want to do such a thing? Doesn't it become somewhat obvious that with a resultant .asm listing of a function that any good ASM/C/PBAS programmer could duplicate the source in whatever high language they desire... After all, do you disagree that C or Basic or whatever High level languages are not in the end simple translators to get to asm code where the assembler and linker then take over to produce a resultant hex file?

So, I ask... where is there a protection of their code from exposure except to those like me who are not so adapt ( as yet ) in PIC ASM so as to decipher their routines.

Charles

Charles_neff
Posts: 125
Joined: 26 Aug 2005 04:11
Location: Houston

More on how one might get Source for Library Functions

#8 Post by Charles_neff » 03 Sep 2005 06:23

yesiam,

The subject of this thread doesn't really pertain to how the compiler deciphers the code written by you, me and any others so much as it questions why MC is unwilling to reveal the source which no doubt is" very basic and easily duplicated by many" and, on the other hand, "potentially useful to me and no doubt others" who want to better appreciate the effofts of the developers and the bargain price for a tool such as this and would like to know... "the rest of the story".

Your point is well taken that the derivation of the code for the library functions appears to be more one of a "pain in the kazoo time wise" versus an attempt to protect their code.

Maybe when I get some time and more knowledge under my hat, I will do as you suggested and attempt to decipher the resultant .asm listing.

As a first start, it would be interesting to see what happens when we cut and paste their .asm listing into a .pbas program such as:

Main:
asm

(paste of .asm listing

end asm

end.

Then take the .hex result from this compile and the end resultant .hex from the origional .pbas compile and do a hex file compare on the two.

What do you think the result will be.

Then..if there are descrepancies...we go edit the .asm listing file and keep re-compiling the asm , pasted and edited asm code, end.asm program until the two match by .hex files.

Then, having verified that we have an accurate .asm equivalent, we write source in pbas to perform the functions listed in the verifed_accurate.asm file.

We do a compile /compare on our version of the .pbas, a hex file compare and edit the .pbas until the two hex files agree.

To some that are well versed in PIC .asm , this could be a somewhat trivial task...

Then..to MC management why is the big issue of secrecy? Or is this just a policy in their company manual written 5 years ago by one of their HR managers?

Charles

Post Reply

Return to “mikroBasic General”