OSDN Git Service

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