
ROM
The C-16's ROM consists of three main parts: BASIC, TEDMON and KERNAL. BASIC is a
Basic interpreter, which can run Basic programs stored in RAM. TEDMON is a
machine language monitor for manipulating memory and writing short machine
language programs. KERNAL is not a single runnable program, but a collection of
system routines arranged as a Jump Table. The Plus/4 also includes a built in
software package called "3-plus-1" that includes word processing, spread sheet,
business graphics and a database.
HOW TO ACCESS ROM PROGRAMS?
BASIC is the primary user interface and it starts automatically when
power is turned on. The secondary user interface is TEDMON, which can be
entered by holding down the Reset button when turning the computer on.
You can also activate TEDMON from BASIC and vice versa. See Basic's MONITOR
command and TEDMON's X command.
The KERNAL is used by the Basic interpreter and other programs. Using KERNAL
routines requires a little machine language knowledge since it is required to use
processor registers for exchanging information between a KERNAL routine and the
routine caller. It is however possible to call KERNAL routines directly from Basic
with the use of the SYS command and the following memory positions: 2034=A,
2035=X, 2036=Y. For example, POKE 2034,23 and the accumulator will contain the
value 23 when the SYS command is started.
To call a KERNAL routine do as follows:
1. Set parameters.
2. Call KERNAL routine using JSR command (or SYS from Basic).
3. Handle any return error.
Note, that some routines need to be initialized with other routines before they
can be used. For example, using the SAVE routine requires initialization with
the SETLFS and SETNAM routines.
See the "KERNAL Jump Table" below for more information on available KERNAL
routines.
Basic example:
10 SYS DEC("FFE4") : REM "GETIN"
20 A=PEEK(2034) : IF A=0 THEN 10
30 A$ = CHR$(A)
Equals to:
10 GETKEY A$
KERNAL JUMP TABLE
Seems to be exactly the same as for the C64. Please consult the C64 programmer's
reference manual for parameters. Available on http://www.funet.fi/pub/cbm/c64/manuals/
Routine Address Function
CINT $FF81 Initializes screen editor.
IOINIT $FF84 Initializes I/O devices.
RAMTAS $FF87 Tests RAM.
RESTOR $FF8A Restores vectors to initial state.
VECTOR $FF8D Changes vectors for user.
SETMSG $FF90 Controls O.S. messages.
SECOND $FF93 Sends SA after LISTEN.
TKSA $FF96 Sends SA after TALK.
MEMTOP $FF99 Sets/reads top of memory.
MEMBOT $FF9C Sets/reads bottom of memory.
SCNKEY $FF9F Scans keyboard.
SETTMO $FFA2 Sets timeout in DMA disk.
ACPTR $FFA5 Handshakes serial bus or DMA disk byte in.
CIoUT $FFA8 Handshakes serial bus or DMA disk byte out.
UNTLK $FFAB Sends UNTALK out serial bus or DMA disk.
UNLSN $FFAE Sends UNLISTEN out serial bus or DMA disk.
7
Comentarios a estos manuales