Page 1 of 1

RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Mon Dec 26, 2016 8:48 pm
by Martin_H
I just tried the ASCII Mandelbrot BASIC example from the RC2014 Gitgub repo and it works unmodified in EhBasic. Here's a link:

https://github.com/RC2014Z80/RC2014-BAS ... brot/Ascii

I plan to time it on my 1 MHz 65c02 and compare it to my Forth version.

Re: RC2014 ASCII Mandlebrot BASIC Example Runs in EhBasic

Posted: Mon Dec 26, 2016 8:57 pm
by BigDumbDinosaur
Martin_H wrote:
I just tried the ASCII Mandlebrot BASIC example from the RC2014 Gitgub repo and it works unmodified in EhBasic. Here's a link:

https://github.com/RC2014Z80/RC2014-BAS ... brot/Ascii

I plan to time it on my 1 MHz 65c02 and compare it to my Forth version.
A little fine-tuning of the program may yield a little more performance. Some statements can be combined on a single line of code, which reduces the amount of work the interpreter has to do in following the internal line links.

Re: RC2014 ASCII Mandlebrot BASIC Example Runs in EhBasic

Posted: Mon Dec 26, 2016 9:07 pm
by Martin_H
The elapsed execution time was 21 minutes 48 seconds and produced this output:

Code: Select all

...............................,,,,,,,,,,,,,,,,,...............................
...........................,,,,,,,,,,,,,,,,,,,,,,,,,...........................
........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,........................
......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,......................
....................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....................
..................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,~~..................
.................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,';~~'.................
................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~''~................
..............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~''~',,..............
.............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~~''~',,,,.............
............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'^~~~''~',,,,,,............
...........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'!~~~''!'',,,,,,,...........
..........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~!~~!'';'',,,,,,,,,..........
.........''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,''^!~~:~~^!',,,,,,,,,,,.........
........''''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~:!~~^~~!^'',,,,,,,,,,,,........
........''''''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,'':!!~~^~~^!'',,,,,,,,,,,,,........
.......!^~''''''',,,,,,,,,,,,,,,,,,,,,,,,,''~[!!~!;~~^!'',,,,,,,,,,,,,,,.......
......''!:~''''''''',,,,,,,,,,,,,,,,,,,'''~//!!!!:~~^:~'',,,,,,,,,,,,,,,,......
.....'''^!:~~'''''''''',,,,,,,,,,,,,''''~<;^!!!;:~~^!;'',,,,,,,,,,,,,,,,,,.....
.....''''^!:~~~''''''''''''''''''''''~~ : :!!!#:!~;!:''',,,,,,,,,,,,,,,,,,.....
....''''''^![!~~~~'''''''''''''''~~~~?[ &&::;/:^!:O!~'',,,,,,,,,,,,,,,,,,,,....
....''''''';![!~~~~~~~~~~~~~~~~~~~~/x       ?; /:/ &''',,,,,,,,,,,,,,,,,,,,....
...,'''''''':![^~~~~~~~~~~~~~~~~! O         <  :?<[~''',,,,,,,,,,,,,,,,,,,,,...
...,''''''''<:!<^!~~~~~~~~~~~~!:             [x?X^ '''',,,,,,,,,,,,,,,,,,,,,...
..,,,''''''''<:!?^!~~~~~~~~~!^;                 /[&''',,,,,,,,,,,,,,,,,,,,,,,..
..,,,''''''''<::!?;^!!~~~~!!^^                  /:^''',,,,,,,,,,,,,,,,,,,,,,,..
..,,,''''''''':::! /^^^!!!^^^[                  [:;''',,,,,,,,,,,,,,,,,,,,,,,..
.,,,''''''''''!: :: ?;^^^^^:/                    : ~''',,,,,,,,,,,,,,,,,,,,,,,.
.,,,''''''''''!x[ :/<<[;;;;&                      : ~'',,,,,,,,,,,,,,,,,,,,,,,.
.,,,'''''''''''<     <?<//&                       <^</!,,,,,,,,,,,,,,,,,,,,,,,.
.,,'''''''''''!:      xxOx                         [ :^!,,,,,,,,,,,,,,,,,,,,,,.
,,,'''''''''''![                                    &:!~,,,,,,,,,,,,,,,,,,,,,,,
,,'''''''''''~!                                   [ ~~''',,,,,,,,,,,,,,,,,,,,,,
,,''''''''''~!!                                  X/~~'''',,,,,,,,,,,,,,,,,,,,,,
,~~~~~~'~~~~!!                                     ~'''''',,,,,,,,,,,,,,,,,,,,,
,~^~~~~~~~!!!                                       '''''',,,,,,,,,,,,,,,,,,,,,
~~~&^~~~!!!!?                                    &!!''''''',,,,,,,,,,,,,,,,,,,,
~~~^:^^!!!:<                                     <~~''''''',,,,,,,,,,,,,,,,,,,,
!![^&:;;::?                                    [!!~~~'''''',,,,,,,,,,,,,,,,,,,,
                                             &;:^!~~~''''''',,,,,,,,,,,,,,,,,,,
!![^&:;;::?                                    [!!~~~'''''',,,,,,,,,,,,,,,,,,,,
~~~^:^^!!!:<                                     <~~''''''',,,,,,,,,,,,,,,,,,,,
~~~&^~~~!!!!?                                    &!!''''''',,,,,,,,,,,,,,,,,,,,
,~^~~~~~~~!!!                                       '''''',,,,,,,,,,,,,,,,,,,,,
,~~~~~~'~~~~!!                                     ~'''''',,,,,,,,,,,,,,,,,,,,,
,,''''''''''~!!                                  X/~~'''',,,,,,,,,,,,,,,,,,,,,,
,,'''''''''''~!                                   [ ~~''',,,,,,,,,,,,,,,,,,,,,,
,,,'''''''''''![                                    &:!~,,,,,,,,,,,,,,,,,,,,,,,
.,,'''''''''''!:      xxOx                         [ :^!,,,,,,,,,,,,,,,,,,,,,,.
.,,,'''''''''''<     <?<//&                       <^</!,,,,,,,,,,,,,,,,,,,,,,,.
.,,,''''''''''!x[ :/<<[;;;;&                      : ~'',,,,,,,,,,,,,,,,,,,,,,,.
.,,,''''''''''!: :: ?;^^^^^:/                    : ~''',,,,,,,,,,,,,,,,,,,,,,,.
..,,,''''''''':::! /^^^!!!^^^[                  [:;''',,,,,,,,,,,,,,,,,,,,,,,..
..,,,''''''''<::!?;^!!~~~~!!^^                  /:^''',,,,,,,,,,,,,,,,,,,,,,,..
..,,,''''''''<:!?^!~~~~~~~~~!^;                 /[&''',,,,,,,,,,,,,,,,,,,,,,,..
...,''''''''<:!<^!~~~~~~~~~~~~!:             [x?X^ '''',,,,,,,,,,,,,,,,,,,,,...
...,'''''''':![^~~~~~~~~~~~~~~~~! O         <  :?<[~''',,,,,,,,,,,,,,,,,,,,,...
....''''''';![!~~~~~~~~~~~~~~~~~~~~/x       ?; /:/ &''',,,,,,,,,,,,,,,,,,,,....
....''''''^![!~~~~'''''''''''''''~~~~?[ &&::;/:^!:O!~'',,,,,,,,,,,,,,,,,,,,....
.....''''^!:~~~''''''''''''''''''''''~~ : :!!!#:!~;!:''',,,,,,,,,,,,,,,,,,.....
.....'''^!:~~'''''''''',,,,,,,,,,,,,''''~<;^!!!;:~~^!;'',,,,,,,,,,,,,,,,,,.....
......''!:~''''''''',,,,,,,,,,,,,,,,,,,'''~//!!!!:~~^:~'',,,,,,,,,,,,,,,,......
.......!^~''''''',,,,,,,,,,,,,,,,,,,,,,,,,''~[!!~!;~~^!'',,,,,,,,,,,,,,,.......
........''''''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,'':!!~~^~~^!'',,,,,,,,,,,,,........
........''''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~:!~~^~~!^'',,,,,,,,,,,,........
.........''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,''^!~~:~~^!',,,,,,,,,,,.........
..........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~!~~!'';'',,,,,,,,,..........
...........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'!~~~''!'',,,,,,,...........
............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'^~~~''~',,,,,,............
.............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~~''~',,,,.............
..............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~''~',,..............
................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'~~~''~................
.................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,';~~'.................
..................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,~~..................
....................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,....................
......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,......................
........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,........................
...........................,,,,,,,,,,,,,,,,,,,,,,,,,...........................
...............................,,,,,,,,,,,,,,,,,...............................

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Sat Jan 07, 2017 3:10 pm
by ArnoldLayne
On my homebrew 65c02 machine, execution time of the unmodified program was 2.43 minutes @8MHz.
I then tried using INC COUNTER instead of COUNTER=COUNTER+1 in line 150 and got 2.35 minutes.

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Sun Jan 08, 2017 1:04 am
by Martin_H
ArnoldLayne wrote:
On my homebrew 65c02 machine, execution time of the unmodified program was 2.43 minutes @8MHz.
I then tried using INC COUNTER instead of COUNTER=COUNTER+1 in line 150 and got 2.35 minutes.
That makes perfect sense as it is roughly 1/8 the time and your machine clocks 8 times faster. I bet my Forth version would finish in about 30 seconds on your machine.

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Sun Jan 08, 2017 10:32 am
by ArnoldLayne
Martin_H wrote:
I bet my Forth version would finish in about 30 seconds on your machine.
I am really intrigued to test that, but unfortunately I do not have Forth running on my machine yet. But as soon as I do, I'll let you know.
Which Forth flavour would you recommend?

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Sun Jan 08, 2017 2:12 pm
by Martin_H
ArnoldLayne wrote:
Martin_H wrote:
I bet my Forth version would finish in about 30 seconds on your machine.
I am really intrigued to test that, but unfortunately I do not have Forth running on my machine yet. But as soon as I do, I'll let you know.
Which Forth flavour would you recommend?
An ANS Forth compliant version would be best, as that allows GForth programs to run unmodified.

I ported Tali Forth to my machine because it conforms to modern Forth syntax. Here's a link:

https://github.com/scotws/TaliForth

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Tue Jul 03, 2018 10:30 pm
by BillO
Forth is a neat idea, but on a 65C02 SBC without external storage how do you save CREATE d word definitions?

I suppose you could have them in a text file that is re-submitted every time you boot Forth. Or perhaps there is a method to save the RAM library?

My Forth concepts are a little rusty, so I may be missing something.

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Tue Jul 03, 2018 11:24 pm
by GARTHWILSON
You could save compiled images in a tiny flash module or something like that, but on my workbench computer, I just send it the source code every time I use it, and it compiles or assembles or interprets on the fly, as appropriate.

Re: RC2014 ASCII Mandelbrot BASIC Example Runs in EhBasic

Posted: Mon Jul 09, 2018 12:45 am
by Martin_H
BillO wrote:
Forth is a neat idea, but on a 65C02 SBC without external storage how do you save CREATE d word definitions?

I suppose you could have them in a text file that is re-submitted every time you boot Forth. Or perhaps there is a method to save the RAM library?
I upload them from a file on a host computer over a serial link and let them be recompiled. I have an IEC port on my SBC, so one of these days I plan to get an SD2IEC working with Forth.