OSDN Git Service

extracts okay, formats okay, no insertion into images, still must use dd to build...
[bif-6809/bif-6809.git] / README.TXT~
1 Information about BIF as of April 2019.\r
2 \r
3         Joel Matthew Rees, Amagasaki, Hyogo, Japan.\r
4                                         https://ja.osdn.net/projects/bif-6809/\r
5                                         joel.rees+knock@gmail.com\r
6                                         http://reiisi.blogspot.com\r
7                                         https://defining-computers.blogspot.com/\r
8                                         https://ja.osdn.net/users/reiisi/\r
9                                         https://sourceforge.net/u/reiisi/profile/\r
10                                         etc.\r
11         Copyright 2000, 2019 Joel Matthew Rees\r
12 \r
13 -----\r
14 \r
15 (The following can be found in its original form in the bif-c \r
16 repositories. bif-c is buggy, by the way.)\r
17 \r
18 -----\r
19 \r
20 BIF was a dialect of the early fig-standard FORTH.  It was a student\r
21 project, not a commercial product, and no warranty has ever been made \r
22 concerning it, whatsoever.  It was written on the Color Computer 2 in \r
23 6809 assembler; the assembler used was disk EDTASM+.  It also ran on \r
24 the Color Computer 3, with the expected limitations of requiring the \r
25 32 column screen, etc. \r
26 \r
27 License information -- the rights to BIF and the materials with it, \r
28 and restrictions on distribution -- are described in the file \r
29 BIFDOC.TXT, which really should distributed with the source along with \r
30 this README.TXT. \r
31 \r
32 The short version of the licensing information is that I am distributing \r
33 BIF6809 under the essential terms of the Internet Systems Consortium \r
34 ISC License:\r
35 \r
36 =========\r
37 Permission to use, copy, modify, and/or distribute this software for \r
38 any purpose with or without fee is hereby granted, provided that the \r
39 accompanying copyright notices and this permission notice appear in \r
40 all copies.\r
41 \r
42 THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES \r
43 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF \r
44 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY \r
45 SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES \r
46 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN \r
47 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, \r
48 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS \r
49 SOFTWARE.\r
50 =========\r
51 \r
52 I add here the stipulation that I claim right to the word "BIF" as \r
53 the name of a programming language.\r
54 \r
55 If you are going to distribute or redistribute the obect or source of \r
56 bif in any of its forms, it really makes no sense not to include the \r
57 BIFDOC.TXT and this README.TXT. If you do something like that and \r
58 you or anyone that gets the results has problems with it, and you come \r
59 to me looking for help, expect to be teased mercilessly about it. And \r
60 expect to be on the bottom of my priority list, not out of spite, \r
61 out of self-protection.\r
62 \r
63 -----\r
64 \r
65 I have reconstructed something approximating my source disks (using the \r
66 great emulator, xroar: https://www.6809.org.uk/xroar/ and the imgtool\r
67 distributed with MAME, along with the *nix tools). Some useful commands \r
68 are noted in commands.txt.\r
69 \r
70 The name of the disk image is (appropriately?) bifsource.dsk. It can be \r
71 directly attached by xroar's disk emulator tools, and should be similarly \r
72 useable with VCC, MAME, etc. al.\r
73 \r
74 -----\r
75 \r
76 The assembler source files are readable by the a variety of text editors,\r
77 that respond flexibly about line termination. But if you try editing them\r
78 with a normal editor and then assembling the result with EDTASM+, be very \r
79 careful about line termination. Be prepared to use *nix command line tools \r
80 like tr, cut, sed/awk, perl, etc. \r
81 \r
82 The source files retain the original line numbers as used by EDTASM+, \r
83 which is why you will want the *nix tools. But I have included source to a \r
84 short C program, stripln.c, which strips the line numbers. This program \r
85 may also be useful for converting line endings, if that is necessary. Look \r
86 for it in the junkbox directory, and be prepared to compile it. \r
87 \r
88 If you are under the burden of using Microsoft OSses, the Cygwin project \r
89 should be of quite a bit of assistance, including the *nix command line \r
90 tools and gcc and clang, etc.\r
91 \r
92 -----\r
93 \r
94 Macros are used in the source, but shouldn't cause too much confusion \r
95 to a programmer with assembler experience. If anyone is brave enough \r
96 to try to port it, key routines will be EMIT, KEY, ?TERMINAL, CR, R/W, \r
97 and several routines in the EDITOR vocabulary where I used direct \r
98 video I/O out of laziness.\r
99 \r
100 -----\r
101 \r
102 BIF might be useful for experimentation and for learning about FORTH, \r
103 for someone who has access to a Color Computer or an emulator. The \r
104 executable file may be run on the Color Computer by LOADMing it via \r
105 Color Computer Disk BASIC. (More details in BIFDOC.TXT.) \r
106 \r
107 It is assembled to be EXECed at hexadecimal 1300 (&H1300). \r
108 \r
109 -----\r
110 \r
111 One specific warning must be given:\r
112 \r
113 DO NOT ATTEMPT TO ACCESS ORDINARY DISKS FORMATTED FOR USE BY OTHER\r
114 OPERATING SYSTEMS WHILE BIF IS RUNNING! Because of disk buffering, it \r
115 will be difficult to avoid unintentional writes to the disk. \r
116 \r
117 If you do try looking at an OS-9 or Color Computer DOS (etc.) disk with \r
118 BIF, don't blame me if you destroy the directory and/or other valuable \r
119 data.\r
120 \r
121 -----\r
122 \r
123 I tried a re-write in C (bif-c), but it's not working well. Issues with \r
124 file systems (no real file system in BIF) and the current standardization \r
125 committees ideas about what is meaningful code, problems with my own \r
126 attention span, etc. keep it full of bugs. And I used a number of neat \r
127 tricks that get in the way in C. \r
128 \r
129 One thing I want to retain is the use of nested binary trees in the \r
130 symbol table. \r
131 \r
132 Incidentally, said re-write has been in process for over thirty years.\r
133 Real life keeps getting in the way.\r
134 \r
135 -----\r
136 \r
137 I am including source to a Q&D C program, 32col.c, which will re-format \r
138 files extracted from BIF disks for normal text editors. Mac-isms and \r
139 Codwarrior-isms can probably be discerned by comparing it with stripln.c, \r
140 mentioned above. \r
141 \r
142 When I brought the BIF high-level source with me, I used some feature of \r
143 Color Computer BASIC and BIF that I have forgotten to dump some of the \r
144 Forth style screen listings. \r
145 \r
146 The program stripln can be used to strip line numbers from such screen \r
147 listings, as well. \r
148 \r
149 The documentation is ASCII text, with CR/LF line termination, and should\r
150 be examined carefully by anyone considering a port.  Bear in mind that\r
151 it was written toward Color Computer users.\r
152 \r
153 I apologize for not alphabetizing the FORTH words by name. I did it once \r
154 with a C program, but got too ambitious and lost the results in the \r
155 process of trying to split it up into modules. I haven't had enough time \r
156 to finish the modularization, yet, either. (Getting an iBook so I could \r
157 work on the train just gave me more things to do on the train.)\r
158 \r
159 Files in this distribution --\r
160 \r
161 6809 Assembly Language Source files:\r
162 \r
163 README.TXT\r
164         this file.\r
165 BIFDOC.TXT\r
166         general explanations, including descriptions of every word.\r
167 BIFU.I\r
168         structure of the per-user variable page.\r
169 BIF.M\r
170         macros, including the inner interpreter (basis of the virtual machine),\r
171         the dictionary (symbol table) structure offsets,\r
172         and invocations for the fundamental objects.\r
173 BIFDP.A\r
174         things kept in the direct page, \r
175         including the behaviours for the fundamental objects (was not a good idea after all),\r
176         and the index to the per user variable page. \r
177 BIFST.A\r
178         cold and warm boot routines and the initial value table for the per-user variable page.\r
179 BIF.ASM\r
180         the main source file (includes other parts),\r
181         basic expression evaluation, more of the inner interpreter, \r
182         basic vocabulary access, basic symbol parsing.\r
183 BIFB.A\r
184         basic I/O, more of the inner interpreter, extended expression evaluation,\r
185         the rest of the basic symbol table access.\r
186 BIF1.A\r
187         data movers, common expression evaluation,\r
188         stack pointer access, more of the inner interpreter,\r
189         high-level compiler.\r
190 BIF1B.A\r
191         common expression evaluation, extended expression evaluation,\r
192         innards of the high-level compiler, more of the high-level compiler,\r
193         compiler directive.\r
194 BIF2.A\r
195         more common expression evaluation, common constants,\r
196         I/O constants, character typing constants,\r
197         symbol table globals, compiler globals, parser globals, I/O globals.\r
198 BIF2B.A\r
199         compiler globals, more high-level compiler,\r
200         more common expression evaluation, formatted output.\r
201 BIF3.A\r
202         more basic symbol table, symbol table, more compiler, more formatted output,\r
203         more data movers, more low-level parser (formatted input), more I/O,\r
204         more extended expression evaluation, more expression evaluation, \r
205         more compiler directives, an extension to the inner interpreter.\r
206 BIF3B.A\r
207         more formatted output, more innards of the high-level compiler,\r
208         more high-level compiler.\r
209 BIF4.A\r
210         more innards of the expression evaluator, more common expression evaluation,\r
211         more I/O (buffer handling).\r
212 BIF4B.A\r
213         more high-level compiler, more compiler directive.\r
214 BIF5.A\r
215         more innards of the high-level compiler, more I/O (buffering),\r
216         disk access, error handling, more formatted output.\r
217 BIF5B.A\r
218         more error handling, screen-based sector (character) editor.\r
219 BIF6.A\r
220         more parser (formatted input), I/O (terminal), compiler (input),\r
221         symbol table (lookup).\r
222 BIF6B.A\r
223         symbol table, compiler innards, null vector test, \r
224         more screen-based sector editor.\r
225 BIF7.A\r
226         compiler, formatted output, compiler directives\r
227 BIF7B.A\r
228         error handling, symbol tables, compiler directives.\r
229 stripln.c,\r
230 32col.c, \r
231         C language source and Macintosh executables for stripping line \r
232         numbers and reformatting 32 column source code "screens". The two \r
233         XXX.GXX.out files below are output of the 32col program.\r
234 \r
235 -----\r
236 \r
237 Hopefully, I will shortly have time to reconstruct useful things from the \r
238 following files on the tools.dsk disk image and/or the cs431 disk image:\r
239 \r
240 TOOLS.G00, TOOLS.G00.out\r
241         FORTH source for disk listing, screen handling, definition dumping, \r
242         sector copying, forward referencing, buffer maintenance, \r
243         experimenting with hardware, double (32 bit) integer math, etc.,\r
244         and a post-fix assembler.\r
245 PAIRS.G28, PAIRS.G28.out\r
246         a "database" example from one of my FORTH books.\r
247 TOOLS_G00_ERRORS.text\r
248         Contains the tools output readable in regular text editor format \r
249         and the error messages, with their corresponding number in \r
250         hexadecimal. I should make a separate file for the error messages\r
251         (or something).\r
252 \r
253 and\r
254 \r
255 SCR33.ARR\r
256         arrays for CS431.\r
257 SCR34.LOC\r
258         some math for CS431.\r
259 SCR40.431\r
260         test suite for CS431.\r
261 \r
262 \r
263 \r