6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 1:45 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Apr 13, 2019 6:24 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
JimBoyd wrote:
As my previous post hinted, Forth has one more advantage over BASIC, the use of low level code. Once the logic of a program is tested, the slower parts ( like inner loops ) can be rewritten as CODE words. A code definition gets compiled to the same dictionary as high level words, at least on the C64 Forths I've seen ( including my own Fleet Forth .) The entire dictionary can be saved to disk as a new Forth with a single command. In Fleet Forth it is FSAVE. In Blazin' Forth it is SAVE-FORTH. In BASIC, someone can still use low level code with the SYS and USR commands, but then has to decide where to put it and usually manage the loading and saving of the low level code separate from the BASIC code.

We need to be specific here; Acorn BBC BASIC also lets you use inline assembly, and by all accounts, seems to be more powerful than most Forth assemblers I've seen.


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 14, 2019 3:14 am 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
kc5tja wrote:
We need to be specific here; Acorn BBC BASIC also lets you use inline assembly, and by all accounts, seems to be more powerful than most Forth assemblers I've seen.

Actually, no we don't have to be specific. BBC BASIC seems to be an outlier of the large array of BASIC implementations, especially BASICs on micros. In contrast, the statements about Forth (especially micro Forths) are widely supported. Yet there are certainly examples of Forth that did not have such a facility.

So saying "Forth has one more advantage over BASIC, the use of low level code" as a broad, general statement is perfectly valid.

And the assembler in BBC basic doesn't address the high level extensibility of Forth as particularly manifest by the existent of Forth assemblers. FIG-Forth, as an example, does NOT come with an assembler. It starts as an assembly source file, that compiled in to an operating Forth system. But it's quite possible, without access to the original FIG assembly source listing, to create a first class assembler in Forth, in to something that one would be hard pressed to discern was not "built in" to the system.

This first class extensibility of Forth is vastly different from BASIC in the large, and BBC BASIC specifically. However good the assembler in BBC BASIC is, that's as good as it's going to get. It can't be readily augmented, it can't be readily replaced, it can't be anything. Not by the end user, at least. You get what you get since you can not recreate BBC BASIC readily yourself. The extensibility of BASICs in general is quite limited in comparison to Forth.


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 17, 2019 6:34 pm 
Offline

Joined: Sat Jan 04, 2003 10:03 pm
Posts: 1706
I'm very well versed in Forth, having implemented several dialects myself over the years and having personal interactions with a number of significant members of the Forth community, including Moore, Dr. Ting, and others. I'm a regular contributor to the Silicon Valley Forth Interest Group, where my talks are frequently uploaded via Youtube. You can also search this forum for my nickname and my conversations with GARTHWILSON to see how steeped in Forth I am. It is my preferred programming language and programming environment, even today.

I understand that your scope of context was the majority of BASIC-hosting microcomputers. My aim was not to be confrontational, but to enlighten: not all BASIC systems were so crippled as the thesis of the paragraph I quoted implied.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 19, 2019 8:11 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 895
kc5tja wrote:
We need to be specific here; Acorn BBC BASIC also lets you use inline assembly, and by all accounts, seems to be more powerful than most Forth assemblers I've seen.

Huh? I thought "Speed of Forth vs. BASIC on C64" was pretty specific.
Quote:
not all BASIC systems were so crippled as the thesis of the paragraph I quoted implied.

Again, I thought we were discussing the Commodore 64.

Oh wait, I see my mistake. I inadvertently caused topic drift. This:
Quote:
Different Forths for the 65XX with the same threading could have vastly different speeds depending on the ratio of primitives ( and which words are primitives ) in each kernel.

Should have been this:
Quote:
Different Forths for the C64 with the same threading could have vastly different speeds depending on the ratio of primitives ( and which words are primitives ) in each kernel.


Top
 Profile  
Reply with quote  
PostPosted: Sun May 14, 2023 9:55 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 895

Before I get flamed for this, keep in mind this thread has been dormant for over three years. [It's actually over four. I was thinking about this last year.]
Code:
$400 CONSTANT SCREEN
#1000 CONSTANT SCREEN-SIZE
1 CONSTANT A-CODE
: DOIT
   SCREEN SCREEN-SIZE A-CODE FILL ;

1 is the screen code for the PETSCII character 'A'.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 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: