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