home *** CD-ROM | disk | FTP | other *** search
- ;bput"readboot.src"
- ;rput"readboot.src"
- ;
- .lib hardjump.eq
- .lib hardiskz.eq
- ;
- * = $0840
- start jsr hdinit ;init ctl blocks
- jsr reset ;issue the reset
- bcs reseterror
- lda #$80
- ldy #$28 ;get number of sectors to read
- ldx #$40 ;get sector number
- jsr readit ;go convert and read
- bcs readerror ;go if bad
- lda #$e0 ;address input area
- ldy #$10
- ldx #$69
- jsr readit
- bcs readerror
- jsr 52224
- jmp $c000 ;end
- ;
- readit sta bufadr+1 ;address input
- sty blkcnt ;# 512 byte blocks
- stx secnum+2
- lda #0
- sta hdnum ;clear the drive number
- sta secnum
- sta secnum+1
- jsr sec2cyldcb ;convert to disk addr
- lda head ;fill the dcb
- sta hdnum
- lda cyllsb ;get low cyl addr
- sta cylnum
- lda cylmsb ;get hi cyl and sector
- sta secadr ;put in dcb
- jmp read ;read and return to caller
- ;
- reseterror ldx #0
- .byt $2c ;
- readerror ldx #0
- readerrorl lda resetmsg,x
- beq done
- jsr $ffd2
- inx
- bne readerrorl
- done rts
- brk
- ;
- resetmsg .byt 'reset failed',13,0
- readerrmsg .byt 'read failed',13,0
- .end
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-