Improved locking.
Modified scheduler assembly to use local labels.
Check interrupts state before switching stack.
Don't output backspace to backend unless terminal is active.