From 6d1fc25490013ea0a28c7dce71c98346f56af7da Mon Sep 17 00:00:00 2001 From: RichardBarry Date: Thu, 5 Feb 2009 21:11:24 +0000 Subject: [PATCH] Add code for near memory model. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@678 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/IAR/78K0R/port.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/Source/portable/IAR/78K0R/port.c b/Source/portable/IAR/78K0R/port.c index a14c2e514..350ca0ff5 100644 --- a/Source/portable/IAR/78K0R/port.c +++ b/Source/portable/IAR/78K0R/port.c @@ -91,11 +91,6 @@ sequence. */ volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING; /*-----------------------------------------------------------*/ -/* - * The tick interrupt handler. - */ -__interrupt void MD_INTTM05( void ); - /* * Sets up the periodic ISR used for the RTOS tick. */ @@ -145,17 +140,14 @@ unsigned long *pulLocal; } #else { - TBD - + /* Task function address is written to the stack first. As it is + written as a 32bit value a space is left on the stack for the second + two bytes. */ pxTopOfStack--; - /* Task function start address. */ - pulLocal = (unsigned long*) pxTopOfStack; - *pulLocal = (unsigned long) pxCode; - pxTopOfStack--; - - /* Initial PSW value. */ - *pxTopOfStack = portPSW; + /* Task function start address combined with the PSW. */ + pulLocal = ( unsigned long * ) pxTopOfStack; + *pulLocal = ( ( ( unsigned long ) pxCode ) | ( portPSW << 24UL ) ); pxTopOfStack--; /* The parameter is passed in AX. */ -- 2.39.5