Questions and Answers Occasionally I receive questions about Pygmy. I decided to include some of these, along with my replies, in hopes they will answer some of your questions. ------------------------ Q. My mapping and tracking projects require (at a minimum) those most rudimentary display commands found in common BASICs. Does such a library of utilities exist? Will F-PC Graphic (by Mark Smiley - ad in _Forth Dimensions_) run in your version? A. It is very easy to add graphics commands to Pygmy if you know the hardware details. One source of such info are books, such as _PC & PS/2 Video Systems_, Richard Wilton, 1987, Microsoft Press. _Programmer's Guide to the EGA and VGA Cards_, 2nd Ed., Richard F. Ferraro, 1990, Addison-Wesley. However, understanding those hardware details may not be easy. I doubt that Smiley's work will load directly into Pygmy, but it might be another source for those hardware details, and the assembly language programming, etc. that uses those details. The bonus disk includes some graphics words on blocks x180-x189 of Greg Lisle's PYGTOOLS.SCR. Also, here are some words I wrote a few years ago. Perhaps they will help get you started. CODE DOT ( row col color -) BX AX MOV, 12 #, AH MOV, CX POP, DX POP, $10 #, INT, BX POP, NXT, END-CODE ( MODES ) CODE MODE ( u -) BX AX MOV, $10 #, INT, BX POP, NXT, END-CODE : TXT ( -) 3 MODE ; ( 80x25 color text mode) ( CGA modes at $B8000) 5 CONSTANT 320x200x4 6 CONSTANT 640x200x2 ( EGA modes at $A0000) 13 CONSTANT 320x200x16 14 CONSTANT 640x200x16 16 CONSTANT 640x350x16 ( VGA modes at $A0000) 17 CONSTANT 640x480x2 18 CONSTANT 640x480x16 19 CONSTANT 320x200x256 CODE GEMIT ( c -) BX AX MOV, 14 #, AH MOV, 3 #, BX MOV, $10 #, INT, BX POP, NXT, END-CODE CODE GAT ( y x -) BL DL MOV, BX POP, BL DH MOV, BX BX SUB, $0200 #, AX MOV, $10 #, INT, BX POP, NXT, END-CODE CODE PALETTE ( u -) $0B00 #, AX MOV, $10 #, INT, BX POP, NXT, END-CODE : PL PALETTE ; ( $11 PL gives white on blue ) ( $14 PL gives white on red ) ------------------------ Q. Is there a Glossary for Pygmy? A. I contend that there is a glossary, and that it is the shadow blocks in PYGMY.DOW on the bonus disk plus the source blocks in PYGMY.SCR. The command VIEW (or its shorthand V) pops you into the editor on the block where the word is defined. Pressing Ctrl-A switches between the source block and its shadow block. This is the place to look first for the typical glossary type questions, such as what are the stack comments of a word. Also, you may use the 'search across' function in the editor (the F1, F10 keys) to look for occurrences of that word within the file PYGMY.SCR. This latter approach may be needed in place of VIEW for finding information about headerless words. ------------------------ Q. After program development, how is a COM or EXE file created, that can be executed immediately while in DOS without having to enter the Forth environment? A. This is touched on in the file PYGMY.TXT, in the paragraphs immediately preceding Chapter 16. However, the context of Chapter 15 is Metacompiling. You do not need to metacompile in order to generate a "stand-alone" executable file. Just LOAD your application. It must culminate in a single word which _is_ your application. The do the following ' YOUR-APPLICATION IS BOOT SAVE YOURAPP.COM Use VIEW and 'search across' on BOOT and SAVE for more info on how they are used. Also see ABORT for details on setting up a custom error handler for your application. ------------------------ Q. How is output directed to the printer? A. Built into Pygmy are the words >PRN and >SCR which direct output to the printer or back to the screen. These words revector EMIT to send the output where you want it. See also the examples following block 133 of PYGMY.SCR for alternative EMIT-type words. ------------------------ Q. Where might I find material to learn from, that will run under your Forth? A. Of course, the shadow blocks (on the bonus disk) contain additional material. Also, there is an extensive body of Forth literature, including _Forth Dimensions_ magazine from FIG and _The Computer Journal_ (see PYGMY.TXT for addresses). FIG sells a number of books on Forth, including conference proceedings. The GEnie bulletin board and various internet sites, such as oak.oakland.edu and ftp.netcom.duke.edu contain extensive files related to Forth -- although separating the wheat from .... I highly recommend _Starting Forth_ and _Thinking Forth_ by Leo Brodie. Others have highly recommended _Forth: A Text and Reference_ by Kelly & Spies. I have great hopes that FIG is about to republish the currently out-of-print _Thinking Forth_. No, those examples and explanations will not always apply 100% to Pygmy. If you find an example you like, I think that if you take the time to understand exactly what it is doing that it will be easy to convert it to run under Pygmy. ------------------------ The End