July 09, 2020, 09:48:03 AM

Author Topic: o2Basic - micro(A) Interpreter  (Read 3036 times)

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 2511
  • elgol
Re: o2Basic - micro(A) Interpreter
« Reply #45 on: June 07, 2020, 11:51:00 PM »
This seems like a cool project, good luck with it.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Catalina, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.3, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspberry pi 3 and 4.


Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #47 on: June 11, 2020, 11:05:26 PM »
 here is a simple fibonacci series just 10 numbers with simple
goto/label loop

Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #48 on: June 13, 2020, 07:04:45 PM »
simple pixel plotting in microA

Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #49 on: June 14, 2020, 03:06:47 PM »
Hi
First graphic program in micro(A).
It is well known fern fractal, i made it after i tested rnd() function
in micro is rnd var without parentesis,i will ad it later.

Code: [Select]
'fern test
varnum x,y,r,n,x1,y1
x=0:y=0

label start

r = rnd 1

if r > 0
  if r < 0.01
     x = 0.0
     y = 0.16 * y
  endif
endif

if r > 0.01
   if r < 0.085
      x = 0.22 * x - 0.26 * y
      y = -0.23 * x + 0.22 * y + 1.6
   endif
endif

if r > 0.075
    if r < 0.15
       x = 0.15 * x + 0.28 * y
       y = -0.29 * x + 0.24 * y + 0.44
    endif
endif

x = 0.85 * x + 0.04 * y
y = -0.04 * x + 0.85 * y + 1.6

x1 = (x + 3.14) * 70
y1 = 760 - y * 70

pset x1,y1
n = n + 1

if n < 20000
  goto start
endif
print 300,10,"OK!"

Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #50 on: June 16, 2020, 10:47:57 PM »
Lorenz example :
Code: [Select]
'lorenz example in micro(A)
varnum x,y,z,count,xx,yy,zz,x1,y1
x=0 : y=40 : z=40 : count=0

label start

xx = x + 0.01 * (-10.0 * x + 10.0 * y)
yy = y + 0.01 * ( 28.0 * x - y - x * z)
zz = z + 0.01 * (-8.0  * z / 3.0  + x * y)
 

x1 = x*10+320
y1 = -(z)*10+500
pset x1,y1

x = xx
y = yy
z = zz
count = count + 1

if count < 10000
  goto start
endif
print 10,10,"OK!"

Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #51 on: June 18, 2020, 10:29:32 PM »
Fern fractal in micro(A)
12000 iteration in 1.7 sec ..not bad for hobby interpreter

Offline Aurel

  • Full Member
  • ***
  • Posts: 163
    • AurelSoft
Re: o2Basic - micro(A) Interpreter
« Reply #52 on: June 27, 2020, 11:17:55 AM »
First binary release of micro(A) Interpreter.
have fun!

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal