]> git.sur5r.net Git - cc65/blob - doc/intro.sgml
Merge branch 'da65-synclines' of github:shinra-jp/cc65 into da65-synclines
[cc65] / doc / intro.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4
5 <title>cc65 Compiler Intro
6 <author>
7 <url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">,<newline>
8 <url url="mailto:cbmnut@hushmail.com" name="CbmNut">,<newline>
9 <url url="mailto:greg.king5@verizon.net" name="Greg King">,<newline>
10 <url url="mailto:stephan.muehlstrasser@web.de" name="Stephan M&uuml;hlstrasser">
11 <date>2015-03-07
12
13 <abstract>
14 How to use the cc65 C language system -- an introduction.
15 </abstract>
16
17 <!-- Table of contents -->
18 <toc>
19
20 <!-- Begin the document -->
21
22 <sect>Overview<p>
23
24 This is a short intro of how to use the compiler and the bin-utils. It contains
25 a step-by-step example of how to build a complete application from one C and
26 one assembly modules. This file does <em/not/ contain a complete reference for
27 the tools used in the process. There are separate files describing those tools,
28 in detail (see <url url="index.html">).
29
30 I do assume that you have downloaded and installed the compiler and
31 target-specific files. Windows users should use the friendly .exe installer
32 (named cc65-2.13.0-1.exe for version 2.13.0 of the package - adjust the
33 version number if necessary). It does not only install the target files, but
34 will also set up necessary environment variables for you.
35
36 If you're going for the .ZIP archives, please note that there is one file for
37 the host platform (Windows, DOS or OS/2), one file for each target platform
38 (C64 or whatever) and a separate file containing the docs (which include the
39 file you're currently reading). So for most uses, you will need at least 3
40 files and unpack all three into one directory. In case of the .ZIP archives,
41 you will also need to set the environment variables <tt/CC65_INC/,
42 <tt/LD65_LIB/ and <tt/LD65_CFG/ as described below.
43
44 <em/Note:/ There is a much simpler way to compile this example, by using the
45 <bf/cl65/ compile-and-link utility. However, it makes sense to understand how
46 the separate steps work. How to do the example with the <bf/cl65/ utility is
47 described <ref id="using-cl65" name="later">.
48
49
50 <sect1>Before we start<p>
51
52 You will find a copy of the sample modules, used in the next section, in the
53 "<tt>cc65/samples/tutorial</tt>" directory. If you encounter problems with
54 missing include files and/or libraries, please check the environment variables
55 <tt/CC65_INC/, <tt/LD65_LIB/ and <tt/LD65_CFG/. They should point to the
56 <tt/include/, <tt/lib/ and <tt/cfg/ subdirectories of the directory, where you
57 installed cc65.
58
59
60 <sect1>The sample modules<p>
61
62 To explain the development flow, I will use the following example modules:
63
64 hello.c:
65 <tscreen><code>
66         #include <stdio.h>
67         #include <stdlib.h>
68
69         extern const char text[];       /* In text.s */
70
71         int main (void)
72         {
73             printf ("%s\n", text);
74             return EXIT_SUCCESS;
75         }
76 </code></tscreen>
77
78 text.s:
79 <tscreen><code>
80         .export _text
81         _text:  .asciiz "Hello world!"
82 </code></tscreen>
83
84
85 <sect1>Translation phases<p>
86
87 We assume that the target file should be named "hello", and the target system
88 is the C64.
89
90 <tscreen><verb>
91     +---------+
92     | hello.c |
93     +---------+
94          |
95         cc65
96          \/
97     +---------+       +---------+       +---------+
98     | hello.s |       | text.s  |       | crt0.o  |
99     +---------+       +---------+       +---------+
100          |                 |                 |
101         ca65              ca65              ar65
102          \/                \/                \/
103     +---------+       +---------+       +---------+
104     | hello.o |       | text.o  |       | c64.lib |
105     +---------+       +---------+       +---------+
106          |                    \          /
107          |                     \        /
108          |                      \      /
109          +----------------------->ld65<
110                                    \/
111                                  hello
112 </verb></tscreen>
113
114 <tt/crt0.o/ (the startup code) and <tt/c64.lib/ (the C64 version of the runtime
115 and C library) are provided in binary form in the cc65 package. Actually, the
116 startup code is contained in the library, so you won't need to care about it.
117
118
119
120 <sect>The compiler<p>
121
122 The compiler translates one C source into one assembly source, for each
123 invocation. It does <em/not/ create object files directly, and it is <em/not/
124 able to translate more than one file per run.
125
126 In the example above, we would use the following command line, to translate
127 <tt/hello.c/ into <tt/hello.s/:
128
129 <tscreen><verb>
130         cc65 -O -t c64 hello.c
131 </verb></tscreen>
132
133 The <tt/-O/ switch tells the compiler to do an additional optimizer run, which
134 is usually a good idea, since it makes the code smaller. If you don't care
135 about the size, but want to have slightly faster code, use <tt/-Oi/ to inline
136 some runtime functions.
137
138 The <tt/-t/ switch is followed by the target system name.
139
140 If the compiler does not complain about errors in our "hello world" program, we
141 will have a file named "<tt/hello.s/", in our directory, that contains the
142 assembly source for the <bf/hello/ module.
143
144 For more information about the compiler, see <url url="cc65.html">.
145
146
147
148 <sect>The assembler<p>
149
150 The assembler translates one assembly source into an object file, for each
151 invocation. The assembler is <em/not/ able to translate more than one source
152 file per run.
153
154 Let's translate the "hello.s" and "text.s" files from our example:
155
156 <tscreen><verb>
157         ca65 hello.s
158         ca65 -t c64 text.s
159 </verb></tscreen>
160
161 The <tt/-t/ switch is needed when translating the <tt/text.s/ file, so the
162 text is converted from the input character-set (usually ISO-8859-1) into the
163 target character-set (PETSCII, in this example) by the assembler. The
164 compiler-generated file <tt/hello.s/ does not contain any character constants,
165 so specification of a target is not necessary (it wouldn't do any harm,
166 however).
167
168 If the assembler does not complain, we should now have two object files (named
169 <tt/hello.o/ and <tt/text.o/) in the current directory.
170
171 For more information about the assembler, see <url url="ca65.html">.
172
173
174
175 <sect>The linker<p>
176
177 The linker combines several object and library files into one output file.
178 <bf/ld65/ is very configurable, but fortunately has built-in configurations,
179 so we don't need to mess with configuration files, here.
180
181 The compiler uses small functions to do things that cannot be done inline
182 without a big impact on code size. Those runtime functions, together with the
183 C library, are in an object-file archive named after the system, in this case,
184 "<tt/c64.lib/". We have to specify that file on the command line, so that the
185 linker can resolve those functions.
186
187 Let's link our files to get the final executable:
188
189 <tscreen><verb>
190         ld65 -o hello -t c64 hello.o text.o c64.lib
191 </verb></tscreen>
192
193 The argument after <tt/-o/ specifies the name of the output file, the argument
194 after <tt/-t/ gives the target system. The following arguments are object
195 files or libraries. Since the target library resolves imports in <tt/hello.o/
196 and <tt/text.o/, it must be specified <em/after/ those files.
197
198 After a successful linker run, we have a file named "<tt/hello/", ready for
199 our C64!
200
201 For more information about the linker, see <url url="ld65.html">.
202
203
204
205 <sect>The easy way (using the cl65 utility)<label id="using-cl65"><p>
206
207 The <bf/cl65/ utility is able to do all of the steps described above, in just
208 one command line, and it has defaults for some options that are very
209 well-suited for our example.
210
211 To compile both files into one executable, enter:
212
213 <tscreen><verb>
214         cl65 -O hello.c text.s
215 </verb></tscreen>
216
217 The <bf/cl65/ utility knows how to translate C files into object files (it will
218 call the compiler, and then the assembler). It does know also how to create
219 object files from assembly files (it will call only the assembler, for that).
220 It knows how to build an executable (it will pass all object files to the
221 linker). And finally, it has the C64 as a default target, and will supply the
222 correct startup file and runtime library names to the linker, so you don't
223 have to care about that.
224
225 The one-liner above should give you a C64 executable named "<tt/hello/" in the
226 current directory.
227
228 For more information about the compile &amp; link utility, see <url
229 url="cl65.html">.
230
231
232
233 <sect>Running The Executable<p>
234
235 <em/Note: this section is incomplete!/
236
237 Depending on the target, cc65 chooses several methods of making a program
238 available for execution. Here, we list sample emulators and instructions for
239 running the program. Unless noted, similar instructions would also apply to a
240 real machine. One word of advice: we suggest you clear the screen at the
241 start, and wait for a keypress at the end of your program, as each target
242 varies in its start and exit conditions.
243
244
245 <sect1>Apple
246
247 <sect2>AppleWin<p>
248 Available at <url
249 url="https://github.com/AppleWin/AppleWin">:
250
251 Emulates Apple&nbsp;&rsqb;&lsqb;/enhanced&nbsp;Apple&nbsp;//e computers, with
252 sound, video, joysticks, serial port, and disk images. Includes monitor. Only
253 for Windows. The package comes with a DOS 3.3 disk (called "master.dsk") image;
254 however, you will need <bf/AppleCommander 1.4.0/ or later (available at <url
255 url="https://applecommander.github.io/">).
256
257 Compile the tutorial with
258
259 <tscreen><verb>
260 cl65 -O -t apple2 hello.c text.s
261 </verb></tscreen>
262 for the Apple&nbsp;&rsqb;&lsqb;, or:
263 <tscreen><verb>
264 cl65 -O -t apple2enh hello.c text.s
265 </verb></tscreen>
266 for the enhanced&nbsp;Apple&nbsp;//e.
267
268 Then, put the file onto an Apple disk image, for use with an emulator.  Copy
269 the <tt/master.dsk/ which comes with <bf/AppleWin/, and rename it to
270 <tt/cc65.dsk/, then use <bf/AppleCommander/:
271
272 <tscreen><verb>
273 java -jar ac.jar -as cc65.dsk test < hello
274 </verb></tscreen>
275
276 Note that a convention in the Apple world is that "hello" is the file which is
277 run automatically upon booting a DOS disk, sort of like the "autoexec.bat" of
278 the MSDOS/Windows world.  We've avoided that in the example, however by using
279 "test" as the name of the program as it will appear on the Apple disk.
280
281 Start the emulator, click on the <bf/Disk 1/ icon, and point to <bf/cc65.dsk/;
282 then, click the big Apple logo, to boot the system.  Then, type this on the
283 Apple:
284
285 <tscreen><verb>
286 BRUN TEST
287 </verb></tscreen>
288
289 You will see "Hello, World!" appear on the same line.  Thanks to
290 <url url="mailto:ol.sc@web.de" name="Oliver Schmidt"> for his help
291 in completing this section.
292
293
294 <sect1>Atari
295
296 <sect2>Atari800Win PLus<p>
297 Available at <url
298 url="http://www.atari.org.pl/PLus/index_us.htm">:
299
300 Emulates Atari 400/800/65XE/130XE/800XL/1200XL/5200, with stereo sound, disk
301 images, scanline-exact NTSC/PAL video, joysticks, mouse, cartridges, and RAM
302 expansions. Includes monitor. Unfortunately, only for Windows. You will need
303 the emulator, "atarixl.rom" or "atariosb.rom"/"ataribas.rom", and "dos25.xfd"
304 files (not supplied).
305
306 Compile the tutorial with
307
308 <tscreen><verb>
309 cl65 -O -t atari hello.c text.s
310 </verb></tscreen>
311
312 Start the emulator, choose <bf/File&gt;Autoboot image/ or <bf/File&gt;Load
313 executable/, and point to the "<bf/hello/" executable.  It is customary to
314 rename executables of that type to "<bf/hello.xex/".  The file has a 7-byte
315 header meant to be loaded directly from Atari DOS 2/2.5 or compatibles.
316
317 On a real Atari, you would need a disk drive, and Atari DOS 2.5 or compatible.
318 Turn on the computer, type
319
320 <tscreen><verb>
321 DOS
322 </verb></tscreen>
323
324 at the BASIC prompt, then choose <bf/N. CREATE MEM.SAV/,
325 then choose <bf/L. BINARY LOAD/, and enter <tt/HELLO/.
326
327 The emulation, also, supports that method.  Look at <bf/Atari&gt;Settings/, and
328 check <bf/Enable H: Patch for Hard Disk Devices/, then <bf/Atari&gt;Hard
329 disks/, and set the path of <bf/H1:/ to your executables directory, then use
330 "<bf/H0:HELLO.XEX/" in the above procedure (after pressing <tt/L/), to access
331 your harddrive directly.
332
333 <em/Note:/ There is no delay after the program exits, as you are returned
334 to the DOS menu.  Your C program should wait for a keypress if you want to see
335 any output.
336
337 <sect2>Stella<p>
338 Available at <url
339 url="http://stella.sourceforge.net">:
340
341 Stella is a multi-platform Atari 2600 VCS emulator. The latest version
342 is available on the emulator's website. It is also available through
343 the package manager of most Linux distributions (Fedora, Ubuntu, ..).
344
345 Compile the Atari 2600 sample with
346
347 <tscreen><verb>
348 make SYS=atari2600 samples
349 </verb></tscreen>
350
351 Then execute it with
352
353 <tscreen><verb>
354 stella samples/atari2600hello
355 </verb></tscreen>
356
357 <sect2>Harmony Cartridge<p>
358 Available at <url
359 url="http://harmony.atariage.com/Site/Harmony.html">:
360
361 The Harmony Cartridge allows running any Atari 2600 binary on real
362 hardware. The binary must be copied on an SD card, to be inserted in
363 the Harmony Cartridge. It can then be inserted on an Atari 2600
364 console, and run any binary on the SD card.
365
366
367 <sect1>Atmos
368
369 <sect2>Oricutron<p>
370 Available at <url
371 url="http://code.google.com/p/oriculator/">:
372
373 Emulates Oric-1 and Atmos computers, with sound, disk images,
374 scanline-exact NTSC/PAL video, and movie export. Includes a monitor.
375 Fortunately, for all SDL platforms. You will need just the emulator; all
376 ROMs are supplied.
377
378 Compile the tutorial with
379
380 <tscreen><verb>
381 cl65 -O -t atmos hello.c text.s -o hello.tap
382 </verb></tscreen>
383
384 Start the emulator, choose <bf/F1/ and <bf/Insert tape.../, and point to
385 the "<bf/hello.tap/" executable. After it has finished loading, type
386
387 <tscreen><verb>
388 RUN
389 </verb></tscreen>
390
391 On a real Atmos, you would need a tape drive.
392 Turn on the computer, type
393
394 <tscreen><verb>
395 CLOAD""
396 </verb></tscreen>
397
398 at the BASIC prompt. After it has finished loading, type
399
400 <tscreen><verb>
401 RUN
402 </verb></tscreen>
403
404 The emulation, also, supports that method.
405
406
407 <sect1>Commodore
408
409 <sect2>VICE<p>
410 Available at <url
411 url="http://vice-emu.sourceforge.net/">:
412
413 Emulates Commodore 64/128/VIC-20/PET/CBM II/Plus 4 computers. Supports
414 printers, serial port and adapters, stereo sound, disk drives and images, RAM expansions,
415 cartridges, ethernet connection, cycle-exact NTSC/PAL video, mice, graphics tablet,
416 lightpens, and joysticks. Includes monitor. Runs on MSDOS/PCDOS, Win9x/ME/NT/2000/XP, OS2,
417 BeOS x86, Acorn RISC OS, and most Unixes.
418
419 Compile the tutorial with
420 <tscreen><verb>
421 cl65 -O -t &lt;sys&gt; hello.c text.s
422 </verb></tscreen>
423 Substitute the name of a Commodore computer for that <tt/&lt;sys&gt;/:
424 <itemize>
425 <item><tt/c128/
426 <item><tt/c16/
427 <item><tt/c64/
428 <item><tt/cbm510/
429 <item><tt/cbm610/
430 <item><tt/pet/
431 <item><tt/plus4/
432 <item><tt/vic20/
433 </itemize>
434
435 Start the desired version of the emulator (CBM610 programs run on
436 the CBM II &lsqb;<tt/xcbm2/&rsqb; emulator).
437
438 In the Windows versions of VICE, choose <bf>File&gt;Autoboot disk/tape
439 image...</bf>, choose your executable, and click <bf/OK/.
440
441 In the Unix versions, hold down the mouse's first button. Move the pointer to
442 <bf>Smart-attach disk/tape...</bf>, and release the button. Choose your
443 executable, and click <bf/Autostart/.
444
445 The file has a 14-byte header which corresponds to a PRG-format BASIC program,
446 consisting of a single line, similar to this:
447
448 <tscreen><code>
449 1000 sys2061
450 </code></tscreen>
451
452 On a real Commodore with attached disk drive, you would type:
453
454 <tscreen><verb>
455 LOAD "0:HELLO",8
456 </verb></tscreen>
457
458 for VIC-20/C64, or:
459
460 <tscreen><verb>
461 DLOAD "HELLO"
462 </verb></tscreen>
463
464 on PET/CBM II/C128/C16/Plus 4; then, type
465
466 <tscreen><verb>
467 RUN
468 </verb></tscreen>
469
470 On a Commodore 128, you can combine those two commands:
471 <tscreen><verb>
472 RUN "HELLO"
473 </verb></tscreen>
474
475 The output will appear on a separate line, and you will be returned to a BASIC
476 prompt.
477
478
479 <sect1>GEOS<p>
480 Available at <it/Click Here Software's/ <url
481 url="http://cbmfiles.com/geos/index.html" name="GEOS download section">:
482
483 <it><bf/G/raphics <bf/E/nvironment <bf/O/perating <bf/S/ystem.</it>
484 It provides a WIMP GUI (Windows, Icons, and Mouse-Pointer Graphical User
485 Interface) for Commodore's computer models <bf/64/ and <bf/128/.  It can be
486 controlled by many different types of input devices:
487 <itemize>
488 <item>keyboard
489 <item>joysticks
490 <item>mice
491 <item>trackballs
492 <item>graphics drawing tablets
493 <item>light-pens
494 </itemize>
495
496 The tutorial files are different for GEOS.  You will find them "next door," in
497 "<tt>cc65/samples/geos</tt>"; they are called "<tt/hello1.c/" and
498 "<tt/hello1res.grc/".
499
500 Compile the tutorial with
501 <tscreen><verb>
502 cl65 -t geos-cbm -O -o hello1 hello1res.grc hello1.c
503 </verb></tscreen>
504 Copy the resulting file "<tt/hello1/" onto a (GEOS-format) disk.
505
506 Boot the GEOS master disk/image.
507
508 <quote>
509 When you want to run GEOS in an emulator, you must adjust that emulator so that
510 it does a "true drive" emulation. Each emulator has its own way of turning that
511 feature on.
512 </quote>
513
514 <quote>
515 VICE even has different ways that depend on which operating system is running
516 the emulator.
517 <itemize>
518 <item>In Windows, you must click on <bf/Options/ (in an always visible menu).
519       Then, you must click on <bf/True drive emulation/.
520 <item>In Unix, you must <em/hold down/ the second button on your mouse.  Move
521       the pointer down to <bf/Drive settings/.  Then, move the pointer over to
522       <bf/Enable true drive emulation/.  (If there is a check-mark in front of
523       those words, that feature already is turned on -- then, move the pointer
524       off of that menu.) Release the mouse button.
525 </itemize>
526 </quote>
527
528 Find the <bf/CONVERT/ program on the boot disk &lsqb;tap the 6-key; then, you
529 should see its icon in the fourth position on the <bf/deskTop/'s directory
530 notePad&rsqb;.  Move GEOS's pointer over to <bf/CONVERT/'s icon; double-click
531 it to run that program.  Click on the <bf/Disk/ icon; put the disk with
532 "<tt/hello1/" into the drive; and, click the <bf/OK/ icon.  Use the little
533 icons under the list of file-names to move through that list until you find
534 "<tt/hello1/".  Click on it; and then, click on the <bf/Convrt/ icon.
535 <bf/CONVERT/ will ask you to confirm that you choose the correct file; click
536 <bf/YES/ if you did (or, click <bf/NO/ if you made a mistake).  After the
537 program has converted "<tt/hello1/" from a CBM file into a GEOS file, it will
538 announce what it did -- click on <bf/OK/.  <bf/CONVERT/ will show the file list
539 again.  This time, click on <bf/Quit/.
540
541 (You might need to put the boot disk back into the drive, in order to reload
542 <bf/deskTop/.  Then, you must swap back to the disk with the tutorial program
543 on it, and click on its disk icon &lsqb;on the right side of the screen&rsqb;.)
544
545 Now, you must find <bf/hello1/.  Click on the lower left-hand corner of the
546 directory notePad.  Look at the eight file-positions on each page until you see
547 <bf/hello1/.  Double-click on its icon.
548
549 The output is shown in a GEOS dialog box; click <bf/OK/ when you have finished
550 reading it.
551
552
553 <sect1>Ohio Scientific Challenger 1P<p>
554 The <tt/osic1p/ runtime library returns to the boot prompt when the main()
555 program exits. Therefore, the C file in the tutorial must be modified
556 slightly, in order to see the results on the screen. Otherwise, the program
557 would print the text string, and then jump to the boot prompt, making it
558 impossible to see the results of running the tutorial program.
559
560 In addition to that, the <tt/osic1p/ target does not yet have support for stdio
561 functions. Only the functions from the conio library are available.
562
563 Therefore, modify the "<tt/hello.c/" source file, as follows:
564
565 <tscreen><code>
566 #include <conio.h>
567 #include <stdlib.h>
568
569 extern const char text[];       /* In text.s */
570
571 int main (void)
572 {
573     clrscr ();
574     cprintf ("%s\r\nPress <RETURN>.\r\n", text);
575     cgetc ();
576     return EXIT_SUCCESS;
577 }
578 </code></tscreen>
579
580 Compile the tutorial with
581
582 <tscreen><verb>
583 cl65 -O -t osic1p -u __BOOT__ -o hello.lod hello.c text.s
584 </verb></tscreen>
585
586 The program is configured for a Challenger 1P computer with, at least, 32 kB
587 of RAM. See the <url url="osi.html"
588 name="Ohio Scientifc-specific documentation"> for instructions about how to
589 compile for other RAM sizes.
590
591 Plug a cassette player into your C1P computer; or, connect an RS-232 cable
592 between your C1P and a PC (set the PC's serial port to 300 Bits Per Second,
593 8 data bits, No parity, and 2 stop bits).  (Turn on the computers.)
594
595 Tap the "<bf/BREAK/" key, to display the boot prompt; then, tap the "<tt/M/"
596 key, to enter the 65V PROM monitor. Tap the "<tt/L/" key. Either start the
597 cassette player (with a tape of the program), or start a transfer of the
598 program file "<tt/hello.lod/" from the PC. After a while, you should see the
599 following text on the screen:
600
601 <tscreen><verb>
602 Hello world!
603 Press <RETURN>.
604 </verb></tscreen>
605
606 (Stop the cassette player.) After hitting the RETURN key, you should see the
607 boot prompt again.
608
609 <sect2>WinOSI<p>
610 Available at <url
611 url="http://osi.marks-lab.com/#Emulator">:
612
613 Emulates the Ohio Scientific Challenger computers in different configurations.
614 Configure it to emulate a C1P (model 600 board) with 32 kB of RAM.
615
616 Compile the tutorial with the same command that is used to make the program
617 for a real machine.
618
619 Start the emulator. Tap the "<tt/M/" key, to enter the 65V PROM monitor; then,
620 tap the "<tt/L/" key. If you had configured WinOSI to ask for a file when it
621 starts to read data from the serial port, then you will see a file dialog box;
622 otherwise, you must tap your host keyboard's F10 function key. Select the file
623 "<tt/hello.lod/". After a moment, you should see the following text on the
624 screen:
625
626 <tscreen><verb>
627 Hello world!
628 Press <RETURN>.
629 </verb></tscreen>
630
631 After hitting the RETURN key, you should see the boot prompt again.
632
633 <sect2>C1Pjs<p>
634 Available at <url
635 url="http://www.pcjs.org/docs/c1pjs/">:
636
637 Emulates the Ohio Scientific Challenger 1P computer in different configurations.
638 The 32 kB RAM machine that must be used with the default compiler settings is
639 <url url="http://www.pcjs.org/devices/c1p/machine/32kb/" name="here">.
640
641 In addition to cc65, the <bf/srec_cat/ program from <url
642 url="http://srecord.sourceforge.net/" name="the SRecord tool collection">
643 must be installed. Some Linux distributions also provide srecord directly as
644 an installable package.
645
646 Compile the tutorial with this command line:
647
648 <tscreen><verb>
649 cl65 -O -t osic1p hello.c text.s
650 </verb></tscreen>
651
652 Convert the binary file into a text file that can be loaded via
653 the Ohio Scientific 65V PROM monitor, at start address 0x200:
654
655 <tscreen><verb>
656 srec_cat hello -binary -offset 0x200 -o hello.c1p -Ohio_Scientific -execution-start-address=0x200
657 </verb></tscreen>
658
659 Open the URL that points to the 32 kB machine; and, wait until the emulator
660 has been loaded. Click on the "<bf/BREAK/" button to display the boot prompt;
661 then, press the "<tt/M/" key to enter the 65V PROM monitor. Click the
662 "<bf/Browse.../" button; and, select the file "<tt/hello.c1p/" that was
663 created as the output of the above invocation of the "<tt/srec_cat/" command.
664 Press the "<bf/Load/" button. You should see the following text on the screen:
665
666 <tscreen><verb>
667 Hello world!
668 Press <RETURN>.
669 </verb></tscreen>
670
671 After hitting the RETURN key, you should see the boot prompt again.
672
673
674 <sect1>Contributions wanted<p>
675
676 We need your help! Recommended emulators and instructions for other targets
677 are missing.  We suggest that you choose emulators with good compatibility.
678 Also, being able to run all computers in the target series is good for
679 target compatibility testing. A machine-language monitor is almost essential
680 for debugging, but a native debugger could be used, as well.
681
682 Finally, emulators which run on Unix or Windows would help to reach a wider
683 audience.
684
685 </article>