Markdownify (sort of)
Chris Pressey
10 years ago
19 | 19 | This work by Chris Pressey of Cat's Eye Technologies |
20 | 20 | has been placed into the public domain (see UNLICENSE.) |
21 | 21 | |
22 | ,---------------------------------------------------. | |
23 | | * WARNING! * CAUTION * PROCEED AT YOUR OWN RISK * | | |
24 | | | | |
25 | | * THIS PRODUCT IS PROVIDED "AS IS" * | | |
26 | | | | |
27 | | * CAT'S EYE TECHNOLOGIES CAN NOT BE HELD LIABLE * | | |
28 | | * FOR ANY DAMAGES RESULTING FROM ITS USE * | | |
29 | `---------------------------------------------------' | |
22 | ,---------------------------------------------------. | |
23 | | * WARNING! * CAUTION * PROCEED AT YOUR OWN RISK * | | |
24 | | | | |
25 | | * THIS PRODUCT IS PROVIDED "AS IS" * | | |
26 | | | | |
27 | | * CAT'S EYE TECHNOLOGIES CAN NOT BE HELD LIABLE * | | |
28 | | * FOR ANY DAMAGES RESULTING FROM ITS USE * | | |
29 | `---------------------------------------------------' | |
30 | 30 | |
31 | 31 | What is it? |
32 | 32 | ----------- |
34 | 34 | BefOS is a toy OS written in 100% 8086 assembler. It requires the |
35 | 35 | following hardware (or a decently emulated version thereof): |
36 | 36 | |
37 | Processor: 100% Intel 8086+ Compatible | |
38 | BIOS: 100% IBM PC Compatible | |
39 | Video: 100% VGA Compatible | |
40 | Keyboard: 100% Standard 101/102-Key Compatible | |
41 | RAM: 640K base, 8M extended | |
42 | Storage: 1.44M floppy drive 0 (A:) | |
37 | Processor: 100% Intel 8086+ Compatible | |
38 | BIOS: 100% IBM PC Compatible | |
39 | Video: 100% VGA Compatible | |
40 | Keyboard: 100% Standard 101/102-Key Compatible | |
41 | RAM: 640K base, 8M extended | |
42 | Storage: 1.44M floppy drive 0 (A:) | |
43 | 43 | |
44 | 44 | BefOS was originally written in Borland's Turbo Assembler format, |
45 | 45 | but this version has been translated to use the free assembler |
53 | 53 | The 'test' target in the top-level (and disk/) Makefile will run |
54 | 54 | Bochs automatically on this floppy image. |
55 | 55 | |
56 | Using Windows: run BEKERNEL.COM. (Note that I'm not sure if this | |
56 | Using Windows: run `BEKERNEL.COM`. (Note that I'm not sure if this | |
57 | 57 | works anymore in the NASM version; I haven't tried it. You still |
58 | 58 | need a blank floppy in drive A:, though.) |
59 | 59 | |
70 | 70 | |
71 | 71 | Here is a quick-and-dirty guide to the top line of this display: |
72 | 72 | |
73 | B the BefOS 'logo.' | |
74 | (light) yellow = working, green = worked, red = failed | |
75 | (4 hex digits) amount of base memory available, in K | |
76 | (4 hex digits) amount of extended memory available, in K | |
77 | (green bar) | |
78 | (4 hex digits) link to next cluster of current cluster | |
79 | (4 hex digits) link to previous cluster of current cluster | |
80 | (4 hex digits) link to application cluster of current cluster | |
81 | (4 hex digits) link to colour cluster of current cluster | |
82 | (4 hex digits) link to help cluster of current cluster | |
83 | (green bar) | |
84 | (16 OEM chars) description of current cluster | |
85 | (green bar) | |
86 | (4 hex digits) value of last keystroke detected | |
87 | (2 hex digits) value of current byte under cursor | |
88 | (4 hex digits) current cluster number, starts at 0 | |
73 | B the BefOS 'logo.' | |
74 | (light) yellow = working, green = worked, red = failed | |
75 | (4 hex digits) amount of base memory available, in K | |
76 | (4 hex digits) amount of extended memory available, in K | |
77 | (green bar) | |
78 | (4 hex digits) link to next cluster of current cluster | |
79 | (4 hex digits) link to previous cluster of current cluster | |
80 | (4 hex digits) link to application cluster of current cluster | |
81 | (4 hex digits) link to colour cluster of current cluster | |
82 | (4 hex digits) link to help cluster of current cluster | |
83 | (green bar) | |
84 | (16 OEM chars) description of current cluster | |
85 | (green bar) | |
86 | (4 hex digits) value of last keystroke detected | |
87 | (2 hex digits) value of current byte under cursor | |
88 | (4 hex digits) current cluster number, starts at 0 | |
89 | 89 | |
90 | 90 | And here are some key bindings: (NYI=Not Yet Implemented): |
91 | 91 | |
92 | PgUp Up One Cluster | |
93 | PgDn Down One cluster | |
94 | ||
95 | Ctrl-PgUp Link to Previous Cluster (header) | |
96 | Ctrl-PgDn Link to Next Cluster (header) | |
97 | F1 Link to Help Cluster (header) | |
98 | ||
99 | Up Move Pointer Up One Row | |
100 | Down Move Pointer Down One Row | |
101 | Left Move Pointer Left One Column | |
102 | Right Move Pointer Right One Column | |
103 | ||
104 | ^2 (^@) Write 0 | |
105 | ^A to ^Z Write 1 - 26 | |
106 | ESC Write 27 | |
107 | ^\ Write 28 | |
108 | ^] Write 29 | |
109 | ^6 (^^) Write 30 | |
110 | ^- (^_) Write 31 | |
111 | Space Write 32 | |
112 | !..~ Write 33 - 126 | |
113 | Ctrl-Bkspc Write 127 | |
114 | ||
115 | Alt-L Load (refresh from disk) | |
116 | Alt-R Run (if AA==ffff, executes machine code) | |
117 | ||
118 | F4 Change Properties (Header) | |
119 | Alt-- Delete Properties (Header) | |
120 | Alt-= Initialize Properties (Header) | |
121 | ||
122 | Alt-M show More data on screen | |
123 | Alt-N show less data on screeN | |
124 | ||
125 | Alt-G Go to cluster number | |
126 | ||
127 | NYI*1 Alt-E Edit: allow writes | |
128 | Alt-U fill cluster Uniformly with current byte | |
129 | Alt-C Copy cluster data & header to clipboard | |
130 | Alt-P Paste cluster data & header from clipboard | |
131 | Alt-H toggle High bit | |
132 | Alt-S Save (commit changes to data & header to disk) | |
133 | ||
134 | Alt-Q Quit (MS-DOS only) | |
135 | *2 Alt-I Install cluster from file (MS-DOS only) | |
92 | PgUp Up One Cluster | |
93 | PgDn Down One cluster | |
94 | ||
95 | Ctrl-PgUp Link to Previous Cluster (header) | |
96 | Ctrl-PgDn Link to Next Cluster (header) | |
97 | F1 Link to Help Cluster (header) | |
98 | ||
99 | Up Move Pointer Up One Row | |
100 | Down Move Pointer Down One Row | |
101 | Left Move Pointer Left One Column | |
102 | Right Move Pointer Right One Column | |
103 | ||
104 | ^2 (^@) Write 0 | |
105 | ^A to ^Z Write 1 - 26 | |
106 | ESC Write 27 | |
107 | ^\ Write 28 | |
108 | ^] Write 29 | |
109 | ^6 (^^) Write 30 | |
110 | ^- (^_) Write 31 | |
111 | Space Write 32 | |
112 | !..~ Write 33 - 126 | |
113 | Ctrl-Bkspc Write 127 | |
114 | ||
115 | Alt-L Load (refresh from disk) | |
116 | Alt-R Run (if AA==ffff, executes machine code) | |
117 | ||
118 | F4 Change Properties (Header) | |
119 | Alt-- Delete Properties (Header) | |
120 | Alt-= Initialize Properties (Header) | |
121 | ||
122 | Alt-M show More data on screen | |
123 | Alt-N show less data on screeN | |
124 | ||
125 | Alt-G Go to cluster number | |
126 | ||
127 | Alt-E Edit: allow writes *1 | |
128 | Alt-U fill cluster Uniformly with current byte | |
129 | Alt-C Copy cluster data & header to clipboard | |
130 | Alt-P Paste cluster data & header from clipboard | |
131 | Alt-H toggle High bit | |
132 | Alt-S Save (commit changes to data & header to disk) | |
133 | ||
134 | Alt-Q Quit (MS-DOS only) | |
135 | Alt-I Install cluster from file (MS-DOS only) *2 | |
136 | 136 | |
137 | 137 | *1: writes are always allowed in this version so BE CAREFUL WITH ALT-S. |
138 | 138 | *2: type the filename into the start of the cluster buffer and |
145 | 145 | 48 bytes of the second cluster. The first 2000 bytes are data. |
146 | 146 | The header is structured thus: |
147 | 147 | |
148 | +------------------------------------------------+ | |
149 | |VVNNPPAACCHHxxxxxxxxxxxxxxxxxxxxDDDDDDDDDDDDDDDD| | |
150 | +------------------------------------------------+ | |
151 | ||
152 | VV = word indicating header type. | |
153 | ||
154 | bef0 indicates standard BefOS header, the only type supported. | |
155 | ||
156 | NN = word containing the cluster number of the next cluster. | |
157 | ||
158 | 0000 indicates that there is no next cluster. | |
159 | ||
160 | PP = word containing the cluster number of the previous cluster. | |
161 | ||
162 | 0000 indicates that there is no previous cluster. | |
163 | ||
164 | AA = word containing the cluster number of the first cluster of | |
165 | the application for which this is a document. | |
166 | ||
167 | 0000 indicates that there is no special application for this | |
168 | generic document. | |
169 | ||
170 | ffff indicates that this IS an application written in | |
171 | x86 machine code. | |
172 | ||
173 | CC = word containing the cluster number of | |
174 | this cluster's colour cluster. | |
175 | ||
176 | 0000 indicates that this cluster is monochrome. | |
177 | ||
178 | HH = 2 bytes containing the cluster number of | |
179 | this cluster's help-cluster. | |
180 | ||
181 | 0000 indicates that this cluster is helpless. | |
182 | ||
183 | xxxxxxxxxxxxxxxxxxxx = 20 bytes reserved. | |
184 | ||
185 | DDDDDDDDDDDDDDDD = 16 bytes ASCII description e.g. "Seismology Now" | |
148 | +------------------------------------------------+ | |
149 | |VVNNPPAACCHHxxxxxxxxxxxxxxxxxxxxDDDDDDDDDDDDDDDD| | |
150 | +------------------------------------------------+ | |
151 | ||
152 | VV = word indicating header type. | |
153 | ||
154 | bef0 indicates standard BefOS header, the only type supported. | |
155 | ||
156 | NN = word containing the cluster number of the next cluster. | |
157 | ||
158 | 0000 indicates that there is no next cluster. | |
159 | ||
160 | PP = word containing the cluster number of the previous cluster. | |
161 | ||
162 | 0000 indicates that there is no previous cluster. | |
163 | ||
164 | AA = word containing the cluster number of the first cluster of | |
165 | the application for which this is a document. | |
166 | ||
167 | 0000 indicates that there is no special application for this | |
168 | generic document. | |
169 | ||
170 | ffff indicates that this IS an application written in | |
171 | x86 machine code. | |
172 | ||
173 | CC = word containing the cluster number of | |
174 | this cluster's colour cluster. | |
175 | ||
176 | 0000 indicates that this cluster is monochrome. | |
177 | ||
178 | HH = 2 bytes containing the cluster number of | |
179 | this cluster's help-cluster. | |
180 | ||
181 | 0000 indicates that this cluster is helpless. | |
182 | ||
183 | xxxxxxxxxxxxxxxxxxxx = 20 bytes reserved. | |
184 | ||
185 | DDDDDDDDDDDDDDDD = 16 bytes ASCII description e.g. "Seismology Now" | |
186 | 186 | |
187 | 187 | |
188 | 188 | |
201 | 201 | |
202 | 202 | Header: |
203 | 203 | |
204 | +------------------------------------------------+ | |
205 | |VVAAxxxxxxxxxxxxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | |
206 | |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | |
207 | +------------------------------------------------+ | |
208 | ||
209 | VV = word indicating header type. | |
210 | ||
211 | bef0 indicates standard BefOS header, the only type supported. | |
212 | ||
213 | AA = word containing the cluster number of the first cluster of | |
214 | the application for which this is a document. | |
215 | ||
216 | 0000 indicates that there is no special application for this | |
217 | generic document. | |
218 | ||
219 | ffff indicates that this IS an application written in | |
220 | x86 machine code. | |
221 | ||
222 | xxxxxxxxxxxx = 12 bytes reserved. | |
223 | ||
224 | DD..DD = 80 bytes ASCII description. | |
204 | +------------------------------------------------+ | |
205 | |VVAAxxxxxxxxxxxxDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | |
206 | |DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD| | |
207 | +------------------------------------------------+ | |
208 | ||
209 | VV = word indicating header type. | |
210 | ||
211 | bef0 indicates standard BefOS header, the only type supported. | |
212 | ||
213 | AA = word containing the cluster number of the first cluster of | |
214 | the application for which this is a document. | |
215 | ||
216 | 0000 indicates that there is no special application for this | |
217 | generic document. | |
218 | ||
219 | ffff indicates that this IS an application written in | |
220 | x86 machine code. | |
221 | ||
222 | xxxxxxxxxxxx = 12 bytes reserved. | |
223 | ||
224 | DD..DD = 80 bytes ASCII description. | |
225 | 225 | |
226 | 226 | |
227 | 227 | Building BefOS |
234 | 234 | |
235 | 235 | bin/ |
236 | 236 | amalgam8 Constructs a boot disk image from BefOS objects |
237 | extract8 Extracts BefOS objects from a boot disk image | |
238 | txt2page Turns a text file into a BefOS object file | |
239 | mkbfinc.pl Used during build to generate list of API calls | |
237 | extract8 Extracts BefOS objects from a boot disk image | |
238 | txt2page Turns a text file into a BefOS object file | |
239 | mkbfinc.pl Used during build to generate list of API calls | |
240 | 240 | disk/ Contains bootable BefOS boot disk images |
241 | 241 | obj/ Contains BefOS objects that will be amalgamated |
242 | 242 | src/ Contains source code for BefOS: |
243 | 243 | apps/ Source code for the BefOS applications installed |
244 | boot/ Source code for the boot disk's boot block | |
245 | inc/ Include files shared by many BefOS object sources | |
246 | kernel/ Source file for the core components of BefOS | |
247 | page/ Misc files that become BefOS pages on the disk | |
248 | tools/ Source code for the util programs put in bin/ | |
249 | turbo/ The original Turbo Assembler sources for BefOS | |
244 | boot/ Source code for the boot disk's boot block | |
245 | inc/ Include files shared by many BefOS object sources | |
246 | kernel/ Source file for the core components of BefOS | |
247 | page/ Misc files that become BefOS pages on the disk | |
248 | tools/ Source code for the util programs put in bin/ | |
249 | turbo/ The original Turbo Assembler sources for BefOS | |
250 | 250 | |
251 | 251 | |
252 | 252 | Putative TODO list |