6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 6:08 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Mon Dec 26, 2016 8:48 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
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.


Last edited by Martin_H on Thu Dec 29, 2016 3:25 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 26, 2016 8:57 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8144
Location: Midwestern USA
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.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 26, 2016 9:07 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
The elapsed execution time was 21 minutes 48 seconds and produced this output:

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


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 07, 2017 3:10 pm 
Offline

Joined: Sun Dec 28, 2014 11:04 pm
Posts: 81
Location: Munich, Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 08, 2017 1:04 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
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.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 08, 2017 10:32 am 
Offline

Joined: Sun Dec 28, 2014 11:04 pm
Posts: 81
Location: Munich, Germany
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?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 08, 2017 2:12 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 03, 2018 10:30 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1000
Location: Canada
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.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 03, 2018 11:24 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
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.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 09, 2018 12:45 am 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 565
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: