Commodore 128 Programmer's Reference Manual page 412

Hide thumbs Also See for 128:
Table of Contents

Advertisement

402
COMMODORE 128
0
0
The Commodore 128 operating system controls, directly or indirectly, all functions of
your computer. The Commodore 128 operating system is housed in a ROM chip called
the Kernal, which contains about 16K of machine language instructions. These instruc-
t
tions make up the routines that control all the machine's functions—even the ones you
J
take for granted. For instance, the Kernal controls all input and output functions,
including receiving the characters from the keyboard when you type, sending text to a
.--;
printer, and displaying graphics and text on the screen. Every task performed by the
j
computer other than application program activities is controlled by the Kernal. The
Kernal even manipulates and executes the application programs you load or type into
your computer's memory.
]
TAKING FULL ADVANTAGE OF THE
0
COMMODORE 128 OPERATING SYSTEM
lj
The 16K of operating system instructions contained in the Kernal are available for use
UJ
with your own programs. Instead of "reinventing the wheel" and duplicating code, you
can call (that is, use) these Kernal routines in your own programs. You do this through
j j
the Kernal Jump Table, which consists of a series of ROM entry points in which you
LJ
can call machine language routines already available in the Commodore 128 Kernal. By
calling these routines, which handle the most fundamental functions of the computer,
r j
you avoid duplicating code. This helps you utilize your computer to its fullest potential.
j
The Kernal Jump Table also facilitates compatibility. If the Commodore 128
operating system is modified or upgraded, which happens frequently in the microcom
puter industry, the entry points in the jump table are revised to reflect address changes
j [
of Kernal subroutines. The key to keeping applications programs compatible from one
LJ
version of the operating system to another is to enter the operating system through the
Kernal Jump Table. Instead of jumping directly to a subroutine (JSR), use the Kernal
/
Jump Table as the entry point, since it contains the correct address vector to the
^J
specified routine, regardless of the version of the Kernal being used. If you always enter
the operating system routines from the Kernal Jump Table, the address of the desired
routine will always be reached. On the other hand, if you bypass the Kernal Jump Table
M
and jump directly to the address where you think the routine resides, you may cause an
error, because the starting point of the desired routine may have changed from one
version of the operating system to another.
1 [

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents