6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 10, 2024 8:44 am

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Fri Mar 07, 2014 7:57 pm 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Quote:
Somehow I got wrapped around the idea that for it to be a Forth, it had to be Forth-83 compliant, or even ans-compliant. And that meant having BLOCK work just like in Leo Brodie's "Starting Forth" book

Keep in mind that there are embedded Forth applications running from ROM, with no mass storage of any kind, and even compiled with headerless code so they can't look anything up in a dictionary, and in that case you can also remove FIND : , C, CREATE ALLOT and so on.

My workbench computer has very little human I/O, and, although it can read and write serial EEPROMs and large serial flash memories, it really has no file system built in. All program material I load into it comes to it as source code over an RS-232 line from the PC (or other host), and it compiles, assembles, or interprets, as appropriate, on the fly, as the source code is coming in. The PC just thinks it's printing the material to an old serial printer with no graphics capability. The workbench computer has Forth-83 in EPROM (with additions I have chosen from many sources) but it doesn't know what a block is. I formed the Forth on the PC and programmed it into the EPROM, including the Forth assembler.

_________________
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: Fri Mar 07, 2014 9:00 pm 
Offline

Joined: Sun Jul 28, 2013 12:59 am
Posts: 235
Brad R wrote:
Are you aware that BLOCK is an optional word in ANS Forth? Blocks vs. files is one of the oldest debates in Forthdom; the ANS committee compromised by specifying the behavior of both, but requiring neither to be present.

I was looking through this part of the spec not so long ago while I was trying to figure out how best to update my own Forth system, and I noticed that while the committe specified that you must implement the BLOCK wordset if you want to implement the File-Access wordset, there's apparently no requirement to define valid blocks, which leads to a fairly trivial, standard-conforming, and completely useless implementation.

Still, if you want ANS compliance, support for files, and couldn't be bothered about blocks, it's an option.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 07, 2014 10:45 pm 
Offline

Joined: Tue Jan 07, 2014 8:40 am
Posts: 91
I had forgotten about that requirement. But somewhere in the fine print there's also the detail that you can make any "required" word set user-loadable. Which means it's sufficient to provide the source code for BLOCK. (This gave an "out" to those who wanted to make a files-only Forth.)

_________________
Because there are never enough Forth implementations: http://www.camelforth.com


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

All times are UTC


Who is online

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