pre-compiled libraries

A private (members-only) forum for discussing all issues related to the Beta test of Native mode devices.
Locked
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

pre-compiled libraries

Post by stevech »

Is there going to be a linker?
And if so, pre-compiled libraries for each of the target chip variants?

Or just have source code libraries - where the compiler picks up the needed sources?

I prefer the latter, for simplicity, in micros.
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

See this thread. It is a binary library for each device and unique name such as libzx24n.a.

The source code is Don's IP and my guess is that he would like to keep it.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: pre-compiled libraries

Post by dkinzer »

stevech wrote:Is there going to be a linker?
When generating native code, the ZBasic compiler uses the GNU compiler and linker. This means that you can use an object code archive like those created by the 'ar' tool. As Mike mentioned, we will supply an object library containing entries for all of the ZBasic System Library functions as well as the ZBasic initialization and infrastructure code; one for each different ZX native mode model. If you have other object libraries, object code or source code you can use them with your ZBasic application as long as they are compatible with the avr-gcc function invocation and register usage conventions. Even if they're not compatible, it is fairly simple to create a wrapper to make them so.
- Don Kinzer
stevech
Posts: 715
Joined: 22 February 2006, 20:56 PM

Re: pre-compiled libraries

Post by stevech »

dkinzer wrote:
stevech wrote:Is there going to be a linker?
When generating native code, the ZBasic compiler uses the GNU compiler and linker. This means that you can use an object code archive like those created by the 'ar' tool. As Mike mentioned, we will supply an object library containing entries for all of the ZBasic System Library functions as well as the ZBasic initialization and infrastructure code; one for each different ZX native mode model. If you have other object libraries, object code or source code you can use them with your ZBasic application as long as they are compatible with the avr-gcc function invocation and register usage conventions. Even if they're not compatible, it is fairly simple to create a wrapper to make them so.
is it an oversimplification to say that native mode Zbasic is translated to C for use by the GNU compiler?
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Re: pre-compiled libraries

Post by dkinzer »

stevech wrote:is it an oversimplification to say that native mode Zbasic is translated to C for use by the GNU compiler?
Not at all, that is precisely what's done. Essentially, the ZBasic compiler is a preprocessor that converts ZBasic code to C code. This, by itself, would be somewhat useful but the key ingredient is the ZX run-time library. As described earlier, it contains a highly modularized version of the code that is contained in the VM mode devices along with some special new code needed to support native mode.
- Don Kinzer
Locked