Compiler, IDE Update

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Compiler, IDE Update

Post by dkinzer »

There is a new installer available on the Downloads Page for the new release of the ZBasic compiler, documentation and IDE. The primary reason for the update is to support a new series of "native mode" ZX devices. For native mode devices, the compiler produces native machine code for the processor. This is in contrast to the ooriginal ZX devices which use the Virtual Machine concept.

The primary advantage to using a native mode device is increased execution speed. While the VM devices execute the "b = b + 1" instruction at the rate of about 175,000 instructions per second, the same instruction on native mode devices runs at about 2.9 million instructions per second. This 16X or so acceleration is not representative, however, of the actual performance gains that you'll see in your application. The measured improvement in some test applications has been 3X-4X. The actual improvement in any particular application will depend entirely on the what the application does and how the code is written.

Another advantage of the native mode devices is the ability to write interrupt handling code. The interrupt handlers may be written in ZBasic with or without inline assembly language code. They may also be written entirely in assembly language or even in C if desired. Inline C and assembly language code may also be used elsewhere in the application.

The biggest disadvantage to using native mode devices is that you have to be more careful when writing your application code if it has data items that are accessed by multiple tasks or interrupt handlers. However, well-written applications that use semaphores and other well-known synchronization methods should not require changes.

The new native mode devices are the ZX-24n, ZX-40n, and ZX-44n, which correspond roughly to their a-suffix VM counterparts. One additional benefit is that the new devices, based on the ATmega644P CPU, have two hardware serial ports; the second port is accessible in ZBasic as Com2.

We will be adding a forum shortly specific to the native mode devices.

Read about the other changes in the new release.
Last edited by dkinzer on 09 April 2008, 19:28 PM, edited 1 time in total.
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Re: Compiler, IDE Update

Post by mikep »

dkinzer wrote:The primary reason for the update is to support a new series of "native mode" ZX devices. For native mode devices, the compiler produces native machine code for the processor. This is in contrast to the original ZX devices which use the Virtual Machine concept.
This is another great achievement !!

If anyone is counting I think we are now on third generation of ZBasic devices. First we had the mega32 and mega644 based devices that used EEPROM for ZVM instructions, then we had the mega128, mega1281 and mega1281 that used Flash for ZVM instructions, and now we have mega644p based devices that use Flash with native code (AVR machine instructions).
Mike Perks
pjc30943
Posts: 220
Joined: 01 December 2005, 18:45 PM

Post by pjc30943 »

These native devices look very nice!
The ability to define ISRs is quite handy. Such ease-of-use, what the ZX devices are known for, will lend to some pretty sophisticated applications for the amount of effor put into development.
Can't wait for the 1281n to come out.
Post Reply