Complete the RL78 demo. main.c still requires documentation in the comments at the top of the file.

pull/1/head
Richard Barry 14 years ago
parent 6ac7b7a9da
commit 80341af3f5

@ -69,7 +69,7 @@ portSAVE_CONTEXT MACRO
PUSH AX ; Save AX Register to stack.
PUSH HL
#if configMEMORY_MODE == 1
#if __DATA_MODEL__ == __DATA_MODEL_FAR__
MOV A, CS ; Save CS register.
XCH A, X
MOV A, ES ; Save ES register.
@ -104,7 +104,7 @@ portRESTORE_CONTEXT MACRO
MOVW usCriticalNesting, AX
POP BC ; Restore the necessary general purpose registers.
POP DE
#if configMEMORY_MODE == 1
#if __DATA_MODEL__ == __DATA_MODEL_FAR__
POP AX ; Restore the ES register.
MOV ES, A
XCH A, X ; Restore the CS register.

@ -117,7 +117,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
{
unsigned long *pulLocal;
#if configMEMORY_MODE == 1
#if __DATA_MODEL__ == __DATA_MODEL_FAR__
{
/* Parameters are passed in on the stack, and written using a 32bit value
hence a space is left for the second two bytes. */

@ -83,8 +83,13 @@ extern "C" {
#define portSHORT short
#define portSTACK_TYPE unsigned short
#define portBASE_TYPE short
#define portPOINTER_SIZE_TYPE unsigned short
#warning pointer size type will depend on data model.
#if __DATA_MODEL__ == __DATA_MODEL_FAR__
#define portPOINTER_SIZE_TYPE unsigned long
#else
#define portPOINTER_SIZE_TYPE unsigned short
#endif
#if (configUSE_16_BIT_TICKS==1)
typedef unsigned int portTickType;

Loading…
Cancel
Save