added functions to access SPI register and some fast assembler functions for fixed bit arithmetic