Information about BIF as of April 2019. Joel Matthew Rees, Amagasaki, Hyogo, Japan. https://ja.osdn.net/projects/bif-6809/ joel.rees+knock@gmail.com http://reiisi.blogspot.com https://defining-computers.blogspot.com/ https://ja.osdn.net/users/reiisi/ https://sourceforge.net/u/reiisi/profile/ etc. Copyright 2000, 2019 Joel Matthew Rees ----- (The following can be found in its original form in the bif-c repositories. bif-c is buggy, by the way.) ----- BIF was a dialect of the early fig-standard FORTH. It was a student project, not a commercial product, and no warranty has ever been made concerning it, whatsoever. It was written on the Color Computer 2 in 6809 assembler; the assembler used was disk EDTASM+. It also ran on the Color Computer 3, with the expected limitations of requiring the 32 column screen, etc. License information -- the rights to BIF and the materials with it, and restrictions on distribution -- are described in the file BIFDOC.TXT, which really should distributed with the source along with this README.TXT. The short version of the licensing information is that I am distributing BIF6809 under the essential terms of the Internet Systems Consortium ISC License: ========= Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the accompanying copyright notices and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ========= I add here the stipulation that I claim right to the word "BIF" as the name of a programming language. If you are going to distribute or redistribute the obect or source of bif in any of its forms, it really makes no sense not to include the BIFDOC.TXT and this README.TXT. If you do something like that and you or anyone that gets the results has problems with it, and you come to me looking for help, expect to be teased mercilessly about it. And expect to be on the bottom of my priority list, not out of spite, out of self-protection. ----- I have reconstructed something approximating my source disks (using the great emulator, xroar: https://www.6809.org.uk/xroar/ and the imgtool distributed with MAME, along with the *nix tools). Some useful commands are noted in commands.txt. The name of the disk image is (appropriately?) bifsource.dsk. It can be directly attached by xroar's disk emulator tools, and should be similarly useable with VCC, MAME, etc. al. ----- The assembler source files are readable by the a variety of text editors, that respond flexibly about line termination. But if you try editing them with a normal editor and then assembling the result with EDTASM+, be very careful about line termination. Be prepared to use *nix command line tools like tr, cut, sed/awk, perl, etc. The source files retain the original line numbers as used by EDTASM+, which is why you will want the *nix tools. But I have included source to a short C program, stripln.c, which strips the line numbers. This program may also be useful for converting line endings, if that is necessary. Look for it in the junkbox directory, and be prepared to compile it. If you are under the burden of using Microsoft OSses, the Cygwin project should be of quite a bit of assistance, including the *nix command line tools and gcc and clang, etc. ----- Macros are used in the source, but shouldn't cause too much confusion to a programmer with assembler experience. If anyone is brave enough to try to port it, key routines will be EMIT, KEY, ?TERMINAL, CR, R/W, and several routines in the EDITOR vocabulary where I used direct video I/O out of laziness. ----- BIF might be useful for experimentation and for learning about FORTH, for someone who has access to a Color Computer or an emulator. The executable file may be run on the Color Computer by LOADMing it via Color Computer Disk BASIC. (More details in BIFDOC.TXT.) It is assembled to be EXECed at hexadecimal 1300 (&H1300). ----- One specific warning must be given: DO NOT ATTEMPT TO ACCESS ORDINARY DISKS FORMATTED FOR USE BY OTHER OPERATING SYSTEMS WHILE BIF IS RUNNING! Because of disk buffering, it will be difficult to avoid unintentional writes to the disk. If you do try looking at an OS-9 or Color Computer DOS (etc.) disk with BIF, don't blame me if you destroy the directory and/or other valuable data. ----- I tried a re-write in C (bif-c), but it's not working well. Issues with file systems (no real file system in BIF) and the current standardization committees ideas about what is meaningful code, problems with my own attention span, etc. keep it full of bugs. And I used a number of neat tricks that get in the way in C. One thing I want to retain is the use of nested binary trees in the symbol table. Incidentally, said re-write has been in process for over thirty years. Real life keeps getting in the way. ----- I am including source to a Q&D C program, 32col.c, which will re-format files extracted from BIF disks for normal text editors. Mac-isms and Codwarrior-isms can probably be discerned by comparing it with stripln.c, mentioned above. When I brought the BIF high-level source with me, I used some feature of Color Computer BASIC and BIF that I have forgotten to dump some of the Forth style screen listings. The program stripln can be used to strip line numbers from such screen listings, as well. The documentation is ASCII text, with CR/LF line termination, and should be examined carefully by anyone considering a port. Bear in mind that it was written toward Color Computer users. I apologize for not alphabetizing the FORTH words by name. I did it once with a C program, but got too ambitious and lost the results in the process of trying to split it up into modules. I haven't had enough time to finish the modularization, yet, either. (Getting an iBook so I could work on the train just gave me more things to do on the train.) Files in this distribution -- 6809 Assembly Language Source files: README.TXT this file. BIFDOC.TXT general explanations, including descriptions of every word. BIFU.I structure of the per-user variable page. BIF.M macros, including the inner interpreter (basis of the virtual machine), the dictionary (symbol table) structure offsets, and invocations for the fundamental objects. BIFDP.A things kept in the direct page, including the behaviours for the fundamental objects (was not a good idea after all), and the index to the per user variable page. BIFST.A cold and warm boot routines and the initial value table for the per-user variable page. BIF.ASM the main source file (includes other parts), basic expression evaluation, more of the inner interpreter, basic vocabulary access, basic symbol parsing. BIFB.A basic I/O, more of the inner interpreter, extended expression evaluation, the rest of the basic symbol table access. BIF1.A data movers, common expression evaluation, stack pointer access, more of the inner interpreter, high-level compiler. BIF1B.A common expression evaluation, extended expression evaluation, innards of the high-level compiler, more of the high-level compiler, compiler directive. BIF2.A more common expression evaluation, common constants, I/O constants, character typing constants, symbol table globals, compiler globals, parser globals, I/O globals. BIF2B.A compiler globals, more high-level compiler, more common expression evaluation, formatted output. BIF3.A more basic symbol table, symbol table, more compiler, more formatted output, more data movers, more low-level parser (formatted input), more I/O, more extended expression evaluation, more expression evaluation, more compiler directives, an extension to the inner interpreter. BIF3B.A more formatted output, more innards of the high-level compiler, more high-level compiler. BIF4.A more innards of the expression evaluator, more common expression evaluation, more I/O (buffer handling). BIF4B.A more high-level compiler, more compiler directive. BIF5.A more innards of the high-level compiler, more I/O (buffering), disk access, error handling, more formatted output. BIF5B.A more error handling, screen-based sector (character) editor. BIF6.A more parser (formatted input), I/O (terminal), compiler (input), symbol table (lookup). BIF6B.A symbol table, compiler innards, null vector test, more screen-based sector editor. BIF7.A compiler, formatted output, compiler directives BIF7B.A error handling, symbol tables, compiler directives. stripln.c, 32col.c, C language source and Macintosh executables for stripping line numbers and reformatting 32 column source code "screens". The two XXX.GXX.out files below are output of the 32col program. ----- Hopefully, I will shortly have time to reconstruct useful things from the following files on the tools.dsk disk image and/or the cs431 disk image: TOOLS.G00, TOOLS.G00.out FORTH source for disk listing, screen handling, definition dumping, sector copying, forward referencing, buffer maintenance, experimenting with hardware, double (32 bit) integer math, etc., and a post-fix assembler. PAIRS.G28, PAIRS.G28.out a "database" example from one of my FORTH books. TOOLS_G00_ERRORS.text Contains the tools output readable in regular text editor format and the error messages, with their corresponding number in hexadecimal. I should make a separate file for the error messages (or something). and SCR33.ARR arrays for CS431. SCR34.LOC some math for CS431. SCR40.431 test suite for CS431.