Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Version Check Suggestion

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 14 December 2005, 18:38 PM    Post subject: Version Check Suggestion Reply with quote

Programs compiled for ZBasic v1.1.0 may run on chips with v1.0.0 firmware, and cause "interesting" results. It might be better to do a version check before allowing a program to run.

I would also be very careful about changes that are not forwards-compatible. The opcode for the new function in IIf clearly used to do something in the previous release.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 14 December 2005, 21:45 PM    Post subject: Reply with quote

Point taken. Technically, even unassigned opcodes actually do something - they cause a halt. In this case, however, an opcode was reassigned that was never generated by the compiler.

A new loader record type could be added that specifies the minimum firmware version and the device could reject the download if it is earlier. Of course, this change is not backward compatible either since the loader ignores record types that it doesn't recognize.

Just to be clear, the code generated by the v1.1.0 compiler is 100% compatible with firmware versions prior to v1.1.0 as long as you don't use the new IIf() System Library Routine. The manual page for that routine clearly states that the newer firmware version is required.
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 15 December 2005, 2:07 AM    Post subject: Reply with quote

dkinzer wrote:
A new loader record type could be added that specifies the minimum firmware version and the device could reject the download if it is earlier. Of course, this change is not backward compatible either since the loader ignores record types that it doesn't recognize.

Or you could use a special system function at the beginning of the program that identifies the version number (of the compiler).

dkinzer wrote:
Just to be clear, the code generated by the v1.1.0 compiler is 100% compatible with firmware versions prior to v1.1.0 as long as you don't use the new IIf() System Library Routine. The manual page for that routine clearly states that the newer firmware version is required.

There is a copy/paste error in the invocation example for IIf(). I would also suggest changing the message to say ZX firmware version 1.1 or later. IIf() is also missing from zbasic.api.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 15 December 2005, 3:03 AM    Post subject: Reply with quote

The corrections that you suggested have been incorporated into the documents for later release except for the error in the examples. I couldn't spot it. Could you help me out?
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 15 December 2005, 4:01 AM    Post subject: Reply with quote

Check the invocation line of IIf as shown in red below:
Invocation InputCapture(testExpr, trueExpr, falseExpr)
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 15 December 2005, 5:21 AM    Post subject: Reply with quote

Boing! Now I see! I was looking at the examples. Thanks.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group