;\r
;------------------------------------------------------------------------------\r
\r
+\r
+;\r
+; This file defines the RegTest tasks as described at the top of main.c\r
+;\r
+\r
;------------------------------------------------------------------------------\r
\r
#if __CORE__ != __78K0R__\r
;\r
; Input: NONE\r
;\r
-; Call: CALL vRegTest1\r
+; Call: Created as a task.\r
;\r
; Output: NONE\r
;\r
RSEG CODE:CODE\r
vRegTest1:\r
\r
+ ; First fill the registers.\r
MOVW AX, #0x1122\r
MOVW BC, #0x3344\r
MOVW DE, #0x5566\r
MOV ES, #0x02\r
\r
loop1:\r
+ ; Continuously check that the register values remain at their expected\r
+ ; values. The BRK is to test the yield. This task runs at low priority\r
+ ; so will also regularly get preempted.\r
BRK\r
+\r
+ ; Compare with the expected value.\r
CMPW AX, #0x1122\r
BZ +5\r
+ ; Jump over the branch to vRegTestError() if the register contained the\r
+ ; expected value - otherwise flag an error by executing vRegTestError().\r
BR vRegTestError \r
+\r
+ ; Repeat for all the registers.\r
MOVW AX, BC\r
CMPW AX, #0x3344\r
BZ +5\r
;\r
; Input: NONE\r
;\r
-; Call: CALL vRegTest1\r
+; Call: Created as a task.\r
;\r
; Output: NONE\r
;\r