home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / doc / tcom80.txt < prev    next >
Text File  |  1991-04-25  |  3KB  |  69 lines

  1. TCOM80.TXT      Notes on TCOM for the 8080              by Tom Zimmer
  2.  
  3.   TCOM80 is a relatively simple version of TCOM for the 8080 processor.
  4. It has been minimally tested, and is believed to generate programs that
  5. will in fact run on a CPM system.  I say this is a simple version of the
  6. compiler, because it was created as a test case to determine if TCOM
  7. would support indirect threaded code generation.  TCOM did need a few
  8. modifications to support this type of target.
  9.  
  10.   TCOM80 is compiled on top of my F-PC Forth, I am currently using
  11. version 3.5505.  It will probably work on earlier version though.  TCOM
  12. is currently at version 1.35, and that version is the one that should be
  13. used with this version of TCOM80.
  14.  
  15.   The library for TCOM80 is essentially F83 Forth for the 8080.  As such
  16. it imposes some interesting requirements on the compiler.  F83 supposes
  17. that many variables are at specific places in memory, usually quite low
  18. in the image. To get TCOM to generate a target program in this form, I
  19. have had to make the IMAGE-INIT word in OPT80.SEQ compile some unusual
  20. things.  If you look at it you will see that the image initialization
  21. macro compiles some code, and several of the basic functions that F83
  22. nees, and even compiles some variable and constants.   That is another
  23. interesting caracteristic of TCOM80, its constants are actually in memory
  24. like F83, not compiles as literals as in my other targets.  To get TCOM
  25. to do this, CONSTANT and VARIABLE are redefined in OPT80.SEQ.
  26.  
  27.   Here is a list of files in TCOM80.ZIP that make up TCOM80 the compiler:
  28.  
  29.    MAKE80   BAT              \ batch file to build TCOM80.EXE
  30.    TARGET80 SEQ              \ the load file for the following files
  31.         LABEL80  SEQ         \ label forward reference resolution
  32.         COMPILER SEQ    ***  \ not part of TCOM80, loaded from \TCOM\SRC
  33.         ASM80    SEQ         \ an assembler for the 8080
  34.         OPT80    SEQ         \ the target linkage to the compiler
  35.         LIB80    SEQ         \ the F83 kernel is in the library
  36.         INIT80   SEQ         \ default target application initialization
  37.  
  38.   The primary load file above is TARGET80.SEQ which loads the other files
  39. and creates TCOM80.EXE in the same directory.  You can simplify the
  40. generation of TCOM80 by using the MAKE80.BAT batch file.
  41.  
  42.   Here is a list of utility files that make development somewhat simpler:
  43.  
  44.         DMP      COM        \ A simple decompiler for TEST.CPM below
  45.         DMP      SEQ        \ the source for the decompiler
  46.         INC80    SEQ        \ a list to force inclusion of entire library
  47.         DUMP     COM        \ just a simple file dump utility
  48.  
  49.   The file TEST.SEQ is a sample Forth program that TCOM80 can compile.
  50. It is truely a very simple program, but it shows how TCOM will
  51. automatically include what is needed to run your program.
  52.  
  53.         TEST     SEQ        \ a test source file for TCOM80
  54.         TEST     SYM        \ symbol file renerated by TCOM80 with  /SYM
  55.         TEST     LIN        \ a line pointer table for future disassembler
  56.         TEST     CPM        \ a CPM style .COM file
  57.  
  58.   To compile TEST, enter the following line:
  59.  
  60.         TCOM80 TEST /SYM
  61.  
  62.   This will generate the remaining files listed above.  You can then see
  63. what is in TEST.CPM by typing:  DMP <enter>
  64.  
  65.   DMP will automatically open the TEST files needed, and display a
  66. decompiled dump of the contents of TEST.CPM.
  67.  
  68.  
  69.