\r
PUSH AX ; Save AX Register to stack.\r
PUSH HL\r
-#if configMEMORY_MODE == 1\r
+#if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
MOV A, CS ; Save CS register.\r
XCH A, X\r
MOV A, ES ; Save ES register.\r
MOVW usCriticalNesting, AX\r
POP BC ; Restore the necessary general purpose registers.\r
POP DE\r
-#if configMEMORY_MODE == 1\r
+#if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
POP AX ; Restore the ES register.\r
MOV ES, A\r
XCH A, X ; Restore the CS register.\r
{\r
unsigned long *pulLocal;\r
\r
- #if configMEMORY_MODE == 1\r
+ #if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
{\r
/* Parameters are passed in on the stack, and written using a 32bit value\r
hence a space is left for the second two bytes. */\r
#define portSHORT short\r
#define portSTACK_TYPE unsigned short\r
#define portBASE_TYPE short\r
-#define portPOINTER_SIZE_TYPE unsigned short\r
-#warning pointer size type will depend on data model.\r
+\r
+#if __DATA_MODEL__ == __DATA_MODEL_FAR__\r
+ #define portPOINTER_SIZE_TYPE unsigned long\r
+#else\r
+ #define portPOINTER_SIZE_TYPE unsigned short\r
+#endif\r
+\r
\r
#if (configUSE_16_BIT_TICKS==1)\r
typedef unsigned int portTickType;\r