From: Alan Cox Date: Sun, 2 Sep 2018 21:02:18 +0000 (+0100) Subject: hc11: commit wip bits X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e248faa9106c3b5d314a130d500af9d2553a2690;p=FUZIX.git hc11: commit wip bits --- diff --git a/Kernel/kernel-hc11.def b/Kernel/kernel-hc11.def new file mode 100644 index 00000000..71964674 --- /dev/null +++ b/Kernel/kernel-hc11.def @@ -0,0 +1,33 @@ +; Keep these in sync with struct u_data!! +.equ U_DATA__U_PTAB , (U_DATA+0) ; struct p_tab* +.equ U_DATA__U_PAGE , (U_DATA+2) ; uint16_t +.equ U_DATA__U_PAGE2 , (U_DATA+4) ; uint16_t +.equ U_DATA__U_INSYS , (U_DATA+6) ; bool +.equ U_DATA__U_CALLNO , (U_DATA+7) ; uint8_t +.equ U_DATA__U_SYSCALL_SP , (U_DATA+8) ; void * +.equ U_DATA__U_RETVAL , (U_DATA+10) ; int16_t +.equ U_DATA__U_ERROR , (U_DATA+12) ; int16_t +.equ U_DATA__U_SP , (U_DATA+14) ; void * +.equ U_DATA__U_ININTERRUPT , (U_DATA+16) ; bool +.equ U_DATA__U_CURSIG , (U_DATA+17) ; int8_t +.equ U_DATA__U_ARGN , (U_DATA+18) ; uint16_t +.equ U_DATA__U_ARGN1 , (U_DATA+20) ; uint16_t +.equ U_DATA__U_ARGN2 , (U_DATA+22) ; uint16_t +.equ U_DATA__U_ARGN3 , (U_DATA+24) ; uint16_t +.equ U_DATA__U_ISP , (U_DATA+26) ; void * (initial stack pointer when _exec()ing) +.equ U_DATA__U_TOP , (U_DATA+28) ; uint16_t +.equ U_DATA__U_BREAK , (U_DATA+30) ; uint16_t +.equ U_DATA__U_SIGVEC , (U_DATA+32) ; table of function pointers (void *) + +; Keep these in sync with struct p_tab!! +.equ P_TAB__P_STATUS_OFFSET , 0 +.equ P_TAB__P_TTY_OFFSET , 1 +.equ P_TAB__P_PID_OFFSET , 2 +.equ P_TAB__P_PAGE_OFFSET , 14 + +.equ P_RUNNING , 1 ; value from include/kernel.h +.equ P_READY , 2 ; value from include/kernel.h + +.equ OS_BANK , 0 ; value from include/kernel.h + +.equ EAGAIN , 11 ; value from include/kernel.h