EDIT8 HAS BEEN TESTED AND IS OKAY THE PRESENT VERSION IS SLOW,THIS CAN BE IMPROVED BY: 1 TAKING DIRECTORY PERMANENT IN CORE 2 READ ONLY NEW DATA WHEN THERE IS NO MORE IN CORE ASSEMBLY NO SWITCHES HAVE TO BE SPECIFIED