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
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
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
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