Moved scheduler-related assembly code to its own file.
Reduced amount of debugging output.
Reverted to inline code for locks.
Re-engineering of scheduler. Now works in non-premptive cases.
Cleaned up test/debugging code somewhat.