Mercurial > hg > Members > kono > os9 > sbc09
comparison README.txt @ 57:2088fd998865
sbc09 directry clean up
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Jul 2018 16:07:12 +0900 |
parents | |
children | ef64e3f4e229 |
comparison
equal
deleted
inserted
replaced
56:4fa2bdb0c457 | 57:2088fd998865 |
---|---|
1 6809 Simulator/Emulator with os9 level1/level2 | |
2 Shini KONO (kono@ie.u-ryukyu.ac.jp) Mon Jul 23 10:59:06 JST 2018 | |
3 | |
4 using nitros9 | |
5 hg clone http://hg.code.sf.net/p/nitros9/code nitros9-code | |
6 | |
7 This emulator support vrbf ( simulate unix directory as a rbf disk ) and | |
8 ROM based boot. | |
9 | |
10 make clean; make | |
11 | |
12 to run lv1 or lv2 | |
13 | |
14 make lv1 | |
15 or | |
16 make lv2 | |
17 | |
18 ======================= | |
19 | |
20 sbc09 stands for Lennart Benschop 6809 Single Board Computer. | |
21 It contains a assembler and simulator for the Motorola M6809 processor. | |
22 | |
23 copyleft (c) 1994-2014 by the sbc09 team, see AUTHORS for more details. | |
24 license: GNU General Public License version 2, see LICENSE for more details. | |
25 | |
26 | |
27 Forum thread: http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=8&t=4880 | |
28 Project: https://github.com/6809/sbc09 | |
29 | |
30 | |
31 For the usage of the assembler a09 and 6809 single board system v09 | |
32 read doc/sbc09.creole! | |
33 | |
34 | |
35 This distribution includes two different kinds of simulators: | |
36 1. The old sim6809 based "simple" simulator built as v09s, v09st | |
37 2. The 6809 single board system as a stand alone environment built as v09 | |
38 | |
39 | |
40 | |
41 Structure | |
42 --------- | |
43 | |
44 src/ | |
45 Source for the developement tools and virtual machines ... | |
46 | |
47 a09.c | |
48 The 6809 assembler. It's fairly portable (ANSI) C. It works on both | |
49 Unix and DOS (TC2.0). | |
50 | |
51 Features of the assembler: | |
52 - generates binary file starting at the first address | |
53 where code is actually generated. So an initial block of RMB's | |
54 (maybe at a different ORG) is not included in the file. | |
55 - Accepts standard syntax. | |
56 - full expression evaluator. | |
57 - Statements SET, MACRO, PUBLIC, EXTERN IF/ELSE/ENDIF INCLUDE not yet | |
58 implemented. Some provisions are already made internally for macros | |
59 and/or relocatable objects. | |
60 | |
61 v09s.c | |
62 The (old) 6809 simulator. Loads a binary image (from a09) at adress $100 | |
63 and starts executing. SWI2 and SWI3 are for character output/input. | |
64 SYNC stops simulation. When compiling set -DBIG_ENDIAN if your | |
65 computer is big-endian. Set TERM_CONTROL for a crude single character | |
66 (instead of ANSI line-by-line) input. Works on Unix. | |
67 | |
68 v09stc.c | |
69 Same as v09s.c but for Turbo C. Has its own term control. | |
70 | |
71 v09.c | |
72 engine.c | |
73 io.c | |
74 The 6809 single board simulator/emulator v09. | |
75 | |
76 mon2.asm | |
77 Monitor progam, alternative version of monitor.asm | |
78 (used in ROM image alt09.rom) | |
79 | |
80 monitor.asm | |
81 Monitor progam (used in ROM image v09.rom for v09) | |
82 | |
83 makerom.c | |
84 Helper tool to generate ROM images for v09. | |
85 | |
86 | |
87 basic/ | |
88 Basic interpreters ... | |
89 | |
90 basic.asm | |
91 Tiny Basic | |
92 fbasic.asm | |
93 Tiny Basic with Lennarts floating point routines. | |
94 | |
95 | |
96 doc/ | |
97 Documentation ... | |
98 | |
99 | |
100 examples/ | |
101 Several test and benchmark programs, simple routines and some bigger stuff | |
102 like a Forth system (ef09). | |
103 | |
104 ef09.asm Implementation of E-Forth, a very rudimentary and portable Forth. | |
105 Type WORDS to see what words you have. You can evaluate RPN integer | |
106 expressions, like "12 34 + 5 * . " You can make new words like | |
107 " : SQUARED DUP * ; " etc. | |
108 | |
109 | |
110 examples_forth/ | |
111 Forth environment with examples. | |
112 For the 6809 single board system. | |
113 | |
114 | |
115 | |
116 | |
117 Notes on Linux Fedora Core 6 | |
118 ---------------------------- | |
119 2012-06-04 | |
120 | |
121 Compiling v09s, v09st: | |
122 | |
123 * BIG_ENDIAN (already used by LINUX itself, changed to CPU_BIG_ENDIAN) | |
124 Now automatically set according to BIG_ENDIAN and BYTE_ORDER | |
125 if existing. | |
126 | |
127 * If TERM_CONTROL mode is active the keyboard is not really in raw mode - | |
128 keyboard signals are still allowed. | |
129 | |
130 * A tracefilter based on register values can be placed in the TRACE area to | |
131 get tracing output triggered by special states | |
132 | |
133 | |
134 | |
135 a09 Assembler | |
136 ------------- | |
137 | |
138 Bugfixes: | |
139 * addres modes a,INDEXREG b,INDEXREG d,INDEXREG now known | |
140 as *legal*! | |
141 | |
142 Extended version: | |
143 http://lennartb.home.xs4all.nl/A09.c | |
144 (see above) | |
145 | |
146 * options -x and -s produces output in Intel Binary/Srecord format, | |
147 contains the above mentioned bugfixes (but fixed by the original | |
148 author). | |
149 | |
150 | |
151 | |
152 | |
153 v09s* Simulator | |
154 --------------- | |
155 | |
156 ### CC register | |
157 | |
158 E F H I N Z V C Flag | |
159 8 7 6 5 4 3 2 1 Bit | |
160 | | | | | | | | | |
161 | | | | | | | +- $01 | |
162 | | | | | | +--- $02 | |
163 | | | | | +----- $04 | |
164 | | | | +------- $08 | |
165 | | | +--------- $10 | |
166 | | +----------- $20 | |
167 | +------------- $40 | |
168 +--------------- $80 | |
169 | |
170 | |
171 # differences from real 6809: | |
172 | |
173 ldd #$0fc9 | |
174 addb #$40 | |
175 adca #$00 | |
176 | |
177 H is set on VCC but not on real 6809, sim6809 does what? | |
178 | |
179 | |
180 ### special behavior | |
181 | |
182 swi2 output character (STDOUT) in register B | |
183 swi3 read character from keyboard into register B | |
184 sync exit simulator | |
185 | |
186 | |
187 ### start program | |
188 v09s BINARY | |
189 | |
190 ### start program with tracing output on STDOUT | |
191 v09st BINARY | |
192 | |
193 ### run program and leave memory dump (64k) | |
194 | |
195 # memory dump in file dump.v09 | |
196 v09s -d BINARY | |
197 | |
198 | |
199 | |
200 ### Bugfixes | |
201 | |
202 * static int index; | |
203 otherwise the global C library function index() is referenced! | |
204 Write access on it leads to a core dump. | |
205 | |
206 * BIG_ENDIAN is not useable in FLAG because (POSIX?) Unix | |
207 (especially Linux) defines its byte order. | |
208 If BIG_ENDIAN == BYTE_ORDER -> architecture is big endian! | |
209 Changed to CPU_BIG_ENDIAN, which is refering BIG_ENDIAN and | |
210 BYTE_ORDER automatically (if existent). | |
211 | |
212 | |
213 | |
214 | |
215 | |
216 | |
217 eForth | |
218 ------ | |
219 | |
220 Source: | |
221 | |
222 ef09.asm | |
223 | |
224 Backspace character changed from 127 to 8. | |
225 | |
226 | |
227 Memory-Layout: | |
228 | |
229 0100 At this address the binary is placed to, the Forth entry point | |
230 03C0 USER area start | |
231 4000 Memory TOP | |
232 | |
233 | |
234 I/O: | |
235 Keyboard input: | |
236 * ^H or BSP deletes character | |
237 * RETURN -> interrupts (long) output | |
238 | |
239 Start: | |
240 | |
241 ../v09s ef09 | |
242 | |
243 | |
244 Bugs: | |
245 SEE ; | |
246 STAR (*) : * UM* DROP ; ... wrong, | |
247 : * M* DROP ; ... correct (sign!) | |
248 | |
249 Typical commands: | |
250 | |
251 Commands alway in upper case!!! | |
252 | |
253 WORD list of defined words of the current vocabulary | |
254 | |
255 BYE exit Forth (back to shell) | |
256 DUMP hex memory dump | |
257 SEE HL-word decompiler, corrected: | |
258 * stops at EXIT | |
259 * handles more special primitives (literals, strings, | |
260 variable, constants)) | |
261 * handles Direct Threading | |
262 * output line by line with address | |
263 .S shows the content of the parameter stack | |
264 | |
265 count FOR ... NEXT | |
266 replacement for | |
267 hi lo DO ... I ... LOOP | |
268 hi lo - 1+ FOR ... R@ lo + ... NEXT | |
269 | |
270 | |
271 | |
272 | |
273 Extensions: | |
274 | |
275 ZEQUAL 0= Primitive | |
276 PLUS1 1+ Primitive, added | |
277 2012-06-07 | |
278 ROLL ROLL HL, added | |
279 CONST CONSTANT HL, added | |
280 doCONST Primitive, added | |
281 | |
282 2012-06-08 | |
283 TWOSTAR 2* Primtive, added | |
284 TWOSLASH 2/ Primtive, added | |
285 MINUS1 1- Primtive, added | |
286 SWAPHL >< Primtive, added | |
287 STAR256 256* Primtive, added | |
288 SLASH256 256/ Primtive, added | |
289 CMOVE CMOVE Primtive | |
290 FILL FILL Primtive | |
291 2012-06-09 | |
292 ULESS U< Primitive | |
293 LESS < Primitive | |
294 DO DO HL, added | |
295 QDO ?DO HL, added | |
296 DODO (DO) Primitive, added | |
297 DOQDO (?DO) Primitive, added | |
298 LOOP LOOP HL, added | |
299 PLOOP +LOOP HL, added | |
300 DOLOOP (LOOP) Primitive, added | |
301 DOPLOOP (+LOOP) Primitive, added | |
302 | |
303 2012-06-11 | |
304 NEGAT NEGATE Primitive, alternative added | |
305 UMSTA UM* Primitive, but without MUL | |
306 LSHIFT LSHIFT Primitive, added | |
307 RSHIFT RSHIFT Primitive, added | |
308 2012-06-12 | |
309 LEAVE LEAVE Primitive, added (fig Forth) | |
310 MDO -DO HL, added | |
311 DOMDO (-DO) Primitive, added | |
312 I I Primitive, added (same as R@) | |
313 CMOVEW CMOVE Primitive, other implementation | |
314 STAR * korr.: uses M* (instead UM*) | |
315 BLANK BL Constant | |
316 | |
317 2012-06-19 | |
318 USLASH U/ Primitive, same as UM/MOD | |
319 UM/MOD uses USLASH | |
320 | |
321 2012-06-20 | |
322 DPLUS D+ Primitive | |
323 DSUB D- HL | |
324 ZERO 0 Constant | |
325 ONE 1 Constant | |
326 TWO 2 Constant | |
327 MONE -1 Constant | |
328 DOCLIT doCLIT Primitive | |
329 2012-06-21 | |
330 SEE SEE extended: handles LIT, CLIT | |
331 2012-06-22 | |
332 SEE SEE extended: handles | |
333 BRANCH,?BRANCH,?DO,-DO,LOOP,+LOOP,."..." | |
334 | |
335 2012-09-07 | |
336 SEE SEE ABORT", (DO) added, remarks corrected. | |
337 | |
338 TODO: | |
339 * XXX marks points to open issues. | |
340 * SEE command: | |
341 handling of | |
342 - [COMPILE] | |
343 - DOCONST, DOVAR, DOUSE | |
344 | |
345 | |
346 TEST: | |
347 | |
348 HEX ok | |
349 0 8000 8001 U/ . . FFFE 2 ok | |
350 FFFE 8001 U* . . U* ? ok | |
351 FFFE 8001 UM* . . 7FFF FFFE ok | |
352 FFFE 8001 UM* 2 0 D+ . . 8000 0 ok | |
353 | |
354 0 8000 7FFF U/ . . FFFF FFFF ok | |
355 0 FFFF FFFF U/ . . FFFF FFFF ok | |
356 0 FFFE FFFF U/ . . FFFE FFFE ok | |
357 FFFF FFFF UM* . . FFFE 1 ok | |
358 FFFF FFFE FFFF U/ . . FFFF FFFE ok | |
359 | |
360 | |
361 | |
362 | |
363 | |
364 Links/References | |
365 ================ | |
366 | |
367 | |
368 Project: | |
369 https://github.com/6809/sbc09 | |
370 Maintained by the original author and others. | |
371 | |
372 Source: | |
373 http://groups.google.com/group/alt.sources/browse_thread/thread/8bfd60536ec34387/94a7cce3fdc5df67 | |
374 Autor: Lennart Benschop lennart@blade.stack.urc.tue.nl, | |
375 lennartb@xs4all.nl (Webpage, Subject must start with "Your Homepage"!) | |
376 | |
377 Newsgroups: alt.sources | |
378 From: lennart@blade.stack.urc.tue.nl (Lennart Benschop) | |
379 Date: 3 Nov 1993 15:21:16 GMT | |
380 Local: Mi 3 Nov. 1993 17:21 | |
381 Subject: 6809 assembler and simulator (examples) 2/2 | |
382 | |
383 | |
384 Homepage/Download links of Lennart Benschop: | |
385 http://lennartb.home.xs4all.nl/m6809.html | |
386 http://lennartb.home.xs4all.nl/sbc09.tar.gz | |
387 http://lennartb.home.xs4all.nl/A09.c | |
388 | |
389 | |
390 Emulator for 6809 written in Python, can run sbc09 ROM: | |
391 https://github.com/jedie/DragonPy/ | |
392 | |
393 | |
394 Newer posting in alt.sources (1994): | |
395 | |
396 Newsgroups: alt.sources | |
397 From: lenn...@blade.stack.urc.tue.nl (Lennart Benschop) | |
398 Date: 17 May 1994 08:13:25 GMT | |
399 Local: Di 17 Mai 1994 10:13 | |
400 Subject: 6809 assembler/simulator (3 of 3) | |
401 | |
402 | |
403 Referenced by: | |
404 | |
405 http://foldoc.org/6809 | |
406 Reference points to posting with buggy version from 1993. | |
407 | |
408 http://lennartb.home.xs4all.nl/m6809.html | |
409 BAD LINK: http://www.sandelman.ocunix.on.ca/People/Alan_DeKok/interests/6809.html | |
410 -> http://www.sandelman.ottawa.on.ca/People/Alan_DeKok/interests/ | |
411 6809 specific site will be redirected, but does not exist. | |
412 | |
413 Internet-Archiv: | |
414 https://web.archive.org/web/20070112041235/http://www.striker.ottawa.on.ca/6809/ | |
415 2014-05-01: Lennart B. lennartb@xs4all.nl has been informed. | |
416 | |
417 http://archive.worldofdragon.org/phpBB3/viewtopic.php?f=5&t=4308&start=60#p9750 |