sync the restoring registers to include r0
updated to subs instead of movs
updated type of systime to size_t (unsigned long)
added cases for sleep and time