Updated Installer

A private (members-only) forum for discussing all issues related to the Beta test of Native mode devices.
Locked
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Updated Installer

Post by dkinzer »

The installer containing the updated, native-mode compatible compiler, IDE and documentation is available at http://www.zbasic.net/download/zbasic-setup_2-3-1.exe. The compiler and IDE should work equally well with VM-mode devices.

There are a few incompatibilities between VM-mode and native-mode devices. For example, the StackCheck() routine is not supported on native mode devices. Most applications should compile with no changes and should run the same except for possible timing differences. Please report any anomalies that you encounter.

If you need to modify your program to add code that is specific to VM or native mode devices, you can use a conditional with the value of Option.TargetCode. For example,

Code: Select all

#if Option.TargetCode = "ZVM"
' VM mode code
#endif

#if Option.TargetCode = "Native"
' native mode code
#endif
The installer will install a stripped down version of the WinAVR 20070525 distribution. This should not interefere in any way with any other version of WinAVR that you might have installed on your system. Likewise, the existence of any other WinAVR version should not affect ZBasic.

The ZX-24n devices that were sent out contain a "Hello, world" program, the source code for which is given below.

Code: Select all

Private msg as StringVectorData({ " says...", "    Hello, world" })
Private device as String

Sub Main()
  Dim j as Integer
  device = getDeviceID()
  j = 0
  Do
    Call Hello(j)
    j = (j + 1) And 1
  Loop
End Sub

Private Sub Hello(ByVal idx as Integer)
  If (idx = 0) Then
    Debug.Print device;
  End if
  Debug.Print msg(idx + 1)
  If (StrFind(device, "ZX24", 1, True) = 1) Then
    Call PutPin(25, 0)
    Call Delay(0.5)
    Call PutPin(25, 1)
    Call PutPin(26, 0)
    Call Delay(0.5)
    Call PutPin(26, 1)
  Else
    Call Delay(1.0)
  End If
End Sub

Private Function getDeviceID() as String
  Dim idLen as Integer
  Dim i as Integer
  Dim id(1 to 6) as Byte
  
  Call System.DeviceID(id)
  idLen = 0
  For i = 1 to UBound(id)
    If (id(i) = 0) Then
      Exit For
    End If
    idLen = idLen + 1
  Next i
  getDeviceID = MakeString(id.DataAddress, idLen)
End Function
Last edited by dkinzer on 20 February 2008, 10:33 AM, edited 1 time in total.
- Don Kinzer
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Re: Updated Installer

Post by mikep »

dkinzer wrote:The installer containing the updated, native-mode compatible compiler, IDE and documentation is available at http://www.zbasic.net/download/zbasic-setup_2-3-1.exe. The compiler and IDE should work equally well with VM-mode devices.
Congratulations on another significant milestone in the development of the ZBasic platform. I started with BasicX a little over 3 years ago and we aint in Kansas anymore !!
Mike Perks
Don_Kirby
Posts: 341
Joined: 15 October 2006, 3:48 AM
Location: Long Island, New York

Re: Updated Installer

Post by Don_Kirby »

mikep wrote: Congratulations on another significant milestone in the development of the ZBasic platform. I started with BasicX a little over 3 years ago and we aint in Kansas anymore !!
I would like to second this notion. Don has, yet again, done an amazing job. Now that the native mode compiler is in the hands of his loyal minions, he's got an even bigger task ahead: responding to all of our cries for help.

-Don
Locked