Here is the first bit. Tested on a mn10300-elf cross the same as rth did; the code looks better except that it uses memmove instead of memcpy to move the big struct. Ok for mainline? Paolo