summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-02-05 21:12:34 +0000
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2009-02-05 21:12:34 +0000
commit7c6e7ae71ee18697ffe1429a8256f288e7766674 (patch)
treed5584fed8fcdca21d1b027f5fb5cce371016ec7e
parent23659b8b9bee5008014235a1ef01637bc6f69935 (diff)
downloadfreertos-7c6e7ae71ee18697ffe1429a8256f288e7766674.tar.gz
freertos-7c6e7ae71ee18697ffe1429a8256f288e7766674.tar.bz2
freertos-7c6e7ae71ee18697ffe1429a8256f288e7766674.tar.xz
Add code for near memory model.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@679 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
-rw-r--r--Demo/NEC_78K0R_IAR/RegTest.s2612
1 files changed, 12 insertions, 0 deletions
diff --git a/Demo/NEC_78K0R_IAR/RegTest.s26 b/Demo/NEC_78K0R_IAR/RegTest.s26
index a95758b6..93ec7c5c 100644
--- a/Demo/NEC_78K0R_IAR/RegTest.s26
+++ b/Demo/NEC_78K0R_IAR/RegTest.s26
@@ -72,7 +72,11 @@ vRegTest1:
MOVW DE, #0x5566
MOVW HL, #0x7788
MOV CS, #0x01
+#if configMEMORY_MODE == 1
+ ; ES is not saved or restored when using the near memory model so only
+ ; test it when using the far model.
MOV ES, #0x02
+#endif
loop1:
; Continuously check that the register values remain at their expected
@@ -104,10 +108,14 @@ loop1:
CMP A, #0x01
BZ +5
BR vRegTestError
+#if configMEMORY_MODE == 1
+ ; ES is not saved or restored when using the near memory model so only
+ ; test it when using the far model.
MOV A, ES
CMP A, #0x02
BZ +5
BR vRegTestError
+#endif
MOVW AX, #0x1122
BR loop1
@@ -132,7 +140,9 @@ vRegTest2:
MOVW DE, #0xddee
MOVW HL, #0xff12
MOV CS, #0x03
+#if configMEMORY_MODE == 1
MOV ES, #0x04
+#endif
loop2:
CMPW AX, #0x99aa
@@ -154,10 +164,12 @@ loop2:
CMP A, #0x03
BZ +5
BR vRegTestError
+#if configMEMORY_MODE == 1
MOV A, ES
CMP A, #0x04
BZ +5
BR vRegTestError
+#endif
MOVW AX, #0x99aa
BR loop2