Opry99er Posted April 15, 2013 Share Posted April 15, 2013 A bit off topic, but I found another vintage computer which runs Forth natively in it's console ROM. =) Canon Cat <---click here for more info on CanonCatForth ***One for sale on eBay Canon Cat 1 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 15, 2013 Share Posted April 15, 2013 (edited) Made a classic mistake.... And then I got this........ Disappointed, I re-read the reference card, changed to this: : DRAW XBAR 7 42 10 HCHAR And then got the desired result. =) ***RTFM!!!!*** Edited April 15, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted April 15, 2013 Share Posted April 15, 2013 Another difference between TF and TIF. In TIF, this would be : DRAW 7 XBAR 10 42 HCHAR ; Also, it looks like you changed the count from 10 to 20. ...lee Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 15, 2013 Share Posted April 15, 2013 Ahh yes, I did... The box was off center, so I changed it to 20. =) Thanks for the catch there. Yea, I actually thought I'd found another misleading section of the TF documentation and I started writing a post about it... Before I sent it though, I re-read the ref card and discovered it was I who was mistaken. Next I'll be re-defining some standard character sets and working toward building my title screen. (See my avatar) Owen Quote Link to comment Share on other sites More sharing options...
slinkeey Posted April 16, 2013 Share Posted April 16, 2013 (edited) Canon Cat <---click here for more info on CanonCatForth Interesting Machine. Cool link. Bruce Damer's DigiBarn! I use a product that he aquired called, Traveler. Edited April 16, 2013 by slinkeey Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 16, 2013 Share Posted April 16, 2013 It's a VERY interesting machine.... Too bad there's no support for it and no community. =) Still though... would look VERY cool on my war-room desk. =) (once I get it set up, that is.) Quote Link to comment Share on other sites More sharing options...
Willsy Posted April 16, 2013 Share Posted April 16, 2013 Ahh yes, I did... The box was off center, so I changed it to 20. =) Thanks for the catch there. Yea, I actually thought I'd found another misleading section of the TF documentation and I started writing a post about it... Before I sent it though, I re-read the ref card and discovered it was I who was mistaken. Next I'll be re-defining some standard character sets and working toward building my title screen. (See my avatar) Owen I'm pretty sure I followed the TI BASIC conventions with HCHAR/VCHAR/GCHAR with respect to the order of the arguments. I figured if I was going to use the same name as the TI BASIC versions it would be a bit of an insult to change the order of the arguments! However, unlike TIB/XB the number of repeats is not optional! Forth on! Quote Link to comment Share on other sites More sharing options...
Willsy Posted February 16, 2020 Share Posted February 16, 2020 Oh my this was seven years ago! We should keep this thread alive and include fbForth and Forth99. 3 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted February 17, 2020 Share Posted February 17, 2020 (edited) 15 hours ago, Willsy said: Oh my this was seven years ago! We should keep this thread alive and include fbForth and Forth99. I can't prove it but I swear that time moves faster in the the 12st 21st century. Nice to see you back BTW. Hope life is treating you well. I have been recounting my fun and travails over on the Camel99 Forth topic. I will have to give some thought to some meaningful content for here. I started a Youtube channel and the plan was to create some video to explain how to use my system and I wanted to give some demonstrations of how to do some real things in Forth. Maybe that can be my contribution over here. Edited February 17, 2020 by TheBF dislexia 1 Quote Link to comment Share on other sites More sharing options...
+Lee Stewart Posted February 17, 2020 Share Posted February 17, 2020 4 minutes ago, TheBF said: I can't prove it but I swear that time moves faster in the the 12st century. Type much? ? I know you meant “21st century”—and, yes, it does. I think it might have a little to do with the fact that I have far less time left on this plane than I have spent! ...lee 1 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted February 17, 2020 Share Posted February 17, 2020 lol. Yes I type a great deal and very poorly. Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 Questions about Forth and the f4 key on console or classic99..when I make a loop, you know..loop..how do I break the loop? Does it have to be part of the WORD or is it stuck in forever loop until I shut the computer off? Is there a f4 break key on a loop? A simple : TEST DO ." HELLO " LOOP ; it goes forever...how to stop it? Quote Link to comment Share on other sites More sharing options...
+TheBF Posted May 12, 2020 Share Posted May 12, 2020 2 minutes ago, DavidC said: Questions about Forth and the f4 key on console or classic99..when I make a loop, you know..loop..how do I break the loop? Does it have to be part of the WORD or is it stuck in forever loop until I shut the computer off? Is there a f4 break key on a loop? A simple : TEST DO ." HELLO " LOOP ; it goes forever...how to stop it? Forth words are built on the idea that each routine should do one thing. You will find therefore that LOOP etc. have no way out. But it is simple to add. The word ?TERMINAL reads the F4 on the TI and returns true if it is pressed. So you could do this: : ?BREAK ?TERMINAL ABORT" BREAK KEY DETECTED!" ; Add the word ?BREAK anywhere that you think you might want to stop the program. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted May 12, 2020 Share Posted May 12, 2020 I suppose it would be wrong to leave out just how configurable Forth is. You are free to make DO/LOOP yourself in a different way if you really want to dig into how the compiler is built. Or you could just add ?BREAK to the existing LOOP routine like this. (tested with FbForth) COMPILE is used for ordinary (non-immediate) Forth words. [COMPILE] is used to "compile" IMMEDIATE words. Now when you use LOOP in a definition it will first COMPILE the address of ?BREAK followed by the address of LOOP ; In other words you have changed the compiler! You could do the same thing with AGAIN, UNTIL and REPEAT. If you made a block with these words in it, you could load it first for testing programs. Then all you loops would be "breakable". Then re-compile without the breakable loops and run at full speed. \ breakable loop : ?BREAK ?TERMINAL ABORT" *BREAK*" ; : LOOP COMPILE ?BREAK [COMPILE] LOOP ; IMMEDIATE \ test it : STAR 42 EMIT ; : STARS ( n -- ) 0 DO STAR LOOP ; 20000 STARS ( hit fctn 4 when you get tired of it) Note:For ANS Forth like CAMEL99 Forth change LOOP to: : LOOP POSTPONE ?BREAK POSTPONE LOOP ; IMMEDIATE 1 Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 This is what happened using Turboforth on js99 on my chomebook....I know i am doing something wrong. Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 32 minutes ago, TheBF said: I suppose it would be wrong to leave out just how configurable Forth is. You are free to make DO/LOOP yourself in a different way if you really want to dig into how the compiler is built. Or you could just add ?BREAK to the existing LOOP routine like this. (tested with FbForth) COMPILE is used for ordinary (non-immediate) Forth words. [COMPILE] is used to "compile" IMMEDIATE words. Now when you use LOOP in a definition it will first COMPILE the address of ?BREAK followed by the address of LOOP ; In other words you have changed the compiler! You could do the same thing with AGAIN, UNTIL and REPEAT. If you made a block with these words in it, you could load it first for testing programs. Then all you loops would be "breakable". Then re-compile without the breakable loops and run at full speed. \ breakable loop : ?BREAK ?TERMINAL ABORT" *BREAK*" ; : LOOP COMPILE ?BREAK [COMPILE] LOOP ; IMMEDIATE \ test it : STAR 42 EMIT ; : STARS ( n -- ) 0 DO STAR LOOP ; 20000 STARS ( hit fctn 4 when you get tired of it) Note:For ANS Forth like CAMEL99 Forth change LOOP to: : LOOP POSTPONE ?BREAK POSTPONE LOOP ; IMMEDIATE So.....all that must be in a block? Not immediate mode? Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 I am so confused......but thats ok, thats why questions need to be asked... 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted May 12, 2020 Share Posted May 12, 2020 (edited) You should normally be in edit mode within a block. Intermediate mode or command mode is for testing a word before placing the word into your screen. Note. Some commands will not work in command line mode. Edited May 12, 2020 by GDMike 1 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted May 12, 2020 Share Posted May 12, 2020 10 minutes ago, DavidC said: This is what happened using Turboforth on js99 on my chomebook....I know i am doing something wrong. Turbo Forth doesn't have the word ?terminal. It is telling you that in error message. I think you make it though. : ?TERMINAL KEY? 2 = ; Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 1 minute ago, TheBF said: Turbo Forth doesn't have the word ?terminal. It is telling you that in error message. I think you make it though. : ?TERMINAL KEY? 2 = ; Ahhh, yes. Yes. I can make the word a word.....I keep forgetting that. ( plus I don't know what I am doing ). 2 Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 Alright! Now we are getting somewhere. Awesome. When it isnt late and I ( aint drinkin ) have time to dig deeper.. yes! Put this in a block, with whatever my foolish code is and it will break. It is a start, thank you! We all gotta start somewhere. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted May 12, 2020 Share Posted May 12, 2020 2 minutes ago, DavidC said: Alright! Now we are getting somewhere. Awesome. When it isnt late and I ( aint drinkin ) have time to dig deeper.. yes! Put this in a block, with whatever my foolish code is and it will break. It is a start, thank you! We all gotta start somewhere. Forth is a lot like learning a human language. Lots of words each with a specific meaning. BUT... you can change it as you go. 1 1 Quote Link to comment Share on other sites More sharing options...
GDMike Posted May 12, 2020 Share Posted May 12, 2020 Just back up your screens, as nothing is worse than losing a formula that wasn't easy to come up with. 1 Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 Just now, GDMike said: Just back up your screens, as nothing is worse than losing a formula that wasn't easy to come up with. Paper and pen, old school. I asked about that on stupid facebook page and yes. Notebook full of notes. Just in case.. Quote Link to comment Share on other sites More sharing options...
DavidC Posted May 12, 2020 Share Posted May 12, 2020 Now this is gonna come off as weird, but ....LOGO is a bit like Forth..define definitions of stuff, what was first? LOGO or Forth? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.