diff options
Diffstat (limited to 'ue3/mycpu/test/test_prog')
| -rw-r--r-- | ue3/mycpu/test/test_prog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ue3/mycpu/test/test_prog b/ue3/mycpu/test/test_prog new file mode 100644 index 0000000..7c5f929 --- /dev/null +++ b/ue3/mycpu/test/test_prog | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # set R2 = 10 | ||
| 2 | load R1, R2 | ||
| 3 | |||
| 4 | # start of loop | ||
| 5 | label Loop: | ||
| 6 | inc R3 | ||
| 7 | sub R4, R3, R2 | ||
| 8 | test R4 | ||
| 9 | jumpz EndLoop | ||
| 10 | write WDEZ, R3 | ||
| 11 | jumpa Loop | ||
| 12 | |||
| 13 | label EndLoop: | ||
