Path: utzoo!attcan!uunet!van-bc!jhenders From: jhenders@van-bc.wimsey.bc.ca (John Henders) Newsgroups: comp.sys.atari.st Subject: Re: Forcing a media change Summary: FMC, steal sys vec Keywords: MEDIA CHANGE, MOUNT Message-ID: <812@van-bc.wimsey.bc.ca> Date: 9 Jul 90 02:08:32 GMT References: <204@shiloh.UUCP> Organization: USENET Public Access, Vancouver, B.C., Canada Lines: 27 Re: Forcing media change. There is a pd autoboot program around called FMC,I believe,which will force a media change on your floppy drives. If you need to do this in your own program, I did it once by stealing the vector at $47e,then using this little routine to replace it. my_mc: move.w 4(a7),d0 * drive? move.l sys_vec,a0 cmp.w #$c,d0 * you talking to me? bne .sk1 * no get lost cmp.w #0,dc_flg1 * copied a disk lately? beq .sk2 * no then use rd vec move.l #ret_err,a0 * otherwise tell tos to look again .sk1 jmp (a0) .sk2 move.l sav_vec,a0 jmp (a0) ret_err: moveq.w #2,d0 * disk has definately been changed move.w #0,dc_flg1 * only need to check once rts Note that this was written to support loading a ramdisk (M) with a floppy as a sort of an un-Turtle program. The system would not look at a ramdisk for a media change as I loaded the ramdisk by using the ramdisk memory as a track buffer.