Page 1 of 1
pre-compiled libraries
Posted: 18 January 2008, 14:24 PM
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.
Posted: 18 January 2008, 14:51 PM
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.
Re: pre-compiled libraries
Posted: 18 January 2008, 15:20 PM
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.
Re: pre-compiled libraries
Posted: 18 January 2008, 17:10 PM
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?
Re: pre-compiled libraries
Posted: 18 January 2008, 17:29 PM
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.