Completed assembly code (completely slow!)