6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 10:03 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Wed Aug 29, 2018 11:12 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
JimBoyd wrote:
My Forth is for a Commodore 64 so I'm stuck with blocks. Actually, blocks are not that bad, for virtual memory, not so much for source code. My programming style does not seem suited to blocks.

With a standard Forth block being 64x16, when I was on my Atari the block were crushed down to 32x16 (I think), because of the 40 character display.

It makes it even more frustrating.

Blocks are simple and elegant, but they do not lend themselves to long winded, formatted code with lots of whitespace.


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 31, 2018 8:40 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
Jeff_Birt wrote:
JimBoyd wrote:
My Forth is for a Commodore 64 so I'm stuck with blocks. Actually, blocks are not that bad, for virtual memory, not so much for source code. My programming style does not seem suited to blocks.


No, your not stuck with blocks. Durex Forth is for the C64 and uses files.

"stuck with blocks" was a poor choice of words on my part. It's more like what tradeoffs I'm willing to make given the hardware of the era. I want to keep the block buffer system for accessing the Ram Expansion Unit as virtual memory and I don't want to use a lot of memory adding a file editor. I took a look at Durex Forth. It seems to be rather minimalist and there wasn't much room for the dictionary to grow. I think the edit buffer started at hexadecimal 7000 but that can probably be moved. Still, I'm trying to balance speed and small size while fitting in what I feel is much needed functionality. BTW, I wrote a version of INCLUDE so I can now load files provided a line is terminated with a carrage return and no line is longer than 1024 characters. Now I just need to make it nestable.
Another reason I'm using blocks is that I plan to release this Forth when I'm finished and someone who used 64Forth or Blazin' Forth may still have source code in blocks.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 03, 2018 7:36 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
Regarding the size of the display mentioned above:
When I was using my HP-71 a lot in the late 1980's, I wrote a rather full-featured text editor for it to work with its limited one-line, 22-character display. (I have the HP92198 80-column HPIL-to-video interface too, but I also wanted to be able to use the hand-held computer portably, without the tether to the big, heavy 12" Zenith CRT monitor.) The small display is like looking at your work through a keyhole (for those old enough to remember the kind of locks you could see through). However, it's amazing what you can do if you can nimbly move this keyhole around your work. My editor used 7KB for the program itself. It was written in HP-71 BASIC but also used LEX (Language EXtension) files, written by the users' groups, that dramatically extended the capabilities of the already very impressive BASIC OS. I could have lots of files open at once, hotkeys, and lots of nice features. And of course one of the things I used it for was Forth source-code text files.

_________________
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 Sep 03, 2018 9:14 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
Oh, I don't have experience writing editors. The one I have is based on the one from Forth dimensions volume III number 3. Still, it might be interesting, if something of a challenge. A file editor on a utilities disk that can be optionally loaded. The utilities disk could also have tools to transfer source from files to blocks and from blocks to files. That would be the easy part. I already wrote BLKS>FILE which writes a range of blocks to a sequential file so I would have a Forth source file to test INCLUDE.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 05, 2018 8:34 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
GARTHWILSON wrote:
The small display is like looking at your work through a keyhole (for those old enough to remember the kind of locks you could see through). However, it's amazing what you can do if you can nimbly move this keyhole around your work.

I think I can apply that idea to the Starting Forth style editor and still be able to use the Commodore's screen editor.
64Forth did something along those lines, but it kept the cursor in the center of the window.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 05, 2018 8:48 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
whartung wrote:
Blocks are simple and elegant, but they do not lend themselves to long winded, formatted code with lots of whitespace.

I wrote a word to copy the source for my Forth kernel from blocks to a C64 sequential file. About 160 blocks produced a sequential file of about 45 kbytes!
Garth suggested an editing keyhole into the source.
I should be able to modify the editor to show a 36 column window into the block so I can see and edit just part of a source block without line wrapping on the C64 screen. Since it will be easier to add comments, there won't be so much wasted space.


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 05, 2018 9:06 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
JimBoyd wrote:
64Forth did something along those lines, but it kept the cursor in the center of the window.

Hopefully it did not do horizontal scrolling of the whole screen every time you type a character, just to keep the cursor centered! (I hope you only mean vertical scrolling, with horizontal scrolling done only on an as-needed basis to keep the cursor from going past the left or right edges.)

One thing I did in the editor on my HP-71 was assign a couple of keys as cursor keys to jump 15 characters at a time left or right, to get around faster on the 22-charcter LCD. There's auto-repeat on the regular cursor keys too of course, but if you turn the speed way up, it gets harder to stop exactly where you want. The LCD is 132 dots wide by 8 dots tall; and if I really want to see more at once, I could make two tiny rows of text with the characters 4 dots tall and 3 dots wide plus a dot column to separate characters. There's a lot you can do with a limited display if you're creative.

Quote:
I should be able to modify the editor to show a 36-column window into the block so I can see and edit just part of a source block without line wrapping on the C64 screen. Since it will be easier to add comments, there won't be so much wasted space.

Yes, unwanted wrapping is a pain.

The simplicity of the old Forth block system has its attractions though. I have often thought about (but never done anything about) the idea of making a block twice the normal width and height, 128 columns by 32 lines. 128 columns is enough for nearly everything. 64 is terrible. My 71's lines maxed out at 96.

_________________
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: Thu Sep 06, 2018 8:51 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
GARTHWILSON wrote:
Hopefully it did not do horizontal scrolling of the whole screen every time you type a character, just to keep the cursor centered! (I hope you only mean vertical scrolling, with horizontal scrolling done only on an as-needed basis to keep the cursor from going past the left or right edges.)

So you never tried 64Forth by Human Engineered Software and T. J. Zimmer? There is a cartridge image available for the VICE Commodore simulator. If it included plans for a device to connect to the PC so I could use it, the device, as the Commodore's user port, then I'd call it an emulator.
The editing window did not scroll vertically. The screen editor showed all 16 lines of a source block and it did scroll horizontally to keep the cursor centered horizontally. It would not scroll past the beginning or ending of the 64 character lines so the cursor would move away from the center if scrolled close to either end.
GARTHWILSON wrote:
The simplicity of the old Forth block system has its attractions though. I have often thought about (but never done anything about) the idea of making a block twice the normal width and height, 128 columns by 32 lines. 128 columns is enough for nearly everything. 64 is terrible. My 71's lines maxed out at 96.

A 4kb block? A super block! :lol:


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 06, 2018 9:34 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
No, I never tried Forth on the C64. Our older son used the C64 a lot when he was in junior high, to do things like write reports, with graphics, using GEOS and GeoWrite and GeoPaint and maybe others I'm forgetting (but never played games on it). I never got very familiar with the C64. The internet was in its infancy at the time, and BBSs were still more or less the prevalent type of online service. He downloaded tons of software over the modem from a BBS that was hundreds of miles away so there was a $70+ phone bill one month which I required him to pay. We never got into Forth on the C64 though. He later became somewhat of an expert in digital networks, and worked very successfully in that field, but he never did any programming, not even in BASIC, let alone 6502 assembly language. Maybe Forth would have gotten him interested.

_________________
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: Thu Sep 06, 2018 9:47 pm 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
The 64Forth cartridge is what got me interested in Forth in late 1991 at a time when the C64 was the only computer I had until 2002 or 2003 when I finally got a PC.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 07, 2018 1:39 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1207
Location: Soddy-Daisy, TN USA
GARTHWILSON wrote:
Our older son used the C64 a lot when he was in junior high, to do things like write reports, with graphics, using GEOS and GeoWrite and GeoPaint and maybe others I'm forgetting (but never played games on it).


Lots of people used the C64 for "serious" stuff like reports, school work, etc. But are you SURE he never loaded up Dig-Dug or some other game? The C64 is the ultimate game machine, after all. LOL

GARTHWILSON wrote:
He downloaded tons of software over the modem from a BBS that was hundreds of miles away so there was a $70+ phone bill one month which I required him to pay.


I was never allowed to use BBS's because those "infernal computer machines" were out to get us, take our jobs, and ruin our lives. At least that's what I always heard. So when the phone was picked up and the computer noise was heard, I was strongly reminded that I was not allowed to do that because of the gigantic phone bills that would come. Even though I was dialing local numbers. LOL.

Ah, how times have changed.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 07, 2018 7:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8428
Location: Southern California
cbmeeks wrote:
Lots of people used the C64 for "serious" stuff like reports, school work, etc. But are you SURE he never loaded up Dig-Dug or some other game? The C64 is the ultimate game machine, after all. LOL

Yeah, he and I hate games. We are not game people at all, and games have no business being on our computers. He would much rather be figuring something out, fixing something, etc.. My wife and other son enjoy games.

Quote:
So when the phone was picked up and the computer noise was heard, I was strongly reminded that I was not allowed to do that because of the gigantic phone bills that would come. Even though I was dialing local numbers. LOL.

Ah, how times have changed.

With my first online service (Genie), and later AOL, and then SBC Global IIRC, the numbers were local, so they did not add to the phone bill, only meant the phone was not available at the same time. Now the phone almost never gets used, except the line is also how we get our DSL which is available at the same time.

_________________
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 May 08, 2023 12:46 am 
Offline

Joined: Fri May 05, 2017 9:27 pm
Posts: 851
Jeff_Birt wrote:
BigEd wrote:
(Forth on Vectrex sounds interesting. Let the dog see the rabbit, as they say:
https://www.youtube.com/watch?v=0_OprEzRG2s
via
http://vectorgaming.proboards.com/threa ... th-parts-1
)


Thanks I did not think of posting the link to the Vectrex project.

After playing with the Easy Forth interpreter I have to say I REALLY like the stack display at the top of the window. That makes it sooo much easier to visualize what is happening. This would probably be a great addition to any Forth environment.

As I said, I would not want a permanent data stack display; however, I show how to add it to Fleet Forth on a temporary basis.


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

All times are UTC


Who is online

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