home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
prog1
/
4th_86.lzh
/
UPDATE.486
< prev
next >
Wrap
Text File
|
1989-02-19
|
12KB
|
331 lines
$ 4th_86 version 3.0 UPDATE.486 page 1
( 1st. February 1989 - 4th_86 version 3.0 - MFB )
While there is no change in the user interface with 4th_86, there
is extensive change in the internal structure; and much has been
added to simplify the useage.
Notable in this ambition is the inclusion of DEPTH as a default
display in the 4th_86 prompt. It is no longer necessary to remember
to use DS DDS or DEPTH to verify that the stack is in the state
you believe it to be in. If the prompt does not display _0_ then
there is something (or two less than something !!) on the stack.
Remember the standard FORTH way of clearing the stack and resetting
everything to square one -- just type in a string of garbage
sdajhg < return >
TAG can be used to re-set any TRACE command which was in operation
initially.
--oOo----------------------
The primary change is the conversion of most of the 8080 code - and
much of the basic 4th code - into 8086 MASM for speed and
compactness.
Also notable is the fact that the binary code produced from MASM
is completely relocatable, and can be GLOADed at any address
without first having to be assembled at an ORG matching the load
value of HEAD as in version 2.0
CLOAD and C0LOAD no longer exist -- they are replaced by the
equivalent GLOAD and G0LOAD. Files written for the older CLOAD can
easily be modified to load with GLOAD. The relocation header has to
be added, and the dictionary entries moved to a contigious block at
the end of the source file (see 7EGAM3.ASM)
7BASIC is now totally in MASM code, and the word THREAD consists
simply of the instruction pair LODSW - JMP AX.
The 4th program counter is now carried in register SI rather than
in CX.
Simlarly, the Control Stack Pointer (CSP) is now carried in
register DI rather than held in a DW memory location
The former PUSHBC# has no meaning and has been replaced by PUSHSI#.
Similarly CSP does not exist as an executable word and has been
replaced with CSP@ and CSP! both of which interact directly with
the contents of register DI.
The Disassembler part of 7DEBUG3.4TH has now been totally
re-structured to implement full 8086 mnemonics - and discontinue
disassembly at JMP THREAD; JMP AX; RET; and unrecognised opcodes.
Whilst no segment over-rides ( other than to EGA memory in
7EGAM3.ASM) or extensive indexed memory accesses exist in 4th_86
code, the disassembler will handle these instructions.
4th_86 version 3.0 UPDATE.486 page 2
The disassembler has been extensively tested (TEST.ASM is provided
as an example) and no peculiarities detected, but it is still
possible that something has been overlooked. The source exists in
7DEBUG3.4TH and can be recompiled into UCC13.COM should anyone
detect anomalies or omissions.
No 8086 Assembler has yet been included, as MASM/EXE2BIN files can
be GLOADEed. Alternatively, 8086 ASM code can be (and has in many
places been ) included in line by "poking in bytes/words" with
HEADB! and HEAD!
Work is in progress to remedy this omission - but not via the
reverse polish style AX 3 MOV, carry-over from FORTH itself. This
style adds little in legibility, and in fact adds rather than
removes implementation problems. A more user-friendly in-line ASM
interface is being prepared -- hopefully as an integrated extension
to the present dis-assembler.
Similarly, the inbuilt 8080 assembler has not yet been removed as
it is considered to serve a useful function on occasions.
It is possible that future development will carry at least the
dictionary and meta-compile features into separate code/data
segments, but at the moment everything lives quite comfortably in
64K. For this reason no attempt has been made to extend words like
DM DD ! @ etc., to far-segment functions. MASM code can be written
and GLOADed should the user find this feature essential.
--oOo----------------------
The interface to DOS is no longer CP/M oriented via File Control
Blocks; calls to PSP location 5 and location 0.
Files are now accessed via ASCIIZ strings and handles. Paths are
implemented, and subdirectories can be changed via CD as well as
disks A: thru E: accessed.
The commands TYPE and DIR are also impemented via standard DOS
Int 21H calls.
A bug in GETSTS due to the different handling between CP/M and DOS
has been corrected.
The above are reflected in the complete re-structure of 7OSI.4TH
into two files 7OSIA3.ASM and 7OSIAB.4TH.
--oOo----------------------
7BASIC3.ASM now includes BRKON and BRKOFF to activate or disable
the ctrl-Break facility. It is normally disabled on entry to 4th_86.
Also included is SETMEM to allow DOS allocated memory to be shrunk
to any required value. This is normally set to 64K on entry to
4th_86.
4th_86 version 3.0 UPDATE.486 page 3
Exit via Q-U-IT is now through DOS Int 21H function 4C.
BYE is the preferred exit word, and vectors to Q-U-IT, hence the
renaming of this word from QUIT to prevent it's accidental use.
MON1 and MON2 are now in 7BASIC3 rather than in 7OSI, and do a
normal INT 21H call. Words EGAM etc have been transferred from
7EGAM to 7BASIC3. Added are GOTOXY and GETMODE.
Any of these words can be examined either from the source file -- or
more readily by simply typing -- for example -- DD GOTOXY < return >
OMIT has been added to remove unwanted words from the dictionary.
This has become essential as free dictionary space was rapidly
disappearing as extensions were added. The disassembler
specifically adds many words ( KIND01 thru KIND45 etc) which are
accessed only by the disassembler itself.
--oOo----------------------
The structure of MASM files has been changed, so that the standard
dictionary IMMED, ASM etc flags can be implemented.
Also the dictionary strings are no longer embedded in the run-code
itself, nor do they use the code-field as buffer on being read in.
A further change is that the name of each ASM file no longer
needs to be chosen to match the dictionary entry. Any name can
be chosen - it is not read into the dictionary.
A "header" routine is added to all MASM files which allows them to
be completely relocatable, and avoids the previous irritation of
having to make the ORG statement match the HEAD value at which
binary files are loaded.
This header need not be used if the MASM source does not reference
data areas. All words which reference a data area must CALL this
header as a first instruction, and when the call RETurns, it does
so with DS pointing to the data area. The only restriction is that
the offset of the first data entry must be zero, and to achieve
this, G0LOAD is used rather than GLOAD. The penalty is a maximum of
ten bytes of empty code-field area
The JMP THREAD at the end of each code section is not inserted
automatically by the "endproc " statement as in Version 2.0 but is
inserted as LODSW - JMP AX in the source code itself. JMP anywhere
is avoided wherever the routine being jumped to is shorter and
faster in-line than being jumped to or CALL-RETurned.
" binload endproc " is used as a delineating string between the
code-field section of the MASM source and the dictionary string
section. " endfile " is not really needed with DOS type filereads,
but is still included in case files have garbage ( blocks of 1A
Hex for example) at the end.
4th_86 version 3.0 UPDATE.486 page 4
The source code provided has many ASM files as example. 7EGAM3.ASM
is probably as good as any to examine. 7LOGO3 uses a restricted
version of this technique, as the data area is merely an ASCII
string to be printed.
--oOo----------------------
Direct screen writing ( other than for EGA and CGA graphics) has
been avoided to minimise incompatability with non-PCDOS/IBM
hardware environments (although references to Int 10H somewhat
negate this intention). Speed of screen writing is not considered
an issue when 4th_86 is used as a program development environment.
In any application program being developed, the programmer is free
to add any mode of screen or I/O access he chooses. It is possible
that future versions may have windowing where this is considered to
serve some positive function, rather than just existing for the
sake of people who like to be seen fooling around in windows.
The signon logo -- and the inclusion of a DEPTH display in the
4th_86 prompt -- both inspired the inclusion of a word GCOUT in
7BASIC3.ASM.
This allows the output of ASCII text in colour -- and can be
manipulated [should the user be of that strange inclination] to
have all normal foreground/background display in eye-tiring
multi-colour pink on purple - or whatever.
The variable GCOLR contains ( as a 2 byte word) the attribute
"byte" which determines foreground/background colour; reverse
video; or blink.
Normal screen I/O goes via MON1 and not via CGOUT however. GCOUT
has to be called directly ( or via .CL ) to utilise GCOLR!
To get normal display in colour, try 12H GCOLR !
LINK PUTCHR GCOUT
This should give you white text on a blue background ( attribute 12H)
If you like it ( sigh !!!) you can save the system with SAVESYS ( no
filename needed -- default is 4th_86.COM)
or alternatively you can use FSAVE xxxx.COM where xxxx.COM is
your preferred system file name.
At any time you can use FSAVE or SAVESYS to save on disk the
current state and loaded words of the file you are working on.
You can also use " xxxx.yyy" MAP to save in file xxxx.yyy a
summary of all the new words you have entered in the dictionary up
to the given time. ( It will not include the normal system words -
but it will work in either meta-compile or normal mode )
--oOo----------------------
4th_86 version 3.0 UPDATE.486 page 5
Because DOS paths have been included, the former use of the
backslash \ to delineate binary bytes in ASCII strings can no
longer be continued. The delineator is now an up-arrow ^
Therefore " This is \9\ a test \0dh\\0ah\ end of test " ."
Now becomes
" This is ^9^ a test ^0dh^^0ah^ end of test " ."
or preferably
" This is " ." tab
" a test" ." crlf
" end of test" ."
--oOo----------------------
A major bug in the shell-to-DOS routines has been corrected. This
should now work on all hardware. In addition, the standard
AUTOEXEC.BAT path should be maintained whilst in the editor or
COMMAND.COM shell.
There was also a bug in the colour graphics setup which has been
removed.
Most demonstrations have been updated. Specifically, HILSIER2.4TH
has been corrected so that it works in CGA ( after LINK EGAM CGAM)
as well as EGA mode, and MAND ( Mandelbrot display) has been
"tweaked" to minimise duplication of floating point and loop
variable calculations. This has brought the Mandelbrot display down
from a day to just over an hour. [it is still - however - a "brute
force and ignorance" algorithm, and many more sophisticated
and beautiful "contouring algorithms" exist in the public domain]
$