⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prreg.c

📁 日本著名的的嵌入式实时操作系统T-Kernel的源码及用户手册。
💻 C
字号:
/* *---------------------------------------------------------------------- *    T-Kernel * *    Copyright (C) 2004 by Ken Sakamura. All rights reserved. *    T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * *    Version:   1.01.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2004/6/28. * *---------------------------------------------------------------------- *//* *	@(#)prreg.c (libtk/VR5500) * *	Display task register value  */#include <basic.h>#include <tk/tkernel.h>#include <sys/misc.h>/* * Uses prfn to display the contents of gr, er, and cr. * prfn must be a printf compatibile function. */EXPORT W PrintTaskRegister( int (*prfn)( const char *format, ... ),				T_REGS *gr, T_EIT *er, T_CREGS *cr ){/* *	PC:     12345678-12345678 PSR:12345678 TMF:12345678 *	R0/ZERO:00000000-00000000 R1/AT:  12345678-12345678 *	R2/V0:  12345678-12345678 R3/V1:  12345678-12345678 *	R4/A0:  12345678-12345678 R5/A1:  12345678-12345678 *	R6/A2:  12345678-12345678 R7/A3:  12345678-12345678 *	R8/T0:  12345678-12345678 R9/T1:  12345678-12345678 *	R10/T2: 12345678-12345678 R11/T3: 12345678-12345678 *	R12/T4: 12345678-12345678 R13/T5: 12345678-12345678 *	R14/T6: 12345678-12345678 R15/T7: 12345678-12345678 *	R16/S0: 12345678-12345678 R17/S1: 12345678-12345678 *	R18/S2: 12345678-12345678 R19/S3: 12345678-12345678 *	R20/S4: 12345678-12345678 R21/S5: 12345678-12345678 *	R22/S6: 12345678-12345678 R23/S7: 12345678-12345678 *	R24/T8: 12345678-12345678 R25/T9: 12345678-12345678 *	R28/GP: 12345678-12345678 R30/FP: 12345678-12345678 *	R31/RA: 12345678-12345678 LSID:1234   UATB:12345678 *	HI:     12345678-12345678 LO:     12345678-12345678 *	USP:    12345678-12345678 SSP:    12345678-12345678 */	(*prfn)("PC:     %08x-%08x PSR:%08x TMF:%08x\n",		(UW)er->pc.hi, er->pc.lo, er->psr, er->taskmode);	(*prfn)("R0/ZERO:%08x-%08x R1/AT:  %08x-%08x\n",		0, 0, (UW)gr->at.hi, gr->at.lo);	(*prfn)("R2/V0:  %08x-%08x R3/V1:  %08x-%08x\n",		(UW)gr->v[0].hi, gr->v[0].lo, (UW)gr->v[1].hi, gr->v[1].lo);	(*prfn)("R4/A0:  %08x-%08x R5/A1:  %08x-%08x\n",		(UW)gr->a[0].hi, gr->a[0].lo, (UW)gr->a[1].hi, gr->a[1].lo);	(*prfn)("R6/A2:  %08x-%08x R7/A3:  %08x-%08x\n",		(UW)gr->a[2].hi, gr->a[2].lo, (UW)gr->a[3].hi, gr->a[3].lo);	(*prfn)("R8/T0:  %08x-%08x R9/T1:  %08x-%08x\n",		(UW)gr->t[0].hi, gr->t[0].lo, (UW)gr->t[1].hi, gr->t[1].lo);	(*prfn)("R10/T2: %08x-%08x R11/T3: %08x-%08x\n",		(UW)gr->t[2].hi, gr->t[2].lo, (UW)gr->t[3].hi, gr->t[3].lo);	(*prfn)("R12/T4: %08x-%08x R13/T5: %08x-%08x\n",		(UW)gr->t[4].hi, gr->t[4].lo, (UW)gr->t[5].hi, gr->t[5].lo);	(*prfn)("R14/T6: %08x-%08x R15/T7: %08x-%08x\n",		(UW)gr->t[6].hi, gr->t[6].lo, (UW)gr->t[7].hi, gr->t[7].lo);	(*prfn)("R16/S0: %08x-%08x R17/S1: %08x-%08x\n",		(UW)gr->s[0].hi, gr->s[0].lo, (UW)gr->s[1].hi, gr->s[1].lo);	(*prfn)("R18/S2: %08x-%08x R19/S3: %08x-%08x\n",		(UW)gr->s[2].hi, gr->s[2].lo, (UW)gr->s[3].hi, gr->s[3].lo);	(*prfn)("R20/S4: %08x-%08x R21/S5: %08x-%08x\n",		(UW)gr->s[4].hi, gr->s[4].lo, (UW)gr->s[5].hi, gr->s[5].lo);	(*prfn)("R22/S6: %08x-%08x R23/S7: %08x-%08x\n",		(UW)gr->s[6].hi, gr->s[6].lo, (UW)gr->s[7].hi, gr->s[7].lo);	(*prfn)("R24/T8: %08x-%08x R25/T9: %08x-%08x\n",		(UW)gr->t[8].hi, gr->t[8].lo, (UW)gr->t[9].hi, gr->t[9].lo);	(*prfn)("R28/GP: %08x-%08x R30/FP: %08x-%08x\n",		(UW)gr->gp.hi, gr->gp.lo, (UW)gr->fp.hi, gr->fp.lo);	(*prfn)("R31/RA: %08x-%08x LSID:%-4d   UATB:%08x\n",		(UW)gr->ra.hi, gr->ra.lo, cr->lsid, cr->uatb);	(*prfn)("HI:     %08x-%08x LO:     %08x-%08x\n",		(UW)gr->hi.hi, gr->hi.lo, (UW)gr->lo.hi, gr->lo.lo);	(*prfn)("USP:    %08x-%08x SSP:    %08x-%08x\n",		(UW)cr->usp.hi, cr->usp.lo, (UW)cr->ssp.hi, cr->ssp.lo);	return 18;  /* Number of display rows */}

⌨️ 快捷键说明

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