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.
Compiler, IDE Update
Compiler, IDE Update
Last edited by dkinzer on 09 April 2008, 19:28 PM, edited 1 time in total.
- Don Kinzer
Re: Compiler, IDE Update
This is another great achievement !!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.
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