Re: [M100] list up?
Seems like it On Tue, Mar 30, 2021 at 3:58 PM Stephen Adolph wrote: > Hi folks, just checking if the list is up. > cheers >
[M100] list up?
Hi folks, just checking if the list is up. cheers
Re: [M100] Does anyone actually use MFORTH?
"I’m not sure how that would work since .S has no idea what you think should be on the stack at any given time. It can only show you what is there now." It doesn't know, but it doesn't need to ... The stack has a fixed starting point. An underflowed stack's pointer has gone beyond that point, so the stack depth becomes negative. So what I suggested is .S could print a message if the stack depth has become negative. And the other thing it could do is correct the stack pointer back to it's initial value if it has become negative. Now since it underflowed it may have already corrupted something. So the last bit of the suggestion was to add a little unused space past the bottom of the stack so when you dip into it, nothing gets smacked up immediately. Ultimately of course the answer is: keep the stack balanced. And backup your ram to a REX bank while you're programming because everyone messes up.
Re: [M100] M100 Digest, Vol 123, Issue 30
> I don't expect everything to have bounds checking, but I'm using .S a lot > to inspect the stack, so having to reset the machine all the time and start > over kind of sucks. If I knew more about the system maybe I could rewrite > .S to know if it's looking at the stack or what's underneath? Yes, should be fairly trivial: : .s depth 0= if ." BARF!" else .s then ;
Re: [M100] Does anyone actually use MFORTH?
Thanks for the instructional videos, Birt! The general Forth-y bits of it have been helpful and If I had a C=64 kicking around I'd definitely give DurexForth a try. The problem with .S is that if the stack has underflowed, it just keeps reading past the bottom until I assume it wraps all the way around memory and ends up back at the real bottom of the stack. Normally this means reset and you don't get a chance to see what you did wrong. Yesterday I was able to write a wrapper that checks DEPTH first and says something instead of spewing garbage: : .SS DEPTH 0 < IF ." YOU DUN GOOFED" ELSE .S THEN ; This has saved me a lot of resetting in the interim, but it'd be nice to not have to re-enter it every time, and I think it might be corrupting 4 bytes of memory just below MFORTH's stack with that DEPTH and subsequent 0 comparison. Maybe also for the error message string? Guess I'll find out eventually. :D Since DEPTH seems to know where the end of the stack is, and appropriately gives a negative number if you underflow, idk why .S couldn't do the same. If I can wrap my head around the assembly source for MFORTH, I might try to patch that in a sanity check and make a new ROM image. A project for another day I suppose. On Tue, Mar 30, 2021 at 8:49 AM Jeffrey Birt wrote: > The word .S prints out what is on the stack at that time without > disturbing it. It will never show you more or less than what is on the > stack. If what is on the stack does not make sense it is because of an > error in programming and this is very, very easy to do. > > > > One of the most helpful things for me was to write out each line of code > (each Word) on a different line and add a comment to the left as to what > the stack contents would be afterwards. While this is time consuming it has > the benefit of making it clear what is happening to the stack after each > step. > > > > One of the best parts of Forth is that it encourages you to create small > modules which are easier to debug. If you create a new word that is > supposed to take two values off the stack and manipulate them and return > the result you can check the functionality by clearing the stack, typing in > two test values and then executing your new Word. Then to a .S to check the > result. Remember though that .S leave the stack contents there so if you > want to run another such test you would want to clear the stack first. > > > > Jeff Birt > > > > *From:* M100 *On Behalf Of *Alex ... > *Sent:* Monday, March 29, 2021 1:25 PM > *To:* m...@bitchin100.com > *Subject:* Re: [M100] Does anyone actually use MFORTH? > > > > Cool, so newbie mistakes and ignorance. As long as my computer's working > properly. :) > > > > What threw me off is in the book, (pg.25) it talks about returning usually > 0 and printing STACK EMPTY, which is definitely not how the machine behaved > when trying it. > > > > I don't expect everything to have bounds checking, but I'm using .S a lot > to inspect the stack, so having to reset the machine all the time and start > over kind of sucks. If I knew more about the system maybe I could rewrite > .S to know if it's looking at the stack or what's underneath? > > > > About the editor: I skipped over the whole chapter on the arcane line > editor and page/block-based disk storage since this machine has none of > that. Using TEXT with .DO files works ok, as long as whatever I'm doing > doesn't trample the files in RAM. > > > > Thanks for the tutorial videos, Birt. They've been helpful! If I had a > C=64 kicking around here I would definitely give DurexForth a try. > > On Mon, Mar 29, 2021, 08:37 Jeffrey Birt wrote: > > This is the default behavior for most all vintage 8-bit Forth > implementations. To do a bounds check might take 6-10 machine cycles for > every word. This does not seem like a lot, but it would have a noticeable > impact on performance. > > > > When I ventured Forth a few years ago I found that Forth Inc has a PC > based Forth Dev system that is pretty forgiving and a good way to learn > without crashing a machine. https://www.forth.com/ . There is also a good > online Forth tutorial with a web based Forth implementation: > https://skilldrick.github.io/easyforth/ > > > > I got the most out of DurexForth which is a modern Forth implementation on > the C64. You still get the vintage goodness but with a good VI like editor > and actual file support rather than the super goofy and crude typical Forth > screens and blocks. I did a few cheesy Forth videos at the time too: > https://www.youtube.com/watch?v=TXIDqptXmiM (lots of links in the > description). > > > > Jeff Birt > > > > *From:* M100 *On Behalf Of *Alex ... > *Sent:* Sunday, March 28, 2021 9:39 PM > *To:* Model 100 Discussion > *Subject:* [M100] Does anyone actually use MFORTH? > > > > Hello Tandy laptop nerds, > > So I've been reading Leo Brodie's "Starting Forth" and using my '102 as a > playground / labrat. There's been a few inconsistencies I expected and can > live with/work
Re: [M100] In over my head? Or a Challenge!!
Well, I now have a fairly clean M100 PCB (using the glycerine and alcohol recipe), but no change on the LCD status (still not displaying on this unit though it works on my 8201a). More digging in my future. On Fri, Mar 26, 2021 at 6:40 PM Daryl Tester < dt-m...@handcraftedcomputers.com.au> wrote: > On 26/3/21 10:49 pm, Jeffrey Birt wrote: > > > Most people use Isopropyl Alcohol (IPA) I tend to use denatured alcohol > > (methylated spirits) as I can get it locally and inexpensively. Each > > type works a little better as a solvent on different types of things. > > I did see it referred to as IPA, but I'm with Jonathan on this - I > associate IPA with beer, which, given the context of using alcohol, > was confusing. :) > > On an unrelated note, does anyone want to buy a beer soaked M100? (j/k). > > Cheers, >--dt > -- -- Brad Grier
Re: [M100] Does anyone actually use MFORTH?
The word .S prints out what is on the stack at that time without disturbing it. It will never show you more or less than what is on the stack. If what is on the stack does not make sense it is because of an error in programming and this is very, very easy to do. One of the most helpful things for me was to write out each line of code (each Word) on a different line and add a comment to the left as to what the stack contents would be afterwards. While this is time consuming it has the benefit of making it clear what is happening to the stack after each step. One of the best parts of Forth is that it encourages you to create small modules which are easier to debug. If you create a new word that is supposed to take two values off the stack and manipulate them and return the result you can check the functionality by clearing the stack, typing in two test values and then executing your new Word. Then to a .S to check the result. Remember though that .S leave the stack contents there so if you want to run another such test you would want to clear the stack first. Jeff Birt From: M100 On Behalf Of Alex ... Sent: Monday, March 29, 2021 1:25 PM To: m...@bitchin100.com Subject: Re: [M100] Does anyone actually use MFORTH? Cool, so newbie mistakes and ignorance. As long as my computer's working properly. :) What threw me off is in the book, (pg.25) it talks about returning usually 0 and printing STACK EMPTY, which is definitely not how the machine behaved when trying it. I don't expect everything to have bounds checking, but I'm using .S a lot to inspect the stack, so having to reset the machine all the time and start over kind of sucks. If I knew more about the system maybe I could rewrite .S to know if it's looking at the stack or what's underneath? About the editor: I skipped over the whole chapter on the arcane line editor and page/block-based disk storage since this machine has none of that. Using TEXT with .DO files works ok, as long as whatever I'm doing doesn't trample the files in RAM. Thanks for the tutorial videos, Birt. They've been helpful! If I had a C=64 kicking around here I would definitely give DurexForth a try. On Mon, Mar 29, 2021, 08:37 Jeffrey Birt mailto:bir...@soigeneris.com> > wrote: This is the default behavior for most all vintage 8-bit Forth implementations. To do a bounds check might take 6-10 machine cycles for every word. This does not seem like a lot, but it would have a noticeable impact on performance. When I ventured Forth a few years ago I found that Forth Inc has a PC based Forth Dev system that is pretty forgiving and a good way to learn without crashing a machine. https://www.forth.com/ . There is also a good online Forth tutorial with a web based Forth implementation: https://skilldrick.github.io/easyforth/ I got the most out of DurexForth which is a modern Forth implementation on the C64. You still get the vintage goodness but with a good VI like editor and actual file support rather than the super goofy and crude typical Forth screens and blocks. I did a few cheesy Forth videos at the time too: https://www.youtube.com/watch?v=TXIDqptXmiM (lots of links in the description). Jeff Birt From: M100 mailto:m100-boun...@lists.bitchin100.com> > On Behalf Of Alex ... Sent: Sunday, March 28, 2021 9:39 PM To: Model 100 Discussion mailto:m100@lists.bitchin100.com> > Subject: [M100] Does anyone actually use MFORTH? Hello Tandy laptop nerds, So I've been reading Leo Brodie's "Starting Forth" and using my '102 as a playground / labrat. There's been a few inconsistencies I expected and can live with/work around, but I've noticed what seems like really bad bugs. It seems trivially easy to underflow the stack into la-la land. (For example: . . .S after a fresh boot will get it stuck spewing memory all over the screen) Has anyone actually used MFORTH for more than just simple tests? Is there maybe some hardware quirks involved here that don't exist on the Virtual-T emulator? Figured I'd cast this one out and see if anyone bites. -Alex -- Disclaimer: Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this article.) Thanks /usr/games/fortune
Re: [M100] Does anyone actually use MFORTH?
| Modifying .S to indicate a stack underflow error would be reasonable. It's a debugging tool, and not used by programs so it doesn't impact performance. I’m not sure how that would work since .S has no idea what you think should be on the stack at any given time. It can only show you what is there now. Most of the issues I had getting started was forgetting the effect on the stack of operations I was carrying out, forgetting I needed to do DUP first, etc. I wound up doing a lot of ‘paper coding’, writing down each word on a different line and comment to the left of it was the stack contents would be after it was done. This was a great benefit to seeing what was happening. Jeff Birt From: M100 On Behalf Of John R. Hogerhuis Sent: Tuesday, March 30, 2021 2:54 AM To: m...@bitchin100.com Subject: Re: [M100] Does anyone actually use MFORTH?
[M100] Olivetti Y2K
I didn't see one around anywhere(*), so if anyone wants, there's a y2K patched Olivetti M10 (North America) main rom here: http://tandy.wiki/Model_100_Y2K (*) There is *a* rom in VirtualT that claims to be for M10, but it's no good. -- bkw
Re: [M100] Does anyone actually use MFORTH?
On Mon, Mar 29, 2021 at 11:25 AM Alex ... wrote: > Cool, so newbie mistakes and ignorance. As long as my computer's working > properly. :) > > What threw me off is in the book, (pg.25) it talks about returning usually > 0 and printing STACK EMPTY, which is definitely not how the machine behaved > when trying it. > > I don't expect everything to have bounds checking, but I'm using .S a lot > to inspect the stack, so having to reset the machine all the time and start > over kind of sucks. If I knew more about the system maybe I could rewrite > .S to know if it's looking at the stack or what's underneath? > Modifying .S to indicate a stack underflow error would be reasonable. It's a debugging tool, and not used by programs so it doesn't impact performance. Modifying stack operations with underflow guards would be prohibitively expensive performance-wise given Forth is a "stack machine" language and our 80C85 isn't a speed demon by any stretch of the imagination. A compromise would be to add underflow checking/correction to .S, and add a few cells of space beyond the stack to allow it to underflow a little without causing damage. -- John.