Minor corrections.

This commit is contained in:
Stephan Mühlstrasser
2015-02-08 15:46:33 +01:00
parent da8ec4f7b1
commit a1cc85768e
2 changed files with 17 additions and 17 deletions

View File

@@ -520,24 +520,23 @@ Emulates the Ohio Scientific Challenger 1P computer in different configurations.
The 32 kb RAM machine that must be used with the default compiler settings is The 32 kb RAM machine that must be used with the default compiler settings is
<url url="http://www.pcjs.org/devices/c1p/machine/32kb/" name="here">. <url url="http://www.pcjs.org/devices/c1p/machine/32kb/" name="here">.
In addition the srec_cat program from the In addition to cc65 the srec_cat program from the
<url url="http://srecord.sourceforge.net/" name="SRecord"> <url url="http://srecord.sourceforge.net/" name="SRecord">
tool collection must be installed. Some Linux distributions also provide the tool collection must be installed. Some Linux distributions also provide the
srecord package that can be installed directly from the distribution's srecord package directly as an installable package.
repository.
The osic1p runtime library directly returns to the boot prompt when the The osic1p runtime library returns to the boot prompt when the
main() program exits. Therefore the C file in the tutorial must be slightly main() program exits. Therefore the C file in the tutorial must be slightly
modified in order to see the results on the screen. Otherwise the program modified in order to see the results on the screen. Otherwise the program
would print the text string and then jump to the boot prompt, making it would print the text string and then jump to the boot prompt, making it
impossible to see the results of running the tutorial program. impossible to see the results of running the tutorial program.
In addition to that the cc65 target does not yet have support for stdio In addition to that the osic1p target does not yet have support for stdio
functions. Only the functions from the conio library are available. functions. Only the functions from the conio library are available.
Therefore modify the main() function in hello.c as follows: Therefore modify the hello.c source file as follows:
<tscreen> <tscreen><code>
#include <conio.h> #include <conio.h>
#include <stdlib.h> #include <stdlib.h>
@@ -545,12 +544,12 @@ extern const char text[]; /* In text.s */
int main (void) int main (void)
{ {
clrscr(); clrscr ();
cprintf ("%s\r\nPress <RETURN>\r\n", text); cprintf ("%s\r\nPress <RETURN>\r\n", text);
cgetc(); cgetc ();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
</tscreen> </code></tscreen>
Compile the tutorial with Compile the tutorial with
@@ -566,10 +565,10 @@ srec_cat hello -binary -offset 0x200 -o hello.c1p -Ohio_Scientific -execution-st
</verb></tscreen> </verb></tscreen>
Open the URL <url url="http://www.pcjs.org/devices/c1p/machine/32kb/" name="http://www.pcjs.org/devices/c1p/machine/32kb/"> Open the URL <url url="http://www.pcjs.org/devices/c1p/machine/32kb/" name="http://www.pcjs.org/devices/c1p/machine/32kb/">
in your browser and wait until the emulator is loaded. Click on the BREAK and wait until the emulator has been loaded. Click on the "BREAK"
button to display the boot prompt, then press the M key to enter the button to display the boot prompt, then press the "M" key to enter the
65V PROM monitor. Press the "Choose File" button and select the hello.c1p 65V PROM monitor. Click the "Choose File" button and select the file "hello.c1p"
that was created as the output of the above invocation of the srec_cat that was created as the output of the above invocation of the "srec_cat"
command. Press the "Load" button. You should see the following text on the command. Press the "Load" button. You should see the following text on the
screen: screen:
@@ -581,7 +580,8 @@ Press <RETURN>
After hitting the RETURN key you should see the boot prompt again. After hitting the RETURN key you should see the boot prompt again.
The program can also be uploaded over the serial port to a real Challenger 1P The program can also be uploaded over the serial port to a real Challenger 1P
computer. computer with 32 kB RAM. See the <url url="osi.html" name="Ohio Scientifc-specific documentation"> for instructions how to
compile for other RAM sizes.
<sect1>Contributions wanted<p> <sect1>Contributions wanted<p>

View File

@@ -85,10 +85,10 @@ Special locations:
</descrip><p> </descrip><p>
Example for building a program with start address &dollar;0300, stack size Example for building a program with start address &dollar;0300, stack size
&dollar;0200 and RAM size &dollar;0200: &dollar;0200 and RAM size &dollar;2000:
<tscreen> <tscreen>
cl65 --start-addr 0x300 -Wl -D,__HIMEM__=$2000,-D,__STACKSIZE__=$0300 -t osic1p hello.c cl65 --start-addr 0x300 -Wl -D,__HIMEM__=$2000,-D,__STACKSIZE__=$0200 -t osic1p hello.c
</tscreen> </tscreen>
<sect>Linker configurations<p> <sect>Linker configurations<p>