Commodore 128 Programmer's Reference Manual page 456

Hide thumbs Also See for 128:
Table of Contents

Advertisement

446
COMMODORE 128
U
5. $FF53 BOOT CALL ;boot load program from disk
PREPARATION:
Registers:
Memory:
Flags:
Calls:
RESULTS:
Registers:
Memory:
Flags:
EXAMPLE:
LDA #$30
LDX #$08
JSR $FF53
BCS 10 ERROR
BCC NO BOOT
.A = drive number (ASCII)
.X = device number (0-31)
system map
none
none
.A used
.X used
.Y used
changed as per command
.C -> 1 if I/O error
;drive 0
;device 8
;BOOT
SECTOR
LJ
\ (
u
S
i
j i
BOOT attempts to load and execute the boot sector from an auto-boot disk in
«. j
the given drive and device. The BOOT protocol is as follows:
^
j
a. Close all open files on boot device.
j [
b. Read track 1 sector 0 into TBUFFR ($B00).
U
c. Check for auto-boot header, RTS if not.
d. If (blk# > 0), BLOCK READ sequential sectors into RAM at given (adrl,
j i
adrh, bank) location.
[J
e. If LEN(filename) > 0, LOAD file into RAM-0 (normal load).
f. JSR to user code at location C above.
On any error, the BOOT operation is aborted and the UI command is issued
to the disk. A return may or may not be made to the caller depending upon the
completion status and the BOOTed code. The BOOT sector has the following
layout:
$00
$01
$02
$03
$04
$05
$06
A
B
C
C
B
M
adrl
adrh
bank
blk#
title
0
file
0
code
where:
A=
$07 + LEN(title)
B=
A
+ LEN(filename)
!
C=
B + 1
L
Uo

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents