Jump to content
Posted Sun May 14, 2017 6:19 AM
Posted Sun May 14, 2017 9:46 AM
Posted Sun May 14, 2017 10:12 AM
Posted Sun May 14, 2017 12:19 PM
I have a bunch of questions specific to Turboforth so I'm going to ask here instead of going on a wild goose chase.
I need to learn the base system before I can move ahead with programs.
Am I to understand that a block is a disk file area where words get stored for multiple programs?
And using the EDIT function allows me to see the currently loaded BLOCK?
I read notes on how to change the default block and manually load one you want. What about listing available blocks and seeing the contents?
Is it OK to assume that each new block contains no words except the default definitions that come with TF?
Or is the only thing available being the built in functions that define words?
How do I save programs? (Words) So that after a power cycle I can get back to TF with TOM Dick Harry And Dice-Roll still available?
Where can I find a list of all the syntax. For instance ! , . : ; etc...
Where can I find a list of words that come with TF (if any) and how can I see and view the functions of all words currently available (including ones I wrote etc..)?
Am I to understand that a finished program will in essence become a word?
Right now my biggest challenge is picturing all this in my head and not knowing how to see it on the screen, the stack, the words, the word definitions etc...
I'm wanting a way to visualize or see the stack so I can better understand everything that is going into it and how it changes when needed.
Am I to understand that TF only ever works from the top of the stack ever? That variables are the only things that need the stack to get reorganized (search the stack, move to top work from there)?
How big can the stack get and are there trimming functions to minimize the stack size? Which in turn I think will save ram.
How do I know how much ram I'm using?
So many more but that's it for now.
I know, I'm over thinking this. i can't help it. This is so strange. Oh wait, is there a compiler for forth so that others can run forth created programs without forth?
What about forth programs to Cartridge? How does that work?
Posted Sun May 14, 2017 5:21 PM
I guess my real question is, where do I find the manual for Turbo Forth v1.2?
Posted Sun May 14, 2017 6:12 PM
Posted Sun May 14, 2017 7:14 PM
Posted Mon May 15, 2017 4:45 AM
Just to put it out there, my interest is to see if i can rewrite my Zombi game in Forth and compare the final compiled version performance against what I currently have. I'm hopeful I can save a lot of ram AND get much better performance in TF. And since I'm using TidBit, the elimination of line numbers should make it easier to breakdown and convert. But I do define and use a lot of variables. So I'll be exploring ways to eliminate the need to do so. I've gotten side tracked from other projects so this week I'll allocate the proper time for each. TF will probably be limited to a few hours a week as I've started a self paced Computer Science course (non degree course) to learn other languages as well. First course is SQL. Something I've been meaning to learn for many years, then Java then C etc.. All while keeping the TI relevant and trying to get my side business off the ground while keeping my day job..
Edited by Sinphaltimus, Mon May 15, 2017 4:46 AM.
Posted Mon May 15, 2017 4:48 AM
Posted Mon May 15, 2017 8:57 AM
Post me a link to your zombie game. I'll take a look at it.
Posted Mon May 15, 2017 6:28 PM
My 2 cents for Sinpahltimus is to get a text editor or word processor and try writing what the different parts of the game do in your own words.
Try not to think in basic, but chop the game up into the different sections of code that need to do specific stuff and say it in English.
The secret to good Forth programs is very well demonstrated by Willsy's Primer #3.
It takes some practice to stop thinking the way that BASIC forces us to think.
For example I re-did a version of the denile program the way I would do it and here is the main routine called RUN:
: RUN ( -- ) 2 SCREEN CHANGE-CHARS CLEAR .PYRAMID .STARS .MOON .RIVER HONK RESTORE-CHARSET ;
2 SCREEN is CALL SCREEN(2). So you know I changed it to a night scene.
The Forth word '.' (dot) prints a number so some people put a DOT in front of words that put stuff on the screen.
Now you understand what this program does pretty much right away. And it's because it was "factored" into small pieces.
Oh and I had to add the stars and a moon in a night scene. :-)
And the .RIVER word is actually a loop that does all the action with the water and star twinkling and exits if you hit a key.
It looks like this:
Hope this helps.
: .RIVER ( -- ) INIT-WAVES BEGIN 100 MS .WAVES 3 TWINKLES KEY? UNTIL ;
Edited by TheBF, Mon May 15, 2017 6:42 PM.
0 members, 0 guests, 0 anonymous users