Fix one small bug in the process
! own saves so the cost is paid in the right place
!
pop h
- mov l,a
+ mov a,l
sta .areg ! FIXME: add a pad byte to .areg instead
pop h
shld .tmp1
push d
push h
call platform_interrupt_all
- jmp interrupt_pop !! FIXME
! Switch stacks
lxi h,0
dad sp
shld istack_switched_sp
lxi sp,istack_top
+
!
! Map the kernel
!
push h
call _platform_interrupt
pop h
- mov l,a
+ mov a,l
sta .areg ! FIXME: add a pad byte to .areg instead
pop h
shld .tmp1
preemption:
xra a
sta _need_resched
- call map_restore
!
! Save our original stack in syscall_s
! Move to our kernel stack (free because we don't preempt
shld U_DATA__U_SYSCALL_SP
lxi sp,kstack_top
!
- ! Fix up the mappings
- !
- call map_kernel_di
- !
! Mark ourselves as in a system call
!
mvi a,1