' *** WRITPROT.LST *** 2nd GFA-Manual, page 11-25 FUNCTION write_protected(drive$) ' ' *** Returns TRUE if disk in drive$ ("A","B",etc.) is write-protected ' *** Also returns TRUE if there is no disk in the drive ' *** Works on my ST, but not on an STE (?) ' *** Is there a better way (other then using ON ERROR) ? ' LOCAL drive drive=SUB(ASC(UPPER$(drive$)),65) ! A=0, B=1, etc. IF DPEEK(LPEEK(&H4F2))=&H601E ! normal ST RETURN PEEK(&H9B2+drive)=255 ELSE ! Mega ST RETURN PEEK(&H9F8+drive)=255 ENDIF ENDFUNC ' ***** '