sconst.h

来自「一个简单的操作系统minix的核心代码」· C头文件 代码 · 共 40 行

H
40
字号
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
				src/kernel/sconst.h	 	 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

05400	! Miscellaneous constants used in assembler code.
05401	W               =       _WORD_SIZE      ! Machine word size.
05402	
05403	! Offsets in struct proc. They MUST match proc.h.
05404	P_STACKBASE     =       0
05405	#if _WORD_SIZE == 2
05406	ESREG           =       P_STACKBASE
05407	#else
05408	GSREG           =       P_STACKBASE
05409	FSREG           =       GSREG + 2       ! 386 introduces FS and GS segments
05410	ESREG           =       FSREG + 2
05411	#endif
05412	DSREG           =       ESREG + 2
05413	DIREG           =       DSREG + 2
05414	SIREG           =       DIREG + W
05415	BPREG           =       SIREG + W
05416	STREG           =       BPREG + W       ! hole for another SP
05417	BXREG           =       STREG + W
05418	DXREG           =       BXREG + W
05419	CXREG           =       DXREG + W
05420	AXREG           =       CXREG + W
05421	RETADR          =       AXREG + W       ! return address for save() call
05422	PCREG           =       RETADR + W
05423	CSREG           =       PCREG + W
05424	PSWREG          =       CSREG + W
05425	SPREG           =       PSWREG + W
05426	SSREG           =       SPREG + W
05427	P_STACKTOP      =       SSREG + W
05428	P_LDT_SEL       =       P_STACKTOP
05429	P_LDT           =       P_LDT_SEL + W
05430	
05431	#if _WORD_SIZE == 2
05432	Msize           =       12              ! size of a message in 16-bit words
05433	#else
05434	Msize           =       9               ! size of a message in 32-bit words
05435	#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?