]> git.sur5r.net Git - freertos/commitdiff
Add code for near memory model.
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 5 Feb 2009 21:12:34 +0000 (21:12 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 5 Feb 2009 21:12:34 +0000 (21:12 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@679 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/NEC_78K0R_IAR/RegTest.s26

index a95758b64de54c4e0e0e44d19b0f0e6e667be386..93ec7c5c3160a84405420ae665eedcd57946abf9 100644 (file)
@@ -72,7 +72,11 @@ vRegTest1:
        MOVW    DE, #0x5566\r
        MOVW    HL, #0x7788\r
        MOV             CS, #0x01\r
+#if configMEMORY_MODE == 1     \r
+       ; ES is not saved or restored when using the near memory model so only\r
+       ; test it when using the far model.\r
        MOV             ES, #0x02\r
+#endif\r
 \r
 loop1:\r
        ; Continuously check that the register values remain at their expected\r
@@ -104,10 +108,14 @@ loop1:
        CMP             A, #0x01\r
        BZ              +5\r
        BR              vRegTestError\r
+#if configMEMORY_MODE == 1     \r
+       ; ES is not saved or restored when using the near memory model so only\r
+       ; test it when using the far model.\r
        MOV             A, ES\r
        CMP             A, #0x02\r
        BZ              +5\r
        BR              vRegTestError\r
+#endif\r
        MOVW    AX, #0x1122\r
        BR              loop1\r
 \r
@@ -132,7 +140,9 @@ vRegTest2:
        MOVW    DE, #0xddee\r
        MOVW    HL, #0xff12\r
        MOV             CS, #0x03\r
+#if configMEMORY_MODE == 1     \r
        MOV             ES, #0x04       \r
+#endif\r
 \r
 loop2:\r
        CMPW    AX, #0x99aa\r
@@ -154,10 +164,12 @@ loop2:
        CMP             A, #0x03\r
        BZ              +5\r
        BR              vRegTestError\r
+#if configMEMORY_MODE == 1             \r
        MOV             A, ES\r
        CMP             A, #0x04\r
        BZ              +5\r
        BR              vRegTestError\r
+#endif\r
        MOVW    AX, #0x99aa\r
        BR              loop2\r
 \r