Task switching consists of saving the current process status in the User
stack and data area, block moving the user data area and stacks to the
respective process area in the reserved top 4k (via DMA), restoring the
new task's data into common memory (also via DMA), changing the Bank Base
Register in the Z180 MMU to bring the new task in context, resetting the
new process' stack pointer, restoring processor status and continuing as
before. This results in relatively rapid response since the bulk of time
required is due to two 768-byte DMA transfers which consume 1536 * 6 T-
states or 9216 / 18,432,000 = .0005 Sec = 500 microseconds on a 18.432 MHz
P112 or YASBEC upgraded with the Z8S180, and double this time, or 1000
microseconds (1 millisecond) on a standard 9.216 MHz YASBEC. This ignores
any additional time due to insertion of memory wait states and the
relatively insignificant overhead associated with housekeeping.