home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
history.doc
< prev
next >
Wrap
Text File
|
1991-04-25
|
71KB
|
1,540 lines
°Notes Development Notes
06/26/89
Added ARRAY to the list of available data structures.
You don't need to put a BYE at the end of you program any more,
as it is built into the initialization code.
Corrected compiler so it only includes variables and arrays when
they are referenced by an application or application referenced
word. This reduced the data segment overhead from about 150
bytes to two bytes if no data is referenced.
Added two target compiler optimizers, the first looks for an
"LODSW" (POP AX) preceeded by "SUB SI, # 2 MOV 0 [SI], AX"
(PUSH AX), and deletes both. The second optimizer looks for
"MOV BX, AX" preceeded by "MOV AX, # immediate", and changes the
move immediate AX to a move immediate BX. These two optimizers
shortened the CLOCK program from about 5000 bytes down to 3800
bytes. The smallest .COM file I can now generate is 50 bytes,
and the "Hello World!" program is 173 bytes, down from 330 bytes.
Modified compiler so there are select words for specifying where
words are going, rather than using special word names for each
place. Specifically : (colon) and CODE are defered, and directed
to either Forth, Target, or Library controlled by the words:
>FORTH >LIBRARY >TARGET
This makes the source code much easier to read, and much less
error prone on entry.
06/28/89
Add automatic boot compiling to TCOM. Now it will initialize
itself when it boots, and compile whatever file you put on the
DOS command line. Here is an example of how to use TCOM:
TCOM CLOCK <enter>
or
TCOM SAMPLE <enter>
You can keep TCOM from automatically starting to compile, with
the following sequence:
TCOM CLOCK QUIT <enter>
TCOM will open CLOCK.SEQ, but will QUIT before starting to
compile it. You can then compile CLOCK by typing:
TARG <enter>
06/28/89 ----
Corrected the bug that was keeping me from starting to allocate
data variables from address zero. The default flag for an
unresolved symbol was zero (0), it has been changed to "-1".
This should prevent further problems.
07/07/89
Extended the MOV_BX,AX optimizer to test for the additional case
where this instruction is preceeded by MOV AX, 0 [SI]. If this
is found, then the instruction is changed to MOV BX, 0 [SI].
Added two additional optimizers. The first tests for the
following case:
DEC IP ──┐
DEC IP │ push item1 on the stack
MOV 0 [SI], AX ──┘
MOV AX, 0 [SI] get a copy of item one in AX
This sequence can occur whenever we push "item1" on the stack
and follow it with an operator that modifies item one
subsequently returning it to the stack. The optimization here
is simply to discard the final instruction, saving two bytes and
15 clock cycles.
The second optimizer tests for multiple occurances of DROP in a
program, and folds all multiple drops into a single inctruction
"ADD SI, # xxxx" for the correct operation.
07/13/89
Factored the compiler to get as much of the target specific code
out of it as possible. The target specific code has been moved
into the library file.
This is part of the process of modifying the compiler to work
with additional target processors. I have coded a sample target
that looks somewhat like a Forth Chip. It outputs assembly
source at the moment that is re-directable to the printer. If
you want to write a new target, you need only re-write the
library file for the target processor. Of course this is only in
theory for now.
07/17/89
Here is a list of command line parameters that can be passed to
the target compiler. Also included is a description of their
functions:
/CODE Display the assembled code as compiling
/SRC Display the source while compiling
/OPT Turn on the code optimizer
/LST Direct any output from the /CODE or /SRC
options to IMAGE.LST.
These options are used as follows:
C> TCOM <filename> /CODE /SRC /OPT /LST <enter>
They may be used in any order on the DOS command line.
09/12/89
Added help to display when TCOM is executed without any command
line parameters. Here is the /HELP display:
┌──────────────────────────────────────────────────────────────────────┐
│ Command line format: "TCOM <filename> <option> <option> <...>" │
│ Command line compiler options available are: │
│ │
│ /code = Enable the display of compiled code. │
│ /codeoff = Disable the display of compiled code ........ (default). │
│ /src = Enable the display of source while compiling. │
│ /srcoff = Disable the display of source while compiling (default). │
│ /opt = Enable compiler optimization. │
│ /optoff = Disable compile optimization ............... (default). │
│ /lst = Generate a listing file. │
│ /lstoff = Don't generate a listing file ............... (default). │
│ /sym = Generate a symbol file for BXDEBUG. │
│ /symoff = Don't generate a symbol file ................ (default). │
│ /DOS = Shell out to DOS .......... (NOT a command line option). │
│ /bye = Return to DOS ............. (NOT a command line option). │
│ /help = Re-display this help text. │
│ │
│ Type /BYE to leave the compiler. │
└──────────────────────────────────────────────────────────────────────┘
09/21/89
Fixed VARIABLEs, CONSTANTS and ARRAYs so they return their
proper value or address when they are used in interpret mode.
This allows variables to be pre-initialized, and allows
defined constants to be used in defining additional
constants. This change also allowed me to get rid of the
"L[']" word which was needed when variables were used in
library code words.
Modified compiler so it creates .COM, .SYM, and .LST files
with the same name but different extensions as the file being
compiled.
09/30/89 **** Version .77 ****
Modified entire LIBRARY to keep the top of stack in BX.
This reduces the compiler output size, and improves code
performance. All of the optimizers had to be re-written.
Cleaned up some bugs in the way the optimizer flags were
working, they were getting turned off, and not back on.
FIXED. Added new flags /SHOW, and /SHOWOFF to control whether
the application symbols were to be displayed as the compile
was performed. The default is /SHOWOFF. /BYE can now be used
on the command line to force the compiler to return to dos
when the compile completes.
09/03/89
Added several optimizers, to improve the produced code. The
most significant optimizer is IMM_OPT. It compresses in many
cases 7 or 8 instructions into one instruction saving many
clock cycles. The resulting code after optimization is now
greater than 10% smaller. There are still problems with the
listing file generated with the optimizer turned on, as many
of the listing instructions are written, and subsequently
discarded by the optimizer. I need to work on this, but I
haven't yet figured out a good solution.
10/06/89
Improved string handling in libraries. You can now use " and
." in libraries. The strings are handled correctly, and no
space in the target is allocated until the function containing
the string is used in the target. You still must not use ," or
CREATE in a library, as this will immediately allocate space
and a symbol. Use ARRAY to specify an area of memory that will
be needed by a library definition.
10/10/89
Added list file buffering to reduce the DOS overhead while
creating a listing. Listings can be as much as 10 times the
size of the original source files being compiled, so a 50k
source file like the SZ editor, can create a listing file up to
almost 500k bytes. If all you want is a listing of the symbols
map, you can try the following command line options in the
shown sequence: "TCOM <filename> /LST /SRCOFF /CODEOFF"
The /LST turns on the source as well as the code output,
alone with the symbol map at the listing end. following /LST
with /SRCOFF and /CODEOFF leaves a listing file containing only
the symbol map.
10/11/89 **** Version .80 ****
Changed the status of TCOM from Copyrighted to Public Domain
this date. Tom Zimmer
Also added a new option to the compiler, /NOINIT. This
option allows you to tell the compiler not to include the
initialization code for console I/O. You can create smaller
utilities with this option, but you cannot use TYPE, or SPACES.
10/19/89
Added a few new words to the system, cleaned up some problems
associated with redefining words in the kernel. Added VALUE's,
=:, !>, ABORT, ABORT", and MS. Added Peter Midnight's Towers of
Hanoi solution to TCOM as another sample of an application you
can target compile.
10/23/89
Added some simple graphics support for PLOT, POINT, LINE and
LINETO. PLOT uses the BIOS, and as such is quite slow. You can
use VMODE! to set whatever graphics mode you want. It is very
simple, but it works with CGA, EGA, and VGA.
10/24/89 **** Version .90 ****
Added DEFER to the defining word set, thus allowing defered words
to be used in a target compiled application. Use !>, =: or IS to
store a function into a defered word.
10/25/89
Added support for:
Pull down menus
Framed boxes
Screen save and restore
10/26/89
Got the previous entries functions reasonably debugged.
10/29/89
Added SAVE>, SAVE!> and RESTORE> to the compiler for variables
and values. These are handy if you are trying to port applications
to the target compiler from FPC.
10/30/89
Added LINEEDITOR to target library. This handy utility is used
in many of my programs, and has proven indispensable.
Fixed some bugs in ABORT", and added code to allow ABORT" to
be used in a library routine. ABORT" will always do a BYE if
an error occurs, so don't use it unless thats ok.
11/01/89 **** Version 1.00 ****
Modified the default initializaton, so more things are
automatically initialized in the target. I spent a lot of time
the other day trying to get an application to target compile
only to find out my problems were caused by forgetting to
initialize a utility that is automatically initialized in FPC,
but wasn't in the target compiler. Sooo, I decided it was
better to make larger target programs that work, than smaller
target programs that don't work. You can always disable the
default initialization with /NOINIT, and do your own, but the
default should be to init.
11/13/89
Added the window file selection tool to TCOM, simply place the
word GETFILE in your program when you want to pick a file from
a list of files. Returns a1, the address of the selected file,
and f1 true if a file was selected.
Added SPINNER2. The two spinners show: left=lines compiled,
and right=library colon definitions compiled.
If the right spinner spins, and the left spinner stops, the
compiler is compiling from the library rather than the disk.
Spinners are turned off when output is directed to the listing
file.
11/15/89 ***** Version 1.01 *****
Added Hypertext Help to the TCOM compiler. Just type TCOM <enter>
then press the F1 key to invoke help.
11/16/89 STDIO and IO redirection
Added GETCHAR and PUTCHAR, the DOS redirectable I/O operators.
GETCHAR returns a char unless the end of file has been reached.
If the end of file is encountered, it returns a -1.
The new function RAW_STDIN can be used at the start of a program
to tell DOS to make STDIN "raw" and "unbuffered". Characters will
be read one at a time rather than a line at a time as is normal
for STDIN.
Made KEY deferable, like TYPE. Added KEY-F a variable that gets
initialized to hold %KEY which is a BDOS key that filters function
keys and translates them, to greater than 127. KEY can be
redirected to GETCHAR with STDIN_INIT for proper input redirection.
Since the default I/O initialization DOSIO_INIT and the video
version VMODE.SET both set KEY-F to %KEY, you must perform
STDIN_INIT after one of these initialization words has been done
to make it take effect.
11/17/89
Found a BUG in DEALLOC in the library. It was completely missing
the MOV AH, # $49 instruction just before the INT $21. Added the
afor mentioned instruction to fix.
Reworked TSAVESCR and TWFL to ALLOC and DEALLOC the memory they
need for operation. This makes thing cleaner, and removes the
nest limit on saveing and restoring screens.
Added TABLE and END-TABLE to the compiler, to be used for building
tables of literal values in the target or in library functions.
°11/20/89 ***** Version 1.02 *****
Added ICODE and IMACRO to the defining word list. These words
create CODE or MACRO type words that actually compile at target
compiler build time rather than when they are referenced in the
target. The object code is then moved into the target when
needed. This saves both time and space in the compiler. One
caution with ICODE and IMACRO words, they must not be used to
define words that access external data, that is thry can't refer
to BASE, or CAPS, or any other external to themselves variable or
address. Since they are actually assembled when building the
library, those variables won't exist yet so use CODE or MACRO if
you need reference external data. ALSO these words are for use in
the LIBRARY ONLY, there is no reason to use them in the actual
target compiled application source code since that source is
actually compiled at target time anyway. If you look at
LIBRARY.SEQ, you will see many examples of how these words are
used. They save about 4k in the target compiler, and make it
about 10 percent faster.
11/20/89
Added simple hercules graphics support to TCOM. Mike Mayo obtained
routines from Oliver Shank, and extracted and simplified the point
plot routine for use with TCOM.
Use GRAPH-INIT to initialize PLOT and POINT for COLOR or HERCULES,
it returns TRUE if on a COLOR system, and FALSE for Hercules.
Use this flag to select either HERCULES, or one of the COLOR
graphics modes listed in TGRAPH.SEQ.
The "VALUES" VDOTS, HDOTS and #COLORS are set according to the
graphics mode selected.
11/22/89
Added LABEL to the set of defining words, it is currently ONLY
available in the LIBRARY.
******************************************
*** Not true any longer, see 03/27/90 ****
** LABEL can be used in the target code **
******************************************
Added sample application LINES.SEQ to show how to make a program
that will work in graphics mode on either CGA or HERCULES.
11/23/89
Removed the requirement that a "main" definition be added to the
beginning of each target compilable file to set the entry point.
TCOM NOW AUTOMATICALLY MAKES THE LAST DEFINITION IN YOUR FILE THE
ENTRY POINT OF THE PROGRAM. Since this is normally the way Forth
programs are written, transporting programs to TCOM should be a
bit simpler. If you want to enter your program at a place other
than what would normally be the last definition, you will need to
add a definition to the end of your program to call your desired
entry point.
This change also makes it easier to make a program compilable on
F-PC for debugging purposes since forward references are NO
LONGER REQUIRED.
11/23/89 10:39:54.67 ***** Version 1.03 *****
This version was released to all attendees at the 1989 FORML
conference at Asilimar, California. The conference occured
between November 24th and 26th.
*****************************************************************
11/25/89
Added "EXECUTES>" to the compiler. EXECUTES> allows target library
words to have a specified FORTH vocabulary function they will
execute when they are used in INTERPRET mode (as opposed to
compiling) while target compiling.
EXECUTES> is used as follows:
MACRO TIB ( -- a1 ) \ Terminal Input Buffer address
SAVE_BX
MOV BX, 'TIB END-MACRO EXECUTES> TIB
Here we specify that the target TIB definition executes the
FORTH TIB definition when in interpret mode. EXECUTES> looks up
the word following in the FORTH vocabulary.
The only limitation on EXECUTE>, is it may not be used after an
ICODE or IMACRO library definition.
11/27/89 ***** Version 1.04 *****
****************************************************************
******* The following ROMability has not yet been tested *******
****************************************************************
Added some new command line options and code to allow TCOM to
produce romable code as follows;
/code-start ( | <addr> -- )
Set target CODE starting address. Defaults to
$100, a DOS type program.
/code-limit ( | <addr> -- )
Set max size of CODE compiled into the target.
Defaults to $A000, which allows 40k of code and
24k of data in a compiled program.
/data-start ( | <addr> -- )
Set target data starting address. Normally zero,
but can be set to other values.
/ram-start ( | <seg> -- )
Set the segment in target memory where ram
is located, data is them moved into that ram from
the ROM.
/ram-size ( | <n1> -- )
set amount of ram available in the target.
Defaults to $FFEE if not specified.
The /RAM-START segment defaults to $FFFF if not specified which
signifies to the compiler that this is a RAM based system, which
does not need to have its data moved from ROM to RAM.
When compiling DOS type programs or utilities, the above
parameters can usually be left with their default values.
The /NOINIT option would of course need to be specified when
compiling a ROMable application since much of the default
initialization code deals with a DOS environment.
11/28/89
Finally fixed the branch distance limit. Conditional branches can
now be as long as you want, you need only specify the command
"LONG_BRANCH" either at the beginning of your source file, or
before a definition that needs a longer branch than 127 bytes.
The command "SHORT_BRANCH" switches back to 127 byte branch
limits. The advantage of short branches, is they are faster and
require less space. The default is still SHORT.
An additional pair of operators LONG_LIBRARY and SHORT_LIBRARY
allow you to specify long or short branchs in the library files.
Again the default is SHORT. Unless you add additional library
functions that need long branches, short branches work for all
library functions.
11/29/89 ***** Version 1.05 *****
Added TSHAPES.SEQ from Mike Mayo. This adds support for ARC and
CIRCLE drawing. Small mod to TGRAPH, added "LINESET", to
initialize line drawing so you can then use LINETO for successive
segments to be drawn.
12/05/89
Modified line drawing some, renamed LINESET to be LINEFROM as in
draw a LINE FROM point x, y. Modified LINE to reduce the number
of stack operations needed. It is now defined interms of LINEFROM
and LINETO. rather than the other way around.
Added the read/write mode control from F-PC back into the target
compiler. The new words available are:
READ-ONLY READ-WRITE WRITE-ONLY DEF-RWMODE
The default HOPEN mode is READ-ONLY. If you use the sequence:
READ-WRITE DEF-RWMODE
at the beginning of your program, then all HOPEN's will be
READ-WRITE. HCREATE always makes files READ-WRITE which is the
way they will stay until you HCLOSE and re-HOPEN them.
Also needed to modify CARD.SEQ to make it select READ-WRITE for its
BLOCK operations.
12/12/89 ***** Version 1.06 *****
Added 2VARIABLE, and 2CONSTANT to the defining words the compiler
will recognize.
Re-factored TARG_COMPILE to eliminate the large CASE statment,
and instead use an EXEC: for speed. Changed the data types from
literal 'LETTER' definitions, to an array of data types starting
with the value 0.
12/15/89
Added full date/time and timer support from F-PC. New words
include:
HOURS MINUTES TENTHS SECONDS
10TH-ELAPSED SEC-ELAPSED .ELAPSED B>SEC
TIME-ELAPSED TIME-RESET B>T T>B
TTIME STIME .DATE D.M.Y
Y-M-D M/D/Y .TIME DTBUF
SETTIME GETTIME SETDATE GETDATE
12/18/89 ***** Version 1.07 *****
Fixed a bug in EXHREAD and EXHWRITE. The word HDOS3 was broken,
and was preventing these two wordds from working. Repaired.
Added LINEREAD support, see the file TSREAD.SEQ for details.
Some of the added words are:
LINEREAD LINEREAD_INIT IBRESET OUTBUF LRHNDL
LOADLINE .LRHNDL MEMCHK CURPOINTER LINE_LIMIT
Also added LOOK.SEQ an example of how to use the LINEREAD
support just added.
12/19/89
Made some minor repairs to TPATH in the definition PATHSET, and
added PATHSET back into HOPEN. Had to split THANDLES into two
files to get TPATH to load without forward references.
12/20/89
Added a couple of words to library:
$>TIB ?LINE ?CR LMARGIN RMARGIN TABSIZE
Adjusted automatic initialization to set LMARGIN to zero,
RMARGIN to 64 and TABSIZE to 8.
12/20/89 ****** Version 1.08 ******
Just added Bob Smiths "Public Domain" high level floating point
package to the target compiler. Preliminary testing indicates
it is functioning properly. You can now use floating point
functions in target compiled programs.
The performance will probably not be up to Bob's SFLOAT package
in F-PC, but shouldn't be too bad since the compiler generates
call threaded assembly language. The file is TFLOAT.SEQ. It is
not being included as a precompiled library, as it would add
another 12k to the compiler. It is however defined as a library
file, so if you FLOAD it at the start of your application, only
the needed functions will actually be included in your program.
Floating point space overhead will run from 4k to 10k depending
on the functions used.
12/21/89
Found and fixed several bugs in the the TFLOAT.SEQ file, There
were some stack problems that have been fixed.
12/22/89 ***** Version 1.09 *****
Split the first portion of LIBRARY.SEQ out to OPTIMIZ.SEQ to
reduce its size some. It was over 100k.
Changed MAXDIR in TWFL.SEQ from a constant to a value. You can
now set MAXDIR to some value other than 300 to get the $GETDIR
to get a different number of files than 300.
01/02/90 ***** Version 1.10 *****
Fixed a bug in LONG_BRANCHes, it seems the defered word T@ was
not getting initialized to the target memory area, and when a
long branch was being resolved with ">RESL", improper branch
locations were being resolved.
Added UPC, UPPER and ?UPPERCASE to the library word list.
Renamed ADJ_MEMORY to SET_MEMORY, and changed the function from
a segment adjustment of memory, to a byte adjustment of memory.
It now is used to reduce DOS memory usage to a user specified
amount of ram above PAD. The physical memory address is passed
into SET_MEMORY. Typically you will do something like the
following:
PAD 100 + SET_MEMORY
This will reduce the DOS memory usage from "all of memory" down
to the memory needed for the programs CODE plus DS: ram upto
PAD+100. The return stack and TIB are automatically moved down
to the new location, and the data stack is cleared. An additional
250 bytes are allocated for the data stack and the return stack.
01/04/90 ***** Version 1.11 *****
Fixed EXECUTES> so it will always assemble the two instructions
it needs to assembler, into the Forth CODE space, not the target
space.
Mostly working on making the floating point useful. Needed to
be able to enter floating point numbers at interpret time so
new floating point constants and arrays could be created by a
target application. So now TFLOAT will load FLOAT4TH before
loading itself. FLOAT4TH gets loaded into the FORTH vocabulary
so it can be used to manipulate floating point numbers while
target compiling.
Added the floating point wordset description to the LIBRARY.DOC
file. They are in a different format from the rest of the
glossary, but still provide useful information.
01/05/90
Enhanced PERFORM, and EXECUTE so they compile a single
instruction when the optimizer is enabled. This resulted in an
improvement in performance for DEFERed words, allowing me to
get rid of the I/O variables KEY-F, EMIT-F, TYPE-F and
SPACES-F that were used in the colon definitions of KEY, EMIT,
TYPE and SPACES. These words were then converted to DEFERed
words, which subsequently compile a single instruction. Overall
this results in an improvement in performance with a very small
target program size increase.
Making KEY, EMIT, and TYPE defered words also improves code
compatibility with F-PC.
01/06/90
Added "@>" to the list of forward words at the end of
COMPILER.SEQ. Apperently I just forgot it when I made the list
of forward words. It can be used on VALUE's, VARIABLE's, and
DEFERed words.
NOTE: You CANNOT use ['] on DEFERed words, as they are not
accessed with a CALL. DEFERed words are treated like MACRO's.
The ['] function in the target compiler is a RUNTIME operation,
that is, it obtains the "CFA" of the function following at
runtime, by looking following itself at the address in the CALL
following. For ['] to work properly, it can ONLY be followed by
a Forth word that is NOT A MACRO.
Added a test for end of file reached while compiling. If you
forget to terminate a definition with a ";", then TCOM will
abort with a message informing you that the end of file has
been reached while compiling.
01/08/90 ***** Version 1.12 *****
╔═════╗ THE FOLLOWING NOTE IS INVALID, SEE NOTE ∙03/26/90 ╔═══════╗
║ ╚═══════════════════════════════════════════════════╝ ║
║ ║
║ Added user created defining words to the target compiler. the ║
║ format is somewhat different from the normal F-83/F-PC type ║
║ defining words, but provides similar functionality. Here are a ║
║ couple of examples of how to add defining words to the target ║
║ program: ║
║ ║
║ \ at runtime, new definitions return addr ║
║ :DOES> ; ( -- a1 ) ║
║ ║
║ DEF: NEWARRAY ( n1 -- ) CREATE ALLOT ; ║
║ ║
║ 25 NEWARRAY ARRAY1 ║
║ ║
║ As you can see the DOES> portion is defined first. This is ║
║ somewhat similar to a technique Bill Ragsdale proposed a few ║
║ years ago. It make the target compile process simpler. The ║
║ ":DOES>" word defines the runtime function of the words the new ║
║ defining word will make. The "DEF:" word defines a new defining ║
║ word, and specifies what the compile time operations will be ║
║ for the new defining word. In this case we are creating a new ║
║ array word, which will do a CREATE, and ALLOT some space in the ║
║ target for data. The runtime function of the new "ARRAY1" ║
║ simply returns the address of the array on the stack. ║
║ ║
║ \ at runtime, new definitions return contents ║
║ :DOES> @ ; ( -- n1 ) ║
║ ║
║ DEF: NEWCONSTANT ( n1 -- ) CREATE , ; ║
║ ║
║ 52 NEWCONSTANT MYCONSTANT ║
║ ║
║ Here we are creating a new defining word that is like CONSTANT, ║
║ at compile time it creates the new name "MYCONSTANT" and ║
║ comma's 52 into the target data space. At runtime, MYCONSTANT ║
║ will fetch the data and return it. ║
║ ║
╚═════════════════════════════════════════════════════════════════╝
P.S. DON'T try to ['] a target defining word and step into the
body of the definition, you will get unexpected results. It is
legal to ['] a definition for storage into a defered word.
Added TIMER.SEQ to the group of sample programs.
01/16/90 ***** Version 1.13 *****
Split out the STDIO words into a new file called TSTDIO.SEQ.
Also added several new buffered STDIO words as follows:
GCH.MAX Maximum read characters to buffer.
PCH.MAX Maximum write characters to buffer.
BUFIO_INIT Initialize buffered I/O for use.
GETCHAR_B Read one character from buffered I/O console.
PUTCHAR_B Write one character to the buffered I/O channel.
FLUSH_B Flush the buffered I/O channel before leaving.
Buffered I/O must be initialized with BUFIO_INIT before using
either GETCHAR_B or PUTCHAR_B. The word FLUSH_B must be used
before returning to DOS, to flush any character not already
written.
Performance is significantly affected by the size of the read
and write buffers. The default size of 32 bytes works well, but
a considerable improvement in throughput can be obtained by
increasing GCH.MAX and or PCH.MAX to around 2000. This will of
course use more DS: memory.
Also added the FILTER.SEQ example.
01/18/90
Generalized the symbol table generation words. The /SYM option
can be used to tell TCOM to build a .SYM file for your
debugger. The only debugger currently supported is BXDEBUG.
Three words have been added to allow a symbol table file to be
built for other debuggers, but you will need to know the
format of their symbol table. The words are SYMWRITE,
SYMHEADER, and SYMFOOTER. Look at the COMPILER.SEQ for an
example.
01/19/90
Added RS232IB.SEQ a buffered RS232 driver to the TCOM.ZIP
file. RS232IB.SEQ provides a serial driver that is compatible
with both F-PC and TCOM, you can load it on either one and use
it directly. RS232IB.SEQ is not a library file, but is a simple
terminal program with the serial driver included.
01/22/90 ***** Version 1.14 *****
Added another command line option. Since TCOM normally contains
the full F-PC Forth system, including the SED editor, it seemed
only natural to add an edit command line parameter. Start TCOM
in edit mode as follows:
TCOM /EDIT <filename> <enter>
TCOM will open the file if it already exists, or open it as a
NEWFILE if it doesn't exist. Leaving the editor, will then
return to DOS after saving changes. "/E" is short for "/EDIT".
TCOM is still not a full compiler environment like TurboC, but
it is getting closer.
01/24/90 ***** Version 1.15 *****
Integrated Bob Smiths new (1.2) version of FLOAT4TH into TCOM.
01/29/90
The compiler now returns a DOS errorlevel code that corresponds
to the number of errors encountered while compiling.
A /QUIET of /Q option can be used to reduce the junk displayed
while compiling to errors only. When used with the DOS
">filename" option on the commandline, an error file will be
built that can be scanned by an editor for compile error
locations to fix. In other words, I am in the process of
modifying the Z editor to use it as a compiler integrator, and
I needed a way to pass errors back to the editor from the
compiler. These options provide a way to do that. Here is an
example:
C:>TCOM TEST /Q >TEST.TMP
Here the compiler will compile the file TEST, and re-direct the
compilers message output to the file TEST.TMP.
01/31/90 ***** Version 1.16 *****
Added ZZ (I don't know what it stands for) to TCOM. ZZ is the
first version of an integrator for TCOM. Is uses the SZ editor,
TCOM.EXE and BXDEBUG as sub programs to provide an environment
that can create, compile and debug programs. Some additional
keys and functions have been added to the SZ editor to make
this work. SZ has a new command line option "/CMD" that will
tell SZ to automatically examine a <filename>.MSG file when
atarting up to look for error messages in the Microsoft C error
format. If the file containing valid error messages is found,
then SZ will automatically place the cursor on the error line
and display the error message on the last line of the display.
When the SZ editor leaves, a file ZZ.CMD will be created that
contains information that the Mini Shell will look at to decide
what to do next. ZZ will look at a file ZZ.CFG that will
contain DOS command lines to perform. The first line will be
executed when ZZ starts, and other lines will be executed
according to the command (an ascii character 1 to 9, or Q)
passed back from the SZ editor. Multiple commands on a line in
ZZ.CFG can be entered separated by the ";" character.
All this may seem complicated, so here is an overview:
Type ZZ <filename>.SEQ <enter> to start editing a file.
Press F5 to compile the file.
If an error occurs, the editor will display errors.
Press ESC to get out of error mode or press Ctrl-F2 to
execute the compiled program.
Press F7 to enter BXDEBUG on your file, or press F10 to
leave SZ.
Here is a list of the keys in SZ that pass back commands to ZZ.
F10 command Q
Alt-F10 command Q
Ctrl-F1 or Alt-1 command 1
Ctrl-F2 Alt-2 command 2
Ctrl-F3 Alt-3 command 3
Ctrl-F4 Alt-4 command 4
F5 Alt-5 command 5
Alt-6 command 6
F7 Alt-7 command 7
Alt-8 command 8
Alt-9 command 9
Alt-0 command 10
These commands are used by ZZ to make it perform ZZ.CFG lines 2
through 11.
Commands can be separated by the ';' character, and if you
place a double '||' vertical bar then the rest of the line can
be used for comments. Here are a couple of examples:
CLS|BXDEBUG %F.com|| F7=Debug program "COMMENT"
The above sequence will, CLS the screen, and execute BXDEBUG,
passing it the parameter "%F.com" that is the same as "%1",
except ZZ removes the file extention so you can specify it
".com". The "||" two vertical bars signify the end of the
command, and the remaining text on the line is treated as
comments.
When you leave and re-enter ZZ, and don't specify a file to
edit, as in "ZZ <enter>", then ZZ will remember where you were,
and return to that file and edit position.
02/05/90
Switched to modified versions of TGRAPH.SEQ, and THERC.SEQ.
Added THERCTXT.SEQ to TCOM. Jerry Modrow cleaned them up a bit,
and provided code to do text output in Hercules graphics mode.
The code was written by Mike Mayo, and generalized by Jerry
Modrow. Also added GRAPH.SEQ, and HERC.SEQ to allow for
comparable simple graphics in F-PC for debugging purposes. The
graphics available from SMILEY, is faster, but GRAPH and HERC
are compatible with TGRAPH, and THERC.
02/22/90 ***** Version 1.17 *****
Changed the default return-stack/TIB size "RPSIZE" from 240
bytes to 256 bytes.
Modified ZZ, to handle upto four parameters on the command
line. I am currently only using three. The order of the
parameters in the ZZ.CMD file has been changed to match the
order of the same parameters on the command line, that is:
<filename> <row> <col>
Rather than the previous:
<row> <col> <filename>
This makes more sense, and allows me to increase the total
number of parameters that can be handled to four so people with
other editors can generate command files with upto four
parameters in the same order as they accept parameters.
Im still working on a way to document ZZ so it will be easy to
understand what it does. Currently the inter-connection between
ZZ and the programs it integrates is quite obscure, and I don't
know if anyone can figure out how to use ZZ with only what I am
providing. Need to work on this a LOT MORE.
03/07/90 ***** Version 1.18 *****
Added DIS.SEQ and DIS.COM to TCOM.ZIP. While this may seem like
a silly reason to change the version number, DIS adds important
functionality to TCOM. DIS will disassemble any .COM file that
was created by TCOM that has a .SYM file available, into a
symbolic assembly listing file. It only disassembles the CODE
portion of the .COM file, but it seems to do that perfectly.
Now you can easily see the difference between optimized and
non-optimized compiler output. The DOS ">" symbol can be used
to force redirection into a file as follows:
DIS CLOCK >CLOCK.LST
This will disassemble CLOCK.COM (with symbols if CLOCK.SYM is
available, and with imbeded source if CLOCK.LIN and CLOCK.SEQ
are available.) to the file CLOCK.LST. The .SYM and .LIN files
are created by TCOM when the /SYM command line option is used.
If no redirection is used, disassembly is directed to the
display.
DIS can be used to disassemble .COM files that don't have .SYM
files, or .COM file from other assemblers of compilers, but it
will not properly know how much to disassemble, and will not
display symbols.
03/08/90
Added CASE, OF, ENDOF, ENDCASE in the F-PC style. Like Eakers
CASE. I got tired of converting programs that use CASE
statments over to use IF-ENDIF, so I added the CASE statment to
the compiler. It has been tested, and when the optimizer is
turned on, it generates very good code.
03/19/90 ***** Version 1.19 *****
Started modifications to generalize TCOM for a new target. Mike
Mayo has finished the first pass on an 80196 assembler. Some
changes were needed (more will be needed) to work with this new
target. I am looking forward to this new addition to TCOM, it
should add considerable flexibility to the compiler.
03/23/90 ***** Version 1.20 *****
Many small changes. Adjusted TYPE, EMIT, CR, SPACES, AT, AT?
to be more like F-PC. Several were made into defered words.
This will cause the compiler output to increase in size
somewhat for small programs. This is unfortunate, but
necessary for better compatibility.
Fixed a couple of bugs, the small version of the compiler
couldn't create proper listing files because I was removing too
much from SF-PC for the disassembler to load. CORRECTED
Made corrections to TGRAPH for CPLOT. It needed to be clearing
BX before performing the plot interrupt.
°03/26/90
Re-worked defining words. You can now create ordinary CREATE
DOES> type defining words, you simply start the definition with
"::" rather than ":". The compiler will only include the DOES>
portion in your target, and will execute the part before DOES>
whenever the defining word is used to define a new target word.
Here is a simple example of a TCOM defining word:
:: 6VAR ( | <name> -- )
CREATE 0 , 0 , 0 , DOES> ;
6VAR MYVARIABLE
6VAR YOURVARIABLE
6VAR is a defining word that creates new 6 byte variables. 6VAR
is being used to create two such variables called MYVARIABLE,
and YOURVARIABLE. When these variables are later used, they
will return the address of a 6 byte data area that was
pre-initialized to zero.
03/27/90
Added the definition for Target LABEL, you can now use labels
in the target code. They can be accessed from within a code
word with a CALL. When used labels return their address.
03/28/90
Removed THERC.SEQ, TGRAPH.SEQ, & TSHAPES.SEQ from the
precompiled library. You will need to "NEEDS" or "FLOAD" them
into an application that requires graphics support. This makes
the compiler about 7k smaller. The reason this is being done
now, is that LABEL which is used in THERC was only available as
a LIBRARY word before yesterday.
03/28/90 ***** Version 1.21 *****
Made ['] smart, so it tests for the type of word being looked
up. The word must be a subroutine, or ['] will complain. The
purpose here is to prevent looking up macros, which get
compiled in line, and have no actual target address.
03/29/90
Modified typed output from a TCOM application so you can use
PRINTING ON to cause typed output to go to the printer. This
works with both DOS output, and the video typed output.
03/30/90
Added INLINE to TCOM. INLINE forces a routine that is normally
accessed by a CALL to be compiled inline in the current colon
definition. This avoids the overhead of a CALL RET in areas
that need the highest performance. The generated code will of
course be larger.
Also added NO_INLINE to abort an inline operation if a LIBRARY
word with multiple exits is preceeded by the INLINE directive.
See the LIBRARY.SEQ definition of UM/MOD for an example.
Added code to prevent INLINE from trying to compile a target
(as opposed to LIBRARY) word inline.
03/31/90
Added colon definition MACROS to TCOM. Use "M:" to define colon
definitions you want to always be compiled inline when they are
referenced.
04/03/90 ***** Version 1.22 *****
Added CSEG, DSEG, END-CSEG, and END-DSEG to create multiple
code segment areas. This is useful for target processors that
need to compile code or data into specific areas of their
memory. CSEG is used as follows:
$1000 CSEG MY_PROGRAM
$FFF0 CSEG VECTOR_SEG
MY_PROGRAM \ select the code segment
\ starting at $1000
<your code goes here>
VECTOR_SEG \ select the vector segment
\ area
xx , xx , xx , xx , xx , xx , xx , xx ,
MY_PROGRAM \ switch baack to MY_SEGMENT
<more code goes here>
END-CSEG \ completes MY_PROGRAM segment
\ in preperation for saving the
\ image to disk.
As in the CODE example above, the words DSEG and END-DSEG are
used to create, select and end a DATA segment of the target.
04/09/90
Made a minor modification to TFLOAT.SEQ and FLOAT4TH.SEQ. They
now return a 1 rather than -1 for conversion successful. It
seems SFLOAT returns a 1 for successful, and -1 for double
number conversion. This was causing Jerry's MANDEL program to
underflow the stack when the number entered was convertable to
a double number. For example SFLOAT will convert "1.0" as a
double number rather than a floating point number since there
is no "E" to signal a floating point conversion. Applications
that want to be compatible with both AFLOAT and FLOAT4TH, need
to use the following conversion code when using "(FNUMBER?)":
: #INPUT ( | <number> -- floating# )
BL WORD (FNUMBER?) DUP 0=
ABORT" Bad floating point number"
0<
IF FLOAT \ convert double to
\ float
THEN ;
04/10/90
Enhanced DUMP in the library, it now displays 16 bytes of hex
data, followed by 16 bytes of ascii characters per line. Also
added LDUMP to the library.
04/11/90
Added the value ABORT_FUNC and modified ABORT, such that, if
ABORT_FUNC is non-zero, then it is executed. If it is zero,
then a BYE is performed.
Fixed COMPARE, and the sub functions COMP and CAPS-COMP so they
use SSEG to determine what segment is being used for the
compare.
04/12/90 ***** Version 1.23 *****
Added the ability to create an interpretive Forth system on top
of your application program with the "/FORTH" command-line
option. When this option is specified, TCOM will load a file
called TFORTH.SEQ on top of your application, which adds a
Forth like interactive shell, and about 8k bytes to your
application. When your program is then executed, it will come
up in the Forth shell, rather than your program. You can then
execute words, dump memory and more interactively test your
program than with the fully optimized .COM file. You cannot
however define any new words, as there is no compiler included
in this interpretive environment.
04/13/90
Fixed a bug in TFLOAT.SEQ and FLOAT4TH.SEQ. The number output
routine was not shifting the mantissa properly. Corrected.
04/14/90
Added /DIS option, when used with the /FORTH option, also
appends the disassembler to your application. This allows you
to use SEE and DIS (in assembly language) to examine your
routines while in the interpretive environment.
04/17/90 ***** Version 1.24 *****
Added a target compiled version of CODEBUG to TCOM, called
TDEBUG.SEQ. The compiler option /DEBUG will force inclusion of
ALL interpretive options, Forth, DIS, and DEBUGing. It is now
possible to make programs that include a built in debugger. The
overhead for the interpretive environment, with disassembly and
debugger, is around 21k optimized, and 27k non-optimized. While
this is not an insignificant amount, it does allow debugging.
The commands available are TRACE <name>, and BREAKAT <name>.
04/18/90
Modified the .SYM file format, so it marks the most significant
bit of the first letter of each subroutine name. This is done
when the /FORTH command line option is used, and allows the
interpretive environment to know which words are to be executed
rather than returned as an address. Since this change is not
compatible with the BXDEBUG debugger, the /SYM option when used
without /FORTH will create a normal .SYM file usable with
BXDEBUG.
04/19/90
Added environment string processing to TCOM. If you add a
statment to your environment similar to the following;
SET PATH= /OPT /NOINIT
TCOM will default to using optimization, and no initialization
when it compiles an application file. This environment string
can be upto 250 characters in length, and is interpreted BEFORE
the command line options are interpreted. This means your
environment selections can be overridden by command line
options if desired.
Also added a default PATH to TCOM from the environment. You can
add an additional statment to your environment as follows;
SET TPATH=C:\FPC\TCOM
TCOM will search for any source libraries or source files in the
specified directory or directories, allowing TCOM to be used
from other directories on your hard disk.
04/23/90
Added PROMPTER.SEQ as an additional example program. It prompts
for user input, and passes that input off with a DOS shell to
another program. It is an example of how to get user input, and
how to shell out to DOS.
04/24/90
Added a couple of new functions to the library. #INPUT will
wait for the user to enter an integer, and return it. TIB0
holds the reset address of 'TIB. QUIT is TFORTH.SEQ has been
modified to reset 'TIB at its start. SET_MEMORY has been
modified to readjust 'TIB which it didn't do before. It MUST do
this when resetting the stacks.
Added TPAS.SEQ an updated version of my Pascal compiler, and
PASX.PAS a sample pascal source file for TPAS to translate into
Forth. See TPAS.SEQ for more information.
04/25/90 ***** Version 1.25 *****
Substantialy reorganized TCOM's files into a more workable
form. TCOM.Zip now contains several other .ZIP files containing
things like the source for TCOM, the utilities for TCOM, and
the example file for TCOM. I have created a documentation file
specific for each .Zip file. I think it is just about time to
make an installation program for TCOM.
Removed all references to HIDE and REVEAL from COMPILER.SEQ.
Since TCOM doesn't allow redefinition of functions, all headers
are created findable. This makes recursive operations easy,
and eliminates a bug caused by HIDE when it is used in any word
that built a header. Since the header to be built may already
exist, then the word like ":" trying to make the ehader checks
for this condition, and just resolves the name if a forward
reference condition exists. Unfortunately HIDE went ahead and
hid the most recent header created, NOT A GOOD IDEA!.
04/26/90
Today I re-factored TCOM again, It now consists of five .ZIP
files as follows:
TCOM The executable with documentation
TCOMSAMP Sample TCOMable program examples
TCOMUTIL Utilities, and more library functions
TCOMSRC The source for TCOM, usable with F-PC 3.50
SMALTCOM Files to build a small TCOM compiler
Also coded up and tested TCOMINST.COM an installation program
for TCOM compiled with TCOM. Similar to INSTALL.EXE for F-PC,
it allows the user to specify the target drive and directory.
TCOM is getting more friendly all the time.
04/27/90
Received and integrated the bug fixes today from Bob Smith on
FLOAT4TH and TFLOAT to F< F> FMIN and FMAX. Preliminary tests
indicate they work properly.
05/09/90
Completed first pass prototype of the 8080 target for TCOM. It
doesn't work yet, but the assembler seems to work. The
assembler for now at least has been left as POSTFIX ONLY, as
has the 8080 kernel.
05/10/90
Added START-T: to the list of defered words that needs to be
implimented for a new target. In the 8086 target, this word is
defined as a NOOP. In the 8080 target where we are generating
indirect threaded code, this word compiles into the current
target here, a word that is passed on the stack. For CODE type
words, that would be a pointer to HERE+2, for colon type words,
a pointer to NEST.
Also added a defered word COMP_HEADER that compiles a header
into the target. COMP_HEADER is passed an address counted
string of the name to compile into the target. Two compile
flags added /HEADER and /NOHEAD (default) select wheather
headers are to be built for a particular target processor.
Still have lots of work to do on the 8080 target, before it
will generate real programs, but it has at least been able to
compile through a very simple program, and generate what
appears to be reasonable code. Its a start!
I notice we are coming up on a whole year of work on TCOM. It
is amazing what can be done in a year.
05/11/90
Added "RESOLVE_1" as a defered word to be used in resolving
forward references. The default version resolves forward
references as relative, and the 8080 version needed absolute
addressing, so this was added.
05/14/90 ***** Version 1.26 *****
More minor modifications to allow TCOM to work with the 8080
indirect threaded kernel. I keep finding things that are CALL
threaded specific. The 8080 target is comming along very well,
I have not been able to "run test" any code yet, but the manual
disassemblies look very good.
fixed some more bugs in the branch resolution words in
LABEL80.SEQ. I believe branches are now working properly
(again?). Added the compiler words to perform ." and " for the
8080 target, these are in LIB80.SEQ.
05/16/90
Defered the DOES> portion of FOR>WORD so it can work properly
with the 8080 indirect threaded target.
07/03/90
Added ALLSPECS.SEQ. A utility that is usable on either TCOM or
F-PC that will return a list of all directories on a drive.
Useful for searching an entire drive for things. Currently
being used in LOOK.COM to allow a string search of an entire
drive. Also used in the NEWZ editor, to allow hyper indexing an
entire disk drive.
07/09/90 **** 8086 Target Version 2.01 *****
Changed a few of the "M:" words back to ":" words. Things like
SPACE and some others are used too oftain to have them compiled
inline as macros. This of course highly subjective, but it
seemed like a proper change to make.
Also fixed a bug in DIS.SEQ, it seems I added a word SPACE
after an "EXEC:" in ".DISP". Not a good idea. Also modified DIS
so it will only stop disassembling a file for which it has no
symbol table when the end of the file is reached, or when the
user stops it.
07/24/90
Added two words to the compiler to verify the state of the
default code inclusion. CHECK_/NOINIT and CHECK_/DEFINIT These
words will check to make sure their respective option is
currently active, and will issue an error message but continue
compiling if the option is not active. Use these near the start
of a file that needs to always have one of the ..INIT options
set a specific way.
10/28/90 ***** Version 1.27 *****
Added SKIP'C' to TDEFINED in the compiler, is was converting
lowercase 'a' type letters to uppercase when it shouldn't.
Also bumped version.
Also added a verify section to TDEFINED, that makes sure that
any words found are above the forth kernel, to make sure no
invalid words get used in the target. This will improve the
reliability of the generated code.
10/29/90 **** 8086 Target Version 2.02 *****
Added CRLF>BL'S to LIBRARY.SEQ. A very useful word when dealing
with lines read from a file.
Added ?DEF.EXE & DEFEXT to THANDLES.SEQ. The default extension
is NONE, but you can now specify a default file extension if
you want to, just by putting it in DEFEXT.
I have separated out the Hyper-text compiler from the edito,
and turned it into a separate TCOM application. This will (when
I remove the old code from the editor) make the editor somewhat
smaller. You can still SHELL out to run the indexxer, if you
want to. It is now called INDEX.COM, and will by default use
INDEX.CFG for the compile specification if no other filename is
specified ont he command line after INDEX.
Enhanced the DIS (disassembler), to include a new command line
option. "/Wxx" where xx is a number of pages will disassemble
the specified file in "Wide" mode for xx pages. If xx is
omitted, then all pages will be disassembled. An escape
sequence is also sent at the beginning of the output to put a
laser printer in compressed mode. With this option, you can
disassemble directly to a laser printer as follows:
DIS [filename] /W2 [wordname] >PRN [enter]
This command line will disassemble [filename] starting at
[wordname] for 2 pages, with output directed to the PRN device,
typically your printer.
12/14/90 ***** Version 1.28 *****
**** 8086 Target Version 2.03 ****
Added &> to the compiler, it puts the address of a VALUE on the
stack. Useful when you may have a series of values that you
want to work with as a group.
Added BLINK_OFF and BLINK_ON to TVIDEO.SEQ. This allows the
colors from 8 to 15 to be used in the background without
causing the screen to blink.
Added ZLIST.SEQ to TCOMSAMP.ZIP. ZLIST allows viewing files in a
similar fashion to Buerg's LIST, with fewer features, but it is
fully public domain, and can be used by anyone for anything.
Allows viewing BIIIGG files. You also get the source of course.
01/28/91 ***** Version 1.30 *****
**** 8086 Target Version 2.04 ****
Fixed a couple of bugs in the CSEG/DSEG code, It was nessecary
that you create a CSEG statment and use the CSEG name created,
and then use END-CSEG at the end of your code. All this was
needed to get it to save your compiled code is HEXSAVE was used
to save the compilers output in INTEL HEX format. This has been
fixed, such that a default segment is specified by the compiler
initialization code in the optimizer file, and an end-cseg /
end-dseg is performed automatically when the compile is
finished.
Two new directives have been added, ORG, and DORG. They allow
specification of a new code or data origin, without having to
specify a name for the new segment. This is much more like
traditional assemblers, and allows you to freely move the code
compiling around as desired. NOTE HOWEVER THAT TCOM PERFORMS NO
OVERLAP CHECKING, and code compiled later can easily overlap
code compiled earlier if these words are used haphazardly.
Named segments are of course still allowed, making it possible to
switch back and forth between existing segments. When ORG is
used, it is not possible to switch back to a previous ORG, since
no name available.
01/28/91 17:36
Added the ability in CODE words in the target to branch to and
define named labels, both forward and backward. They are used as
follows:
code x1
jmp x2 \ forward branch to undefined
\ label or code is now legal
jmp x3
ret end-code
code x2
jne x1
label x3 \ code words can now contain
\ label definitions
jmp x3
ret end-code
If you enter a forward branch to a label that is never defined,
then an undefined symbol error will occur. You can also see a
branch out of range error for labels that get defined too far
away. The "WORD" instruction modifier will fix this problem for
those instructions that allow word length branching.
02/06/91 ***** Version 1.31 *****
Modified the memory management in TCOM to use the new memory
management technique just installed in F-PC. That is to use POINTER
to define a word that will return a physical segment at runtime of
the desired area of memory rather than using ALLOC. The primary
advantage of this, is now F-PC internally uses only one segment
pointer, and performs the heap management itself, adjusting its
segment as needed for each new pointer used. At a later time, it
will now be possible to move some or all "pointers" into expanded
memory.
02/06/91 ***** Version 1.32 *****
Changed to compile order of TCOM to move ALIST.SEQ to after the
compiler, so some additional "listing format" specific words could
be moved into ALIST.SEQ. ALIST is still an optional file, and need
not be loaded if no listing capability is needed.
TCOM is now much more flexable in allowing the target to define the
listing format than before. Added defered words ?.MACRO and ?.CALL
so ALIST.SEQ can define the format of the listing file format.
02/20/91 ***** Version 1.33 *****
Fixed bug in END-DSEG that was preventing proper functioning of the
hex save.
Modified ORG to set LINESTRT.
Modified the way the compiler detects the /CODE command line
option. It used to test the defered word .INST to see if it was set
to a function other than NOOP. This is clumsy, and now the compiler
variable ?CODE has been added, and returns a true if we are
displaying the disassembled code/instructions while compiling.
Added the defered word TARGET-FINISH to allow a target to perform
any cleanup it desires after the compile is completed, but before
the image save is performed.
03/07/91 **** 8086 Target Version 2.05 ****
Fixed a bug in the design on "EXEC:" which was patching the
application code at runtime to vector to the desired function
(self-modifying code). Now it is probably a littel slower, but it
should work on higher level processors with pipe-lines and caches.
03/13/91 **** 8086 Target Version 2.06 ****
Fixed a bug in -SKIP, changed an INC CX to DEC CX.
03/19/91
Fixed a bug in LABEL. The new version of label was not usable
outside of a CODE word. It didn't install TINTERP like CODE did,
so END-CODE would crash after reinstalling the null in the value
INTERPSAVE. Things have been fixed now, so LABEL can be used
outside of a CODE word, and infact really calls CODE in this
case. The purpose of using LABEL outside of a CODE word, was to
make a code sequence that could return its address rather than
executing like a CODE word does when used. In TCOM, CODE and
LABEL both return their address when used in another code word.
03/21/91 ***** TCOM Version 1.34 *****
Factored the way TCOM compiles data statments like " or ."
strings. In a target that generates romable code, data statments
need to be in the CODE area since ram is not initialized in a rom
program like it is in the 8086 PC .COM programs. To do this I
have created a new set of "ORG" words with the "V" prefix (like
VORG, VSEG, and END-VSEG), and changed the "D" org words to
defered words. This allows the 8086 TCOM to continue to assume
data will be compiled into DATA space, and to allow ROM targets
to use "V" words for variables, and have the "D" words compile
into CODE/ROM space. The way you switch between these two forms,
is with "/DATA_IN_ROM" and "/DATA_IN_RAM". When data is in ram,
then you use only the ORG and DORG words. When data is in rom,
then you also use VORG to specify where the variables will start.
03/22/91
Changed the automatic local label branch assign word BR# so it
returns the number of the most recent branch number assigned,
rather than the next available number. BR# used to be a VALUE,
it is now a function, and the VALUE BR#VAL has been created to
take its place.
Also added /DATA_IN_CODE, to allow placement of string inline
with the code being generated.
04/24/91
Modified @-T and C@-T to be defered words in COMPILER.SEQ.
04/25/91 ***** Compiler Version 1.35 *****
Made ," defered, so a target can make it compile into some place
other than data space. Modified COMPILER.SEQ