Welcome! Log In Create A New Profile

Advanced

Welcome

Posted by jimeer 
Welcome
May 03, 2012 09:38AM
machineBASIC replaces BV_Basic. It is a complete re-write and is 55 times fater. See www.doc.byvac.com and select machineBASIC for full details.
At this point in time 3/5/12 the user guide with all the syntax is complete but the tutorial and libraries have only just started.

**** The latest updates are here



Edited 1 time(s). Last edit at 07/27/2012 06:03AM by jimeer.
Re: Welcome
July 16, 2012 11:12AM
I have recently purchased a BV13_V2 with machineBASIC Version 1.j

I am very impressed with the product and I am having great fun experimenting with it.

I was in the IT business for 40 years and I am now retired but wrote my first BASIC program at uni in 1970 running on a CDC6600.

The PIC32 is more powerful than what was a super computer at the time!!!

I have encountered a bug that results in a stack overflow error message.
After much experimentation I have found that splitting one statement into two steps avoids the crash.

What is the best method for reporting bugs and telling others of work arounds or recieving fixes/suggested work arounds.
Regards Neil Wilson
Re: Welcome
July 16, 2012 01:03PM
Neil,
it is being updated all of the time, can you show which statement it is and what cures it so it can be fixed for the next release, thanks.
Re: Welcome
July 18, 2012 01:03AM
in the following plot1 crashes see first output.
plot 2 runs ok with the indicated line split - see second output

I hope this helps -- Neil

***************************************************
ok reset
Text input Buffer 83 allocated Baud 115200

System cold start
--------- Hardware Detect ----------
RTC start attempt ok
SD Card HW initialised ok
Mounting SD 0 or 1 ok
======================================
| machineBASIC Version 1.j |
| Saves 0 |
| BV513_V2 Build Apr 29 2012 |
| |
| Documentation www.doc.bayac.com |
| Library www.mbasic.bayac.com |
| |
| Copyright Jim Spence 2012 |
=====================================

ok
ok dim y#(200),yy(200)
ok
ok //**********************************************************
ok
function data2()
dim i
for i = 0 to 128
        if i < 64 then
                y#(i) = 10.0
        else
                y#(i) = -10.0
        endif
next i
endf

ok
//**********************************************************

function plot1()
dim i,j
dim max#,min#,s#,t#,f#
  print "\r\n\r\n\r\n"

  data2()
  max#=0
  min#=0
  for i = 1 to 128
        if  y#(i) > max#
                 max#=y#(i)
        endif

        if  y#(i) < min#
                 min#=y#(i)
        endif
  next i

s#=80.0/(max#-min#)

//********************************************************************
// The following loop runs until  i=45 then there is a stack overflow
//********************************************************************

for i = 0 to 50
        yy(i)=81.0 - ( max#-y#(i))*s#
        print i,"\r\n"
next i

endf

ok
ok //**********************************************************
ok
function plot2()
dim i,j
dim max#,min#,s#,t#,f#
print "\r\n\r\n\r\n"

  data2()
  max#=0
  min#=0

  for i = 1 to 128
        if  y#(i) > max#
                 max#=y#(i)
        endif

        if  y#(i) < min#
                 min#=y#(i)
        endif

  next i


s#=80.0/(max#-min#)

//********************************************************************
// By splitting the calculation on two lines the loop runs OK ???
//********************************************************************

  for i = 0 to 50
        f#= max#-y#(i)
        yy(i)=81.0 - f#*s#
        print i,"\r\n"
  next i

endf

ok
ok
ok plot1


0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
ERROR (2) stack overflow at 2fetch

ok
ok plot2


0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

ok



Edited 1 time(s). Last edit at 07/27/2012 05:59AM by jimeer.
Re: Welcome
July 19, 2012 08:18AM
This is now fixed - version 1w+ that will be release next week (w/c 23/07/2012), thanks for the report.
BV500 Forum?
July 22, 2012 08:00AM
Hi,

Can we have a BV500 forum please? I have a couple of questions already. Don't worry, I'm not just going to ask "when can I get one", I'm sure it will be announced.

Paul
Re: BV500 Forum?
July 22, 2012 10:16AM
new forum created for the BV500.
Re: BV500 Forum?
July 22, 2012 12:54PM
Great, thanks Jim!
New Bug
August 05, 2012 05:49PM
Sorry but with machineBASIC Version 2.04 you seem to have broken the floating point "IF" statment.
The following works with INT vars.
*******************************************************************************************

======================================
| machineBASIC Version 2.04
| Saves 0 |
| BV513_V2 Serial# 201203058
| |
| Documentation www.doc.bayac.com |
| Library www.mbasic.bayac.com |
| |
| Copyright Jim Spence 2012 |
======================================
ok
ok
ok function xx()
dim i, j
i=2
j=1
if i > j then
print "\r\nBig\r\n"
endif
endf
ok
ok xx
Big

ok
******************************************************************

However if you do the same thing with floating point the following happens.

******************************************************************


ok function zz()
dim i#,j#
i#=2.0
j#=1.0
if i# > j# then
ERROR (44) function does not return anything at if

ok
************************************************************************

Happy bug fixing ...... Neil
Sorry, you do not have permission to post/reply in this forum.