home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d172
/
popinfo.lha
/
PopInfo
/
ReadBlock.asm
< prev
next >
Wrap
Assembly Source File
|
1988-11-22
|
1KB
|
48 lines
; This routine reads the bootblock of the disk and
; copies it into diskbuffer.
; This was "borrowed" from VirusX2.0 (The Complete Virus Removal
; System) © Copyright 1988 Steve Tibbett.. well I was all set to write
; my own and VirusX2.0 came my way, so I thought.. ah what the hell!
; Also "borrowed" was the routine that displays the bootblock on the screen
; but all this IS public domain, so.....
xref _geta4
xref _diskreq
xref _diskbuffer
xref _LVODoIO
xdef _ReadBlock
_ReadBlock:
movem.l d1/a0/a1/a4/a5/a6,-(sp)
jsr _geta4
move.l _diskreq,a0
move.w #2,$1c(a0)
lea _diskbuffer,a1
move.l a1,d0
move.l d0,$28(a0)
move.l #(3*512),$24(a0)
move.l #0,$2c(a0)
move.l 4,a6
move.l _diskreq,a1
jsr _LVODoIO(a6)
move.l _diskreq,a0
cmp.b #0,$1f(a0)
beq IsOkay
ReturnError:
move.l #0,d0
movem.l (sp)+,d1/a0/a1/a4/a5/a6
rts
IsOkay:
move.l _diskreq,a0
cmp.b #0,$1f(a0)
bne ReturnError
move.l #1,d0
movem.l (sp)+,d1/a0/a1/a4/a5/a6
rts