+Larry #1 Posted January 6, 2007 How does Quick! compare to Action!? Does it have more features (since not cartridge based)? Better support of math, especially floating point? I have read that in benchmarks, it is nearly as fast as Action!. Does anyone know what the newest version is? -Larry Quote Share this post Link to post Share on other sites
Gury #2 Posted January 6, 2007 Quick works on XL/XE line of computers, on 1200XL not! It is nearly or same of the speed of Action! and makes stand alone machine language object code. The whole package consists of compiler, source code editor and shell which connects those two. The version I got from Wrathchild (thank you) is 2.2 as documentation states. The language can be expanded with new libraries. I think I will look more deeply into this fine/great language. Quote Share this post Link to post Share on other sites
cas #3 Posted January 6, 2007 (edited) In my view ACTION! is a much better designed language. Quick is more like assembler with structure commands and a standard library. As far as I remember it is lacking compound variables like STRUCTS. Most commands compile directly into a JSR to a library function, whereas ACTION! has a more sophisticated compiler when it comes to compiling expressions. Having worked with both, I find Quick more flexible and more powerful. However if you never use the cool ACTION! features, you won't miss anything in Quick. Quick is as a language as rich as BASIC, whereas ACTION! is more lile C or Modula. Carsten Edited January 6, 2007 by cas Quote Share this post Link to post Share on other sites
Gury #4 Posted January 6, 2007 Most commands compile directly into a JSR to a library function, whereas ACTION! has a more sophisticated compiler when it comes to compiling expressions. Having worked with both, I find Quick more flexible and more powerful. However if you never use the cool ACTION! features, you won't miss anything in Quick. Quick is as a language as rich as BASIC, whereas ACTION! is more lile C or Modula. Carsten Hi again Cas, That's the point, I like Action!, because it's similar to C or Pascal. I use Delphi in PC world, because Object Pascal language is my favourite. 'Quick' indeed is powerful, but is more like something with special rules to it, like implementing VBIs and DLIs. In Action! you have more freedom. I just want to be sure about something. Which language did you mean to be more flexible and more powerful? From the context I guess you did mean Action!? Quote Share this post Link to post Share on other sites
cas #5 Posted January 6, 2007 (edited) I just want to be sure about something. Which language did you mean to be more flexible and more powerful? From the context I guess you did mean Action!? Yes, compared to Quick, ACTION! is the more powerful. Of course Forth is in it's own class, another level higher Carsten Edited January 6, 2007 by cas Quote Share this post Link to post Share on other sites
Pengwin #6 Posted January 7, 2007 Yes, compared to Quick, ACTION! is the more powerful. Of course Forth is in it's own class, another level higher I am thinking of using Quick to write some games for the A8, however, I use a Forth based system for the Spectrum. Could you recommend a Forth compiler/package for the A8 for writing games? Quote Share this post Link to post Share on other sites
Gury #7 Posted January 7, 2007 I just want to be sure about something. Which language did you mean to be more flexible and more powerful? From the context I guess you did mean Action!? Yes, compared to Quick, ACTION! is the more powerful. Of course Forth is in it's own class, another level higher Carsten Yes, Forth definitely is very powerful and flexible, you can even make other languages with it. I just had to adapt to the reverse logic (plus Forth inline assembler, which also follows this rule), but it is the right way, reading elements from stack, making Forth very fast. Quote Share this post Link to post Share on other sites
pps #8 Posted January 7, 2007 Hmm, not coded in forth so long, but CAS had done an actual release of Volksforth for the A8 System. This language has versions on C64, ATARI ST and many more too. Hava a look here: VolksForth Downloadpage Quote Share this post Link to post Share on other sites
Pengwin #9 Posted January 7, 2007 Thanks for the link pps. Just a couple of questions, is there a manual available and does it support PMG? Quote Share this post Link to post Share on other sites
cas #10 Posted January 7, 2007 (edited) Thanks for the link pps. Just a couple of questions, is there a manual available and does it support PMG? Hello Pengwin, > is there a manual available yes, but the manual is for the C64 Version and it is still in german language. I'm working on an English translation and on an update to the Atari Version. The German Manual is available here --> http://www.forth-ev.de/filemgmt/visit.php?lid=12 VolksForth follows the Forth83 standard. You can find Forth 83 tutorials and books online on the web. Also some books from the 80ies are available in libraries. I highly recommend "Starting Forth" from Leo Brodie. It's the best starters book. Here is an Online Version --> http://home.iae.nl/users/mhx/sf.html Stephen Pelc of MPE has written a new Online Book on Forth -- > http://www.mpeforth.com/arena/ProgramForth.pdf The US Forth Interest Group (FIG) has a list of online tutorials at http://www.forth.org/tutorials.html And of course you can always ask here or on "comp.lang.forth" If you read books and tutorials about Forth, please keep this in mind: All Forth Systems have the same base set of commands ("words"). All Forth have a set of their own commands ("words"), that you cannot find in another Forth. This is because of the nature of Forth, you program by extending the Forth System. If you run across a command "word" in a tutorial that is not available in VolksForth, it can most probably added to VolksForth in a matter of few minutes by creating this new word. All you need to know is the Stack effect of the word (how many values it will consume from the stack and how many it will leave on the stack). The Stack effect is written in brackets behind Forth Source code, for example DUP ( n -- n n ) \ duplicates the topmost stack element You also need to know the "sideeffect", that is what the command "word" does to the outside world (display a char, hide a Player etc). With this information the missing word can be added to the VolksForth language. > and does it support PMG? Well, I haven't written a PMG Library for VolksForth so far. There is PMG support in ANTIC FIG Forth that can be easily ported. I can do it for you if you like. I used PMG from Forth directly, like in my game STROQ. It has DLI, VBI and PMG in Forth, however without the overhead of an PMG library: http://www.strotmann.de/twiki/bin/view/APG/ForthStroqSource If you have programmed in BASIC, C, Java or anything ALGOL like before, and never in languages like LISP or Logo, expect a steep learning curve. The best is to try to forget past programming knowledge and start over again with Forth. Forth is so different that past programming knowledge might stay "in the way" all the time when learning Forth. Forth seems to be easier to learn if you haven't programmed before. It took me 2-3 years to become productive in Forth, but it was worth the time. Carsten Edited January 7, 2007 by cas Quote Share this post Link to post Share on other sites
Tickled_Pink #11 Posted January 7, 2007 I bought Quick some 10 years ago. Played around with it for five minutes then went back to PL65. Should still have it somewhere. Although I was impressed with the speed of the resulting code, I was less impressed with the language itself. I remember being a little 'put out' by the way it handles math expressions. The editor, although similar to PL65 in the way it works, is also less polished and doesn't allow wrap-around. Played around with Action as well but since sold it as I didn't like the idea of needing a separate runtime library. I suppose that once you find a language you're comfortable with anything else must have features that go beyond what you're using at the time. If anyone wants an Action! manual, still have it (couldn't find it when I sold the cart). Quote Share this post Link to post Share on other sites
Gury #12 Posted January 7, 2007 That's true. I feel most comfortable with Action! Even with some glitches, that doesn't change my mind. For everything there is a solution to the problem and fortunatelly, Action is very stable, fast, flexible and structured as you want it to be. Quote Share this post Link to post Share on other sites
Gury #13 Posted January 8, 2007 Hej Cas, could you please tell me the proper syntax for declaring Forth array of elements? Is this something like that? CREATE PLAYER0 128, 64, 64, 4, 1, 128, 128, 32 And... Is this declaration same for all variatons of Forth or there are differences? Quote Share this post Link to post Share on other sites
cas #14 Posted January 8, 2007 (edited) Hej Cas, could you please tell me the proper syntax for declaring Forth array of elements? Is this something like that? CREATE PLAYER0 128, 64, 64, 4, 1, 128, 128, 32 And... Is this declaration same for all variatons of Forth or there are differences? Most Forth Systems (including volksFORTH and X-Forth) don't have a "build-in" ARRAY Datatype, unless the programmer adds one. I will show how to add an ARRAY Datatype later, however the sequence you wrote can be used as an "manual" array (no bounds checking etc.) The Forth Word "CREATE <name>" creates a new Forth Word in the Dictionary with the name "name". When executed, this new word will put it's own address in memory on the stack. So CREATE PLAYER0 defines a new Forth Word called "PLAYER0". When we execute that word, it will place it's own memory address on the stack. So the sequence HEX PLAYER0 U. DECIMAL will print the memory location of PLAYER0 in Hexadecimal. Older Forth Systems like X-Forth or FIG-Forth don't have "CREATE". There we can simulate CREATE with ( for FIG-Forth and Forth-79 ) 0 VARIABLE PLAYER0 -2 ALLOT This is trick. the Word VARIABLE will create a new FORTH Word "PLAYER0" and will reserve 2 Bytes after that location and will store the 16bit value on the stack (here "0") in that 2 bytes. The new word will also place it's address on the stack when executed. The "-2 ALLOT" is a negative memory allocation, will back-up the memory compile pointer (dictionary pointer) by 2 bytes, thus overriding the 2 bytes stored by VARIABLE. During runtime, this is the same speed and memory usage than "CREATE", it's just more ugly to type in the source code. The Forth Word "," (say "comma") will compile the 16bit value on the stack into the current dictionary location. As a Player is a sequence of 8bit values (a player is 8 player-pixel wide), we would better like to use "C," instead of ",". "C," (say "c-comma") will compile a 8bit (1 Byte) value from the stack at the current memory location. CREATE PLAYER0 128 C, 64 C, 64 C, 4 C, 1 C, 128 C, 128 C, 32 C, In Forth the "," and "C," are Forth Words (commands), not part of the syntax like in other languages, so they must be surrounded by spaces! When defining players, we work with BIT-Patterns. BIT Patterns can be best managed as binary numbers. A nice feature of every Forth system is that we can work in any number-base, including Base 2 (binary). That makes the Player Bit-pattern more visible: ( FIG-Forth or X-Forth or Forth-79 ) BASE @ ( save current BASE value ) 2 BASE ! ( binary number system ) CREATE PLAYER0 100000000 C, 010000000 C, 010000000 C, 000000100 C, 000000001 C, 100000000 C, 100000000 C, 001000000 C, BASE ! ( restore BASE value ) In VolksForth, we can specify a binary value with the "%" prefix: ( VolksForth ) CREATE PLAYER0 %100000000 C, %010000000 C, %010000000 C, %000000100 C, %000000001 C, %100000000 C, %100000000 C, %001000000 C, Now we have a Player Bit-Pattern in memory, We can get the address of the first Byte by calling PLAYER0. We can move the bit-pattern with CMOVE into the Player-Missle DMA Memory Area. If we want to access different Bytes of the structure, we use simple arithmetics ( change Byte at Index "i" at Player-Address "pl-addr" to value "n" ) : POKEPLAYER ( n i pl-addr -- ) + C!; ( get Byte "n" at Index "i" at Player-Address "pl-addr") : PEEKPLAYER ( i pl-addr -- n ) + [email protected]; ( Usage: ) 3 PLAYER0 PEEKPLAYER . ( should print 4 ) $80 3 PLAYER0 POKEPLAYER ( will change 4 to 128 at player position 3 ) Later today, I will tell you how to add a real ARRAY Datatype to Forth. For most uses the above is enough. Stay tuned! Carsten Edited January 8, 2007 by cas Quote Share this post Link to post Share on other sites
cas #15 Posted January 8, 2007 (edited) I have found these Array Operators for Forth that work with the above "manual" arrays: \ based-indexed addressing; \ by Michael L Gassanenko \ found on http://forth.sourceforge.net/techniques/arrays-mlg/index.html \ volksFORTH Version \ normal Cells (16 Bit) : [] ( index base -- value ) SWAP 2* + @ ; : []! ( value index base -- ) SWAP 2* + ! ; : []^ ( index base -- addr ) SWAP 2* + ; \ normal Bytes (8 Bit) : C[] ( index base -- value ) + @ ; : C[]! ( value index base -- ) + ! ; : C[]^ ( index base -- addr ) + ; \ Double Cells (32 Bit) : D[] ( index base -- value ) SWAP 2* 2* + @ ; : D[]! ( value index base -- ) SWAP 2* 2* + ! ; : D[]^ ( index base -- addr ) SWAP 2* 2* + ; Usage: \ read and print 4th Element from Player array 3 PLAYER0 [] . \ change 4th Element of Player array to %01100110 %01100110 3 PLAYER0 []! \ get address of 4th Element in Array 3 PLAYER0 []^ Edited January 8, 2007 by cas Quote Share this post Link to post Share on other sites
Gury #16 Posted January 8, 2007 CREATE PLAYER0 128 C, 64 C, 64 C, 4 C, 1 C, 128 C, 128 C, 32 C, ( FIG-Forth or X-Forth or Forth-79 ) BASE @ ( save current BASE value ) 2 BASE ! ( binary number system ) CREATE PLAYER0 100000000 C, 010000000 C, 010000000 C, 000000100 C, 000000001 C, 100000000 C, 100000000 C, 001000000 C, BASE ! ( restore BASE value ) In VolksForth, we can specify a binary value with the "%" prefix: ( VolksForth ) CREATE PLAYER0 %100000000 C, %010000000 C, %010000000 C, %000000100 C, %000000001 C, %100000000 C, %100000000 C, %001000000 C, As always, you provide us with very detailed and very good explanation, Cas. I am more and more interested in Forth, but I will continue using Action! for a while. I am also interested in differences between VolksForth and other Forth versions as in the example above. Quote Share this post Link to post Share on other sites
cas #17 Posted January 8, 2007 For the details of Forth Arrays, please take a look at Chapter8 of "Starting Forth" http://home.iae.nl/users/mhx/sf8/sf8.html CArsten Quote Share this post Link to post Share on other sites
cas #18 Posted January 8, 2007 Here is a simple Array Datastructure in Forth, fast version without bounds checking! \ Byte/Char Array (8bit) : CARRAY ( size -- ) ( i -- addr ) CREATE ALLOT DOES> + ; \ Cell Array (16bit) : ARRAY ( size -- ) ( i -- addr ) CREATE 2* ALLOT DOES> SWAP 2* + ; \ Double Array (32bit) : DARRAY ( size -- ) ( i -- addr ) CREATE 2* 2* ALLOT DOES> SWAP 2* 2* + ; Usage: \ defines an array with name "PLAYER0" and 8 Bytes 8 CARRAY PLAYER0 \ Change 3rd element in Array to %10101010 %10101010 2 PLAYER0 C! \ get 7th Element of Array 6 PLAYER0 [email protected] Quote Share this post Link to post Share on other sites
cas #19 Posted January 8, 2007 (edited) Here we have a real array structure with bounds checking: \ Arrays with bounds checking | : (ARRAYERROR ABORT" Array out of bounds!"; : ARRAY ( size -- ) CREATE DUP , 2* ALLOT DOES> ( i -- addr ) OVER 0< (ARRAYERROR 2DUP @ 1- - 0> (ARRAYERROR SWAP 1+ 2* +; : CARRAY ( size -- ) CREATE DUP , ALLOT DOES> ( i -- addr ) OVER 0< (ARRAYERROR 2DUP @ 1- - 0> (ARRAYERROR + 1+; To clear an array (automatically detects size) \ first we create an Array $10 ARRAY BUFFER ( 16 Cells Buffer = 32 Byte ) 0 BUFFER DUP -2 @ 2* ERASE ( erase buffer ) \ changing element 5 in Array $25 4 BUFFER ! \ getting Element 5 4 BUFFER @ This Arrays can have 32765 entries á 2 Byte = 64 KB max (of course ). Carsten Edited January 8, 2007 by cas Quote Share this post Link to post Share on other sites
Velcro_SP #20 Posted January 9, 2007 <text clipped> Played around with Action as well but since sold it as I didn't like the idea of needing a separate runtime library. I suppose that once you find a language you're comfortable with anything else must have features that go beyond what you're using at the time. If anyone wants an Action! manual, still have it (couldn't find it when I sold the cart). I am interested in the manual! I sent you a PM. Thx! Quote Share this post Link to post Share on other sites
Pengwin #21 Posted January 11, 2007 Thanks for your explanations about various techniques Cas. I am definately going to give Forth another look. I have been reading a tutorial I have for Forth with another 8-Bit system and it seems fairly straight forward (although totally different to what I am used to with Pascal). As some of you know, I intend to write games for three systems, and I know I can get Forth for each of them, so this may be the way for me to go. Quote Share this post Link to post Share on other sites
cas #22 Posted January 11, 2007 As some of you know, I intend to write games for three systems, and I know I can get Forth for each of them, so this may be the way for me to go. If this systems are the 3 in your tagline: * Atari XL -- the new volksForth release is in the making. * Oric Atmos -- as soon I'm able to get an Atmos on eBay for a decent price, I'll do volksForth on the Atmos. But there is also a very good Forth 83 for the Atmos available. * Sinclair -- I have Z80 source for volksForth (CP/M). I have no experience onthat platform, so I don't know how much work it will be to port the CP/M code to the Sinclair. I have a NC140 (Amstrad) and I'm getting a Z88 (Cambridge Computer) soon, both have Z80, and I plan to port volksForth to them. If you're interested I would help you porting volksForth to the Sinclair. Having the same Forth System (volksForth) on all that Platforms (+ MS-DOS, CP/M, Atari ST, C64, C16, Plus4, Apple I, Apple II) you can do real cross-platform programming. Carsten Quote Share this post Link to post Share on other sites
Pengwin #23 Posted January 11, 2007 As some of you know, I intend to write games for three systems, and I know I can get Forth for each of them, so this may be the way for me to go. If this systems are the 3 in your tagline: * Atari XL -- the new volksForth release is in the making. * Oric Atmos -- as soon I'm able to get an Atmos on eBay for a decent price, I'll do volksForth on the Atmos. But there is also a very good Forth 83 for the Atmos available. * Sinclair -- I have Z80 source for volksForth (CP/M). I have no experience onthat platform, so I don't know how much work it will be to port the CP/M code to the Sinclair. I have a NC140 (Amstrad) and I'm getting a Z88 (Cambridge Computer) soon, both have Z80, and I plan to port volksForth to them. If you're interested I would help you porting volksForth to the Sinclair. Having the same Forth System (volksForth) on all that Platforms (+ MS-DOS, CP/M, Atari ST, C64, C16, Plus4, Apple I, Apple II) you can do real cross-platform programming. Carsten volksForth on the Atmos would be great! I'm using White Lightning on the spectrum as it has the IDEAL subsystem for graphics manipulation, although it's main Forth engine seems to be compatible with fig-Forth. Atmos's on ebay usually go for about £20-£30 at the moment. Maybe a little cheaper if you don't care about packaging. I got my latest one for about £10, but it seems to have developed a fault with the modulator and also the tape IO. Quote Share this post Link to post Share on other sites
Wrathchild #24 Posted January 11, 2007 Are you re-writing the OS on the Jupiter Ace too? Quote Share this post Link to post Share on other sites
cas #25 Posted January 11, 2007 (edited) Are you re-writing the OS on the Jupiter Ace too? Well, the Jupiter ACE OS Forth is quite unique in it's way that you can redefine definitions. As volksForth is written in volksForth and can recompile and crosscompile itself on any supported platform, a port to the Jupiter ACE might be possible I first need someone to give me a Jupiter ACE Please PM me if you have a spare..... or even better, Jef Raskins CanonCat Edited January 11, 2007 by cas Quote Share this post Link to post Share on other sites