From: Stephan Mühlstrasser Date: Sun, 8 Feb 2015 14:06:55 +0000 (+0100) Subject: Completing OSI documentation. X-Git-Tag: V2.15~22^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=da8ec4f7b1c295bc112f75b246d4432fff0d1b6e;p=cc65 Completing OSI documentation. --- diff --git a/doc/intro.sgml b/doc/intro.sgml index 02c5c83d5..5ffef7e69 100644 --- a/doc/intro.sgml +++ b/doc/intro.sgml @@ -513,6 +513,75 @@ directory notePad. Look at the eight file-positions on each page until you see The output is shown in a GEOS dialog box; click Ohio Scientific Challenger 1P

+Available at : + +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 +. + +In addition the srec_cat program from the + +tool collection must be installed. Some Linux distributions also provide the +srecord package that can be installed directly from the distribution's +repository. + +The osic1p runtime library directly returns to the boot prompt when the +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 +would print the text string and then jump to the boot prompt, making it +impossible to see the results of running the tutorial program. + +In addition to that the cc65 target does not yet have support for stdio +functions. Only the functions from the conio library are available. + +Therefore modify the main() function in hello.c as follows: + + +#include +#include + +extern const char text[]; /* In text.s */ + +int main (void) +{ + clrscr(); + cprintf ("%s\r\nPress \r\n", text); + cgetc(); + return EXIT_SUCCESS; +} + + +Compile the tutorial with + + +cl65 -O -t osic1p hello.c text.s + + +Convert the executable file into a text file that can be loaded via +the Ohio Scientific 65V PROM monitor at start address 0x200: + + +srec_cat hello -binary -offset 0x200 -o hello.c1p -Ohio_Scientific -execution-start-address=0x200 + + +Open the URL +in your browser and wait until the emulator is loaded. Click on the BREAK +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 +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 +screen: + + +Hello world! +Press + + +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 +computer. Contributions wanted

diff --git a/doc/osi.sgml b/doc/osi.sgml index 85d4dca44..7152f2815 100644 --- a/doc/osi.sgml +++ b/doc/osi.sgml @@ -79,7 +79,7 @@ Special locations:

@@ -91,12 +91,38 @@ Example for building a program with start address $0300, stack size cl65 --start-addr 0x300 -Wl -D,__HIMEM__=$2000,-D,__STACKSIZE__=$0300 -t osic1p hello.c +Linker configurations

+ +The ld65 linker comes with a default config file "osic1p.cfg" for the Ohio Scientific +Challenger 1P, which is implicitly used via default config file ( + +The default configuration is tailored to C programs. + + + +This configuration is made for assembler programmers who don't need a special +setup. + +To use this config file, assemble with +cl65 -o program -t osic1p -C osic1p-asm.cfg source.s + + Platform-specific header files

Programs containing Ohio Scientific-specific code may use the Ohio Scientific-specific functions

There are currently no special Ohio Scientific functions.