Purpose: Boot load program from disk
Call address: $FF53 (hex) 65363 (decimal)
Preparation:
Registers: .A = drive number (ASCII) .X = device number (0-31) Memory: system map Flags: none Calls: noneResults:
Registers: .A used .X used .Y used Memory: changed as per command Flags: .C -> 1 if I/O error
Description: BOOT CALL attempts to load and execute the boot sector from an auto-boot disk in the given drive and device. The BOOT protocol is as follows:
$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 + 1The following examples illustrate the flexibility of this layout. This loads and runs a BASIC program:
$00 | -> | CBM | :key |
$03 | -> | $00,$00,$00,$00 | :no other BOOT sector |
$07 | -> | NAME,$00 | :message "NAME" |
$0C | -> | $00 | :no filename |
$0D | -> | $A2,$13,$A0,$0B $4C,$A5,$AF | :code |
$14 | -> | RUN"PROGRAM" | :data (BASIC stmt) |
$20 | -> | $00 |
$00 | -> | CBM | :key |
$03 | -> | $00,$00,$00,$00 | :no other BOOT sector |
$07 | -> | $00 | :no message |
$0C | -> | $00 | :no filename |
$0D | -> | $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,$DO, $E3 $4C, $00,$B0 |
EXAMPLE:
LDA #$30 ;drive 0 LDX #$08 ;device 8 JSR $FF53 ;BOOT BCS IO_ERROR BCC NO_BOOT_SECTOR