code for mem disk driver