Commodore 128 Programmer's Reference Manual page 457

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
n
THE COMMODORE 128 OPERATING SYSTEM
447
The following examples illustrate the flexibility of this layout. This loads and runs a
BASIC program:
$00
$03
$07
$0C
$0D
$14
$20
CBM
->
$oo,$oo,$oo,$oo
-»•
NAME,$00
->
$00
->
$A2,$13,$A0,$0B
$4C,$A5,$AF
RUN'TROGRAM"
-»•
$00
:key
:no other BOOT sector
message "NAME"
:no filename
:code
:data (BASIC stmt)
j !
This results in the message Booting NAME... being displayed and, utilizing a
C128 BASIC jump table entry that finds and executes a BASIC statement, loads
and runs the BASIC program named ''PROGRAM." The same header can be used
I
to load and execute a binary (machine code) program by simply changing RUN to
1
BOOT. (While the file auto-load feature of the boot header could be used to load
binary files simply by furnishing a filename, to execute it you must know the
H
starting address and JMP to it. BASIC'S BOOT command does that, and allows a
f !
more generic mechanism.) In the next example, a menu is displayed and you are
asked to select the operating mode. Nothing else is loaded in this "configure"-type
p
header:
$00
->
CBM
:key
$03
$00,$00,$00,$00
:no other BOOT sector
$07
->
$00
:no message
$0C
$00
:no filename
$0D
-h>
$20,$7D,$FF,$0D, $53, $45,$4C, $45
$43, $54, $20,$4D, $4F, $44, $45,$3A
$0D,$0D, $20, $31,$2E, $20, $43, $36
$34, $20, $20, $42, $41, $53, $49, $43
$0D, $20, $32,$2E, $20, $43, $31, $32
$38, $20, $42, $41, $53, $49, $43,$0D
$20, $33,$2E, $20, $43, $31, $32, $38
$20,$4D, $4F, $4E, $49, $54, $4F, $52
$0D,$0D, $00, $20,$E4,$FF,$C9, $31
$D0, $03,$4C,$4D,$FF,$C9, $32,$D0
$03,$4C, $03, $40,$C9, $33,$D0, $E3
$4C, $00,$B0
The loading of sequential sectors is designed primarily for specialized applications
(such as CP/M or games) that do not need a disk directory entry.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents