Hi, Attached patch prevents duplication of quite similar code in fdc.c, and so, removes 300 lines and 8KB of code. It first extracts implementation of FDC commands to separate methods, and then uses a table to know which method to execute instead of a big switch. This version is quite similar to v1 (I removed the lookup table added in v2), except that I tried to minimize the time spent to search in the command table by putting most used commands at the beginning. I don't have any statistics to proove the order, that's only observation and guess... Hervé