home *** CD-ROM | disk | FTP | other *** search
- IX. MISCELLANEOUS UTILITIES
-
-
-
-
- 1. REBUILDING THE SYSTEM
-
-
-
- If you need to change a parameter or function in the F-PC system,
- you will need to re-compile F-PC and/or KERNEL. This is simply
- done with the provided batch files as follows:
-
-
- C> FMETA <enter> re-compiles KERNEL.COM
- C> INSTALL <enter> re-extends to create F-PC.EXE
-
-
- Either of these may be performed from the keyboard while in DOS.
- PMETA invokes F-PC, loads the metacompiler, and recompiles the
- kernel. The resulting new kernel is stored back as KERNEL.COM.
- Utilities and applications are then compiled on the top of KERNEL
- by INSTALL to generate a new F-PC system.
-
-
-
- 2. TURNKEY
-
-
-
- The word TURNKEY and some associated words are included in the
- file SAVESYS.SEQ. TURNKEY is used as follows:
-
- ' MYAPPL TURNKEY MYAPP.COM <enter>
-
- After completing an application compile, the word MYAPPL is
- defined to be performed by the program name MYAPP.COM. TUNRKEY
- automatically sets up the proper memory managment to allocate 64k
- for your program, but does not save the HEADS. Minimum
- initialization is performed. A file specified on the command line
- will be opened, and you can use BL WORD to pick up additional
- parameters from the command line. You will NOT of course be able
- to interpret, since heads are not saved, and you applicaton will
- need to handle all errors and return to DOS when the program
- completes.
-
- Before attempting to build an application, you will need to make a
- copy of F-PC.SEQ, for customization. Many of the later files in
- F-PC.SEQ are utilities, and will not be needed in your application.
- Start by writing your program and compiling it on F-PC.EXE. Work
- in this environment until you are sure your program works. Now
- insert your program filename into the copy of F-PC.SEQ you made,
- about half way down, and try to compile the copy of F-PC.SEQ. If
- it compiles then you can move your application file lower, until
- you have determined what utilities are needed by your application.
- Strip out all files above your application file, and load the file
- SAVESYS.SEQ. Use TURNKEY as previously described to make an
- executable .COM file.
-
-
-
- 3. MACROS IN F-PC AND SED
-
-
-
- A file called MACROS.SEQ is provided, which implements keyboard
- macros in Forth, at the level of KEY. These macros can therefore
- be used in the editor also. The macros are used as follows: (the
- sequence "Alt-M" means hold down the "Alternate" key and press the
- "M" key.)
-
- Alt-M start defining a macro.
- Alt-1 we are defining the Alt-1 macro.
-
- Enter any keys you want in the macro, up to 128 keys.
-
- Alt-M completes the definition of the Alt-1
- macro.
-
- Any keys typeable on the keyboard except Alt-m, and Alt-1 to Alt-5
- can be included within a macro.
-
- To execute a macro, simply type its key name:
-
- Alt-1 executes the macro key sequence for
- the Alt-1 key.
-
- Currently macros may be only 127 characters in length, although
- this can be changed by modifying the MAXMAC constant and
- recompiling the system.
-
-
-
- 4. THOUGHTS ON BLOCK
-
-
-
- One last thought. Although all references to block operations
- have been removed from F-PC, that does not mean you cannot use
- block type disk operations in your programs. Here is the
- equivalent F-PC source for some simple block read and block write
- functions:
-
- create blockbuf 1024 allot
-
- : BLKREAD ( n1 --- a1 )
- 1024 um* seek
- blockbuf dup 1024 shndl @ hread drop ;
-
- : BLKWRITE ( n1 --- )
- 1024 um* seek
- blockbuf 1024 shndl @ hwrite drop ;
-
- These definitions will read and write a block of data from the
- current file. While it is true that the above does not provide
- anything like a complete Forth BLOCKs functionality, like no auto
- write on update, and no virtual buffering, it does show how simple
- it is to access random records in a block.
-
-
-