diff --git a/doc/Makefile b/doc/Makefile
index 883828922..9c4afc029 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -13,6 +13,7 @@ SGML = apple2.sgml \
c64.sgml \
ca65.sgml \
ca65html.sgml \
+ cbm610.sgml \
cc65.sgml \
cl65.sgml \
co65.sgml \
diff --git a/doc/cbm610.sgml b/doc/cbm610.sgml
new file mode 100644
index 000000000..d7ad73237
--- /dev/null
+++ b/doc/cbm610.sgml
@@ -0,0 +1,282 @@
+
+
+
+
+Commodore 610 specific information for cc65
+Ullrich von Bassewitz,
+2003-12-16
+
+
+An overview over the Commodore 610 runtime system as it is implemented for the
+cc65 C compiler.
+
+
+
+
+
+
+
+Overview
+
+This file contains an overview of the CBM 610 runtime system as it comes with
+the cc65 C compiler. It describes the memory layout, CBM 610 specific header
+files, available drivers, and any pitfalls specific to that platform.
+
+Please note that CBM 610 specific functions are just mentioned here, they are
+described in detail in the separate . Even functions marked as "platform dependent" may be available on
+more than one platform. Please see the function reference for more
+information.
+
+In addition to the Commodore 610 (named B40 in the U.S.), several other
+machines are supported by this cc65 target, since they have identical
+hardware: The Commodore 620 and 630 (more memory, additional coprocessor
+card), and the Commodore 710, 720 and 730 (same hardware in another case with
+a builtin monitor).
+
+
+
+Binary format
+
+The standard binary output format generated by the linker for the CBM610
+target is a machine language program with a short BASIC stub. This means that
+a program can be loaded as BASIC program and started with RUN. It is of course
+possible to change this behaviour by using a modified startup file and linker
+config.
+
+
+Memory layout
+
+cc65 generated programs for the Commodore 610 run in bank 1, the memory bank
+reserved for BASIC programs. Since there are no ROMs in this memory bank, the
+program has almost full 64K for its own. A disadvantage is that kernal
+subroutines cannot be called (at least not in a fast and effective manner), so
+the runtime has replace kernal functionality.
+
+The default memory configuration for the CBM 610 allocates all memory between
+$0002 and $FFF0 in bank 1 for the compiled program. Some space
+in low memory is lost, because a separate hardware stack is set up in page 1,
+and the kernal replacement functions need some more memory locations. A few
+more bytes are lost in high memory, because the runtime sets up a CBM
+compatible jump table at $FF81. The main startup code is located at
+$0400, so about 63K of the complete bank are actually usable for
+applications.
+
+Note: The zero page from $02 to $5F is free to use for
+applications!
+
+Special locations:
+
+
+
+
+
+
+Platform specific header files
+
+Programs containing CBM 610 specific code may use the
+of the runtime library for the platform, several standard C and CBM functions
+are not available.
+
+
+CBM 610 specific functions
+
+The functions listed below are special for the CBM 610. See the for declaration and usage.
+
+
+peekbsys
+peewsys
+pokebsys
+pokewsys
+
+
+
+CBM specific functions
+
+Some functions are available for all (or at least most) of the Commodore
+machines. See the for
+declaration and usage.
+
+
+Hardware access
+
+The following pseudo variables declared in the Note: All I/O chips are located in the system bank (bank 15) and can
+therefore not be accessed like on other platforms. Please use one of the
+not work!
+
+
+
+
+ The The
+ Access to the ACIA (the RS232 chip) is available via the
+ Access to the CIA chip is available via the
+ The two 6525 triport chips may be accessed by using this variable. See the
+
+
+
+
+Loadable drivers
+
+Note: Since the CBM 610 doesn't have working disk I/O (see ), the available
+drivers cannot be loaded at runtime (so the term "loadable drivers" is
+somewhat misleading). Instead, the drivers have to be converted using the
+ and statically linked. While
+this may seem overhead, it has two advantages:
+
+
+The interface is identical to the one used for other platforms
+ and to the one for the CBM 610 once it has disk I/O.
+Once disk I/O is available, existing code can be changed to load drivers
+ at runtime with almost no effort.
+
+
+
+Graphics drivers
+
+No graphics drivers are currently available for the Commodore 610 (and since
+the machine has no graphics capabilities, chances for a graphics driver aren't
+really good:-).
+
+
+Extended memory drivers
+
+
+
+ A driver for the RAM in bank 2. Supports up to 255 pages with 256 bytes
+ each. Untested!
+
+
+
+Joystick drivers
+
+The Commodore 610 is a business machine and doesn't have joystick ports. There
+are no drivers for the non existing ports available.
+
+
+
+Mouse drivers
+
+Currently no drivers available (in fact, the API for loadable mouse drivers
+does not exist).
+
+
+RS232 device drivers
+
+Currently no RS232 drivers exist for the Commodore 610.
+
+
+
+Limitations
+
+
+
diff --git a/doc/index.sgml b/doc/index.sgml
index 6a3528028..d056cf56b 100644
--- a/doc/index.sgml
+++ b/doc/index.sgml
@@ -99,6 +99,9 @@ Main documentation page, contains links to other available stuff.
Topics specific to the Commodore 64.
+
+ Topics specific to the Commodore 610.
+
Topics specific to the Commodore Plus/4.