dma10.s 60.2 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222
/************************************************************************
  DMA WRITE TESTS: File #0
************************************************************************/
	.word	0x11CD31A5
	.word	0x58A47BAB
	.word	0x35814471
	.word	0x54E03026
	.word	0x442E185B
	.word	0x0F7A2F91
	.word	0x5CDB1ADA
	.word	0x6ADC2A4F
	.word	0x25D56103
	.word	0x54F32AC6
	.word	0x5A5D61C8
	.word	0x5ABD1001
	.word	0x071317F0
	.word	0x68971607
	.word	0x212047DA
	.word	0x434407F8
	.word	0x642764F1
	.word	0x05BD77ED
	.word	0x22E952EE
	.word	0x2FBB188D
	.word	0x76BA7ED1
	.word	0x1105146F
	.word	0x79A70B9D
	.word	0x1D797F33
	.word	0x77640ED6
	.word	0x75DC3C5F
	.word	0x40F818BB
	.word	0x316377FB
	.word	0x0F270443
	.word	0x33FE0CEB
	.word	0x1FA34ADA
	.word	0x1D67750F
	.word	0x78F157D8
	.word	0x1CED1F1C
	.word	0x011D17C6
	.word	0x36014638
	.word	0x531D3F4F
	.word	0x417D2758
	.word	0x7F060608
	.word	0x37B8305A
	.word	0x20F050E0
	.word	0x0F4A04E1
	.word	0x7AAA0865
	.word	0x3CA074F4
	.word	0x7C1E16BC
	.word	0x1E3E4156
	.word	0x6683495D
	.word	0x61D749A3
	.word	0x76451292
	.word	0x2E0F002F
	.word	0x3FB466AF
	.word	0x1D0A3F9E
	.word	0x2A6E310F
	.word	0x53BC5E43
	.word	0x378D1CD2
	.word	0x41F01B39
	.word	0x7E912D58
	.word	0x57154143
	.word	0x0D0C627C
	.word	0x37CB1B65
	.word	0x15106491
	.word	0x4031173F
	.word	0x1658741D
	.word	0x5EED312C
	.word	0x6E391958
	.word	0x14F8061E
	.word	0x7A474F62
	.word	0x262F2737
	.word	0x39C62748
	.word	0x46990B28
	.word	0x19D71EB5
	.word	0x5079394A
	.word	0x585F2678
	.word	0x4F130A7E
	.word	0x29B614B9
	.word	0x6A3F1BC5
	.word	0x0D147EFB
	.word	0x7EAF4E9E
	.word	0x7BBC37D1
	.word	0x6EFF7323
	.word	0x5EE66C60
	.word	0x798177E2
	.word	0x786D1D98
	.word	0x1EC63B7C
	.word	0x2A3D7131
	.word	0x64ED5C00
	.word	0x487A1667
	.word	0x03AB2005
	.word	0x62713A76
	.word	0x451E5589
	.word	0x2E3F48D5
	.word	0x2751428D
	.word	0x03437332
	.word	0x0A8E036C
	.word	0x0F453D30
	.word	0x786772FF
	.word	0x326307E3
	.word	0x4F837873
	.word	0x2DBF5907
	.word	0x602956E5
	.word	0x10EA5A04
	.word	0x458E5AC2
	.word	0x120F4AA2
	.word	0x07DE00E1
	.word	0x3CDF638C
	.word	0x530C735D
	.word	0x24406486
	.word	0x4E5A7834
	.word	0x02B54A6E
	.word	0x60A82DA1
	.word	0x758C68F4
	.word	0x6D7C3039
	.word	0x3EC96418
	.word	0x56D506C7
	.word	0x39D54568
	.word	0x4FAF6FE9
	.word	0x6EE628F7
	.word	0x4B566D67
	.word	0x712E3E1C
	.word	0x156B2956
	.word	0x73C317F0
	.word	0x5EB710F1
	.word	0x41510985
	.word	0x4AB34132
	.word	0x028109E6
	.word	0x49D32134
	.word	0x7F285BD3
	.word	0x4C964648
	.word	0x46307539
	.word	0x1B4F7DD9
	.word	0x68476273
	.word	0x5EB01900
	.word	0x31492143
	.word	0x251B55E6
	.word	0x0C6E2F8F
	.word	0x70A902DD
	.word	0x7F3349DB
	.word	0x19F6373D
	.word	0x6709158A
	.word	0x13B33E00
	.word	0x65C032D4
	.word	0x5AE90E1D
	.word	0x28B27286
	.word	0x200E6CA5
	.word	0x76AF2B7D
	.word	0x74C9149E
	.word	0x30AC6BE0
	.word	0x0A8500A2
	.word	0x312A0220
	.word	0x4DB73237
	.word	0x366819B1
	.word	0x69F012ED
	.word	0x43486785
	.word	0x02A24B3A
	.word	0x2302224D
	.word	0x2CB22B16
	.word	0x7B8A426F
	.word	0x74C10055
	.word	0x1AC245C6
	.word	0x7E3A76C7
	.word	0x6A60731C
	.word	0x071C5E10
	.word	0x369D5967
	.word	0x5C857149
	.word	0x33A306C7
	.word	0x0C027C53
	.word	0x6DB3333B
	.word	0x5D987AFF
	.word	0x10195B27
	.word	0x62910DE0
	.word	0x2ED10586
	.word	0x250860EA
	.word	0x7EF731EF
	.word	0x44345FD3
	.word	0x29EF2A49
	.word	0x09745426
	.word	0x2758344D
	.word	0x421E4927
	.word	0x49B25EC0
	.word	0x6A07516A
	.word	0x69C9666E
	.word	0x72D20A32
	.word	0x5CE96EE5
	.word	0x33F9788A
	.word	0x21C00AF7
	.word	0x4F9D1C25
	.word	0x701150ED
	.word	0x180D53F7
	.word	0x171E768B
	.word	0x4218708F
	.word	0x56D330C8
	.word	0x7013103B
	.word	0x1FB2534A
	.word	0x61A920DA
	.word	0x65826BA3
	.word	0x5465237F
	.word	0x70B7544E
	.word	0x61010DCB
	.word	0x5AA07B68
	.word	0x616C6507
	.word	0x2053592E
	.word	0x2B9D6F04
	.word	0x7858523A
	.word	0x2D1A14B2
	.word	0x5718017D
	.word	0x33475283
	.word	0x4E0325FB
	.word	0x6C6F527D
	.word	0x31843049
	.word	0x6D940C21
	.word	0x31A62BC8
	.word	0x48F70600
	.word	0x51837F9F
	.word	0x01651516
	.word	0x6970437A
	.word	0x664835ED
	.word	0x1FEA2404
	.word	0x24695B72
	.word	0x053F1325
	.word	0x17864F96
	.word	0x3DFC3FFB
	.word	0x289801A4
	.word	0x681A129A
	.word	0x44E05E65
	.word	0x26E72784
	.word	0x39B70DF5
	.word	0x01B606E7
	.word	0x01133363
	.word	0x01461399
	.word	0x4AD80A0C
	.word	0x37F36DD4
	.word	0x4EE57CB4
	.word	0x209F45B1
	.word	0x33D91269
	.word	0x005E5965
	.word	0x16A94D18
	.word	0x36E31B3F
	.word	0x7EE355EC
	.word	0x29AE3B5D
	.word	0x4BBF136A
	.word	0x35F31131
	.word	0x65EA054E
	.word	0x554920B7
	.word	0x42120223
	.word	0x61173774
	.word	0x003232A4
	.word	0x20BF5D2D
	.word	0x339B66D5
	.word	0x0E87146D
	.word	0x1FC620E1
	.word	0x7F4C26B4
	.word	0x75DB71B2
	.word	0x18E5787F
	.word	0x5F000352
	.word	0x435820FC
	.word	0x5F636D05
	.word	0x00BF418A
	.word	0x5E062D22
	.word	0x57F858F2
	.word	0x5D4D64B5
	.word	0x3E100E67
	.word	0x304930D6
	.word	0x2A6D303F
	.word	0x38C23DC8
	.word	0x41BD626F
	.word	0x7A066FD1
	.word	0x43A238C9
	.word	0x0C743DDC
	.word	0x271A38F4
	.word	0x3DC719CF
	.word	0x11B0002F
	.word	0x6A2402AD
	.word	0x156408C5
	.word	0x59E21C6B
	.word	0x615B4B4F
	.word	0x301B6994
	.word	0x514737AC
	.word	0x35F6029C
	.word	0x079441C1
	.word	0x0EB26703
	.word	0x7E587DF1
	.word	0x20734431
	.word	0x3AF7095B
	.word	0x3DCD4E0C
	.word	0x109939D6
	.word	0x5C11055A
	.word	0x1D4D51AE
	.word	0x625A07DA
	.word	0x6DFA331B
	.word	0x5D564621
	.word	0x750A4F85
	.word	0x23D43B35
	.word	0x3FD44E7A
	.word	0x381201EB
	.word	0x16CD286B
	.word	0x71C46401
	.word	0x746F312A
	.word	0x3CE43EFA
	.word	0x7EE54E24
	.word	0x793D5ABD
	.word	0x707B545E
	.word	0x46B50DEC
	.word	0x1AC84A30
	.word	0x4A5D4C05
	.word	0x709808C4
	.word	0x383A793B
	.word	0x429C794E
	.word	0x2DD12012
	.word	0x1AD16A08
	.word	0x297464BD
	.word	0x62B036F5
	.word	0x2A4F5237
	.word	0x401A4251
	.word	0x45315D23
	.word	0x550278DA
	.word	0x3A1B3865
	.word	0x4DD85DC2
	.word	0x568B577C
	.word	0x6AB95A6F
	.word	0x30853AA6
	.word	0x6F574DF8
	.word	0x066660B2
	.word	0x25AA1860
	.word	0x4F687AA3
	.word	0x5F541D90
	.word	0x48F43D09
	.word	0x21D57C16
	.word	0x0CAB6B1F
	.word	0x697373A0
	.word	0x7B3377A5
	.word	0x2EE63736
	.word	0x07C2577C
	.word	0x1BC7273B
	.word	0x306B6203
	.word	0x19B72F21
	.word	0x2F2B5B34
	.word	0x284F42EF
	.word	0x2FB2037D
	.word	0x25CB3874
	.word	0x15F3495F
	.word	0x76757849
	.word	0x216A78C8
	.word	0x36D34288
	.word	0x79300431
	.word	0x6490034D
	.word	0x6CC04377
	.word	0x2A2B72F1
	.word	0x7587447A
	.word	0x39617E01
	.word	0x452D0978
	.word	0x605B3100
	.word	0x6CA65127
	.word	0x459823E1
	.word	0x67F74494
	.word	0x76982143
	.word	0x1AC926BE
	.word	0x354E056A
	.word	0x09AF61F1
	.word	0x30431101
	.word	0x5C370EE4
	.word	0x118A2B92
	.word	0x73B25192
	.word	0x106751C1
	.word	0x22C327D8
	.word	0x71BE2B4C
	.word	0x51AA05D3
	.word	0x233D04C2
	.word	0x1B4E5BF7
	.word	0x5D492906
	.word	0x2F0C62F0
	.word	0x77A95683
	.word	0x03424939
	.word	0x5CF54C2C
	.word	0x24991E7D
	.word	0x48BC2A3B
	.word	0x2E1618B0
	.word	0x3C7822A5
	.word	0x35E00EED
	.word	0x5733355F
	.word	0x3ACF460E
	.word	0x7BF57453
	.word	0x5EB96B0D
	.word	0x72F40B21
	.word	0x797B571E
	.word	0x717B0696
	.word	0x50C97988
	.word	0x349617ED
	.word	0x00B60347
	.word	0x1A824FC8
	.word	0x61023063
	.word	0x66D80CEC
	.word	0x73274B0E
	.word	0x1D731ABF
	.word	0x25224480
	.word	0x20263B83
	.word	0x75027F93
	.word	0x7B1F1A50
	.word	0x4132291E
	.word	0x0C1960D3
	.word	0x51853A11
	.word	0x70456CC9
	.word	0x65067F55
	.word	0x64F66139
	.word	0x507D4361
	.word	0x070F0F74
	.word	0x79C1759C
	.word	0x1D2D73CD
	.word	0x3BC16B75
	.word	0x58934219
	.word	0x7F501744
	.word	0x38D93DE5
	.word	0x14B450DF
	.word	0x7E545A7A
	.word	0x19ED0BFC
	.word	0x57445E91
	.word	0x79C5184A
	.word	0x33C007D6
	.word	0x4F9C474E
	.word	0x6C626A1F
	.word	0x3BF013FE
	.word	0x27B20669
	.word	0x75AF281F
	.word	0x2A535597
	.word	0x243C5B5E
	.word	0x7DF042E9
	.word	0x4E430830
	.word	0x1AE4523D
	.word	0x693D526B
	.word	0x00AC6E09
	.word	0x55C23BA1
	.word	0x690D1914
	.word	0x54922141
	.word	0x02047FF7
	.word	0x4061006B
	.word	0x5A722657
	.word	0x18661B96
	.word	0x6D842BDF
	.word	0x27A25DE4
	.word	0x78E46500
	.word	0x54F11840
	.word	0x09A14368
	.word	0x67D2743D
	.word	0x6BDE4A43
	.word	0x4DF538AE
	.word	0x693E0A34
	.word	0x2D893C05
	.word	0x020B6112
	.word	0x5044206C
	.word	0x0D297963
	.word	0x332F35A5
	.word	0x6ABD4599
	.word	0x47371CA2
	.word	0x359C730E
	.word	0x2E7408E4
	.word	0x1F7610C1
	.word	0x02363B94
	.word	0x63BF65CE
	.word	0x6DD41462
	.word	0x7D6133AF
	.word	0x2A355421
	.word	0x0B236035
	.word	0x261B6D1F
	.word	0x0ED74344
	.word	0x67337D46
	.word	0x73461451
	.word	0x6FDD4DF4
	.word	0x04DC339D
	.word	0x35BB759A
	.word	0x49134B2E
	.word	0x74FB7716
	.word	0x60A10392
	.word	0x6C657AD1
	.word	0x60614853
	.word	0x4E247D98
	.word	0x4D025839
	.word	0x7154113B
	.word	0x25721D42
	.word	0x104F0AE8
	.word	0x28080862
	.word	0x1FB73B45
	.word	0x3E746CFB
	.word	0x0A430C4F
	.word	0x3C67181A
	.word	0x5D4A20F5
	.word	0x5D011F77
	.word	0x32115273
	.word	0x2AFF242B
	.word	0x5FD5276F
	.word	0x3FA1052F
	.word	0x429720D6
	.word	0x045C3D98
	.word	0x22AA7875
	.word	0x63446A95
	.word	0x08FD2D57
	.word	0x12373524
	.word	0x0C2979E1
	.word	0x64CB1B97
	.word	0x62390FAE
	.word	0x50F556CA
	.word	0x433D352B
	.word	0x127E5721
	.word	0x688D20F2
	.word	0x19261544
	.word	0x34DE2EE7
	.word	0x2D95329A
	.word	0x51064B15
	.word	0x79052586
	.word	0x498F2E46
	.word	0x5BB16D64
	.word	0x78FD4864
	.word	0x3DFC0A42
	.word	0x4ADF7492
	.word	0x4862345E
	.word	0x2398530A
	.word	0x2E1F0F64
	.word	0x78EB64B5
	.word	0x76A15564
	.word	0x6748448C
	.word	0x71AE3595
	.word	0x4FD81AB1
	.word	0x425562CC
	.word	0x4B4A254C
	.word	0x2C960DBA
	.word	0x7D5B7326
	.word	0x11D146E8
	.word	0x15282C08
	.word	0x47EF0474
	.word	0x063302D1
	.word	0x37524789
	.word	0x46372D5A
	.word	0x6B7D1D9F
	.word	0x1BAC7E0A
	.word	0x02837978
	.word	0x49187B38
	.word	0x27311FD5
	.word	0x211C1043
	.word	0x01FB23FC
	.word	0x4F3A3473
	.word	0x4CA72FEB
	.word	0x6167238E
	.word	0x74BB1459
	.word	0x5E54043A
	.word	0x78A75C71
	.word	0x747C1816
	.word	0x6BB3614E
	.word	0x0DEE5196
	.word	0x4CA71935
	.word	0x54D86BA2
	.word	0x1B3C1E94
	.word	0x74D75EEE
	.word	0x58452ABE
	.word	0x25005118
	.word	0x5C9D0064
	.word	0x46AE5983
	.word	0x32CF01D3
	.word	0x250A37F6
	.word	0x5F886EEF
	.word	0x215B58F3
	.word	0x44BD06F3
	.word	0x581343D8
	.word	0x0B9C09E6
	.word	0x0A954EB8
	.word	0x413455DC
	.word	0x59C733F6
	.word	0x11E31BF2
	.word	0x1D5C65A7
	.word	0x4F836907
	.word	0x63DE3AA5
	.word	0x2E537E3B
	.word	0x677E5173
	.word	0x64A73528
	.word	0x039B44D4
	.word	0x19506BE3
	.word	0x77140E2A
	.word	0x4CC934B1
	.word	0x7F4E318F
	.word	0x29264589
	.word	0x18040FB5
	.word	0x64BD634E
	.word	0x6BD2797E
	.word	0x239144C8
	.word	0x417F615A
	.word	0x03822967
	.word	0x720D4664
	.word	0x3F371FB8
	.word	0x3382353C
	.word	0x13C737A3
	.word	0x44747AA2
	.word	0x552A1C6B
	.word	0x445763D7
	.word	0x5D625262
	.word	0x448728B4
	.word	0x4269146F
	.word	0x5E145B87
	.word	0x7ED90D41
	.word	0x584F7AB1
	.word	0x795E6850
	.word	0x2C180000
	.word	0x16DC7698
	.word	0x6FE509CD
	.word	0x435F6315
	.word	0x789379D5
	.word	0x1DC632FD
	.word	0x3AED25D8
	.word	0x322F0DC0
	.word	0x39FD75F3
	.word	0x6F2108C0
	.word	0x0E150CBE
	.word	0x417C72D0
	.word	0x509B5525
	.word	0x03215B6E
	.word	0x78981207
	.word	0x286151C0
	.word	0x74004B90
	.word	0x58271751
	.word	0x09BF3657
	.word	0x5AE44288
	.word	0x50887037
	.word	0x0C3D0CEC
	.word	0x465C2EED
	.word	0x3B774919
	.word	0x54DC3C76
	.word	0x269E3C81
	.word	0x4E505D26
	.word	0x7C7858E4
	.word	0x2F737B88
	.word	0x112D118D
	.word	0x320435F9
	.word	0x31B34852
	.word	0x7C0D2A03
	.word	0x41FB0E49
	.word	0x77F1197A
	.word	0x11DD344A
	.word	0x21394559
	.word	0x14C46729
	.word	0x521B1A5A
	.word	0x681953B0
	.word	0x5DCE0B57
	.word	0x54710E5F
	.word	0x03903563
	.word	0x35753AE3
	.word	0x067329A7
	.word	0x74952F56
	.word	0x75EB78FE
	.word	0x026C0F3C
	.word	0x73195D50
	.word	0x7AF11A39
	.word	0x7ED51CAF
	.word	0x60632A94
	.word	0x1C7E0233
	.word	0x18F31F6C
	.word	0x55810896
	.word	0x1B2E2EBC
	.word	0x69AA128E
	.word	0x75315B10
	.word	0x382D4CEE
	.word	0x1A8B0904
	.word	0x2D73167B
	.word	0x24F07081
	.word	0x41A6098F
	.word	0x73A365B7
	.word	0x53FB0370
	.word	0x55A135DA
	.word	0x6EC2456D
	.word	0x2A8E139C
	.word	0x402F0BBE
	.word	0x26614F6D
	.word	0x53E63619
	.word	0x23CE5775
	.word	0x59485E14
	.word	0x31763B4D
	.word	0x0280773E
	.word	0x45D12F81
	.word	0x484C54FB
	.word	0x45D74CC6
	.word	0x1E8B3223
	.word	0x4A7106FC
	.word	0x658B165A
	.word	0x50A317E2
	.word	0x2410352D
	.word	0x4076599B
	.word	0x562422F1
	.word	0x76A64CE4
	.word	0x5CA27B5C
	.word	0x3D104712
	.word	0x598055E0
	.word	0x5DDA03CE
	.word	0x04DF23CB
	.word	0x3D601691
	.word	0x46D45420
	.word	0x26E277DD
	.word	0x21F45933
	.word	0x37EE2A41
	.word	0x3AA26C06
	.word	0x168E330A
	.word	0x07182966
	.word	0x5E3262C9
	.word	0x743664C5
	.word	0x6F5C2989
	.word	0x0B0D4CD6
	.word	0x0E0E72CD
	.word	0x632B3DEB
	.word	0x7AF3454C
	.word	0x6DA45E0E
	.word	0x734F226B
	.word	0x64E55EE1
	.word	0x43A8617E
	.word	0x6D380136
	.word	0x593202BF
	.word	0x3216366D
	.word	0x7DFB360A
	.word	0x0C307B91
	.word	0x2BDB115E
	.word	0x7C3C4A31
	.word	0x22193314
	.word	0x06803B00
	.word	0x29DD4BDD
	.word	0x3B1F362C
	.word	0x355A4C7D
	.word	0x77274D7E
	.word	0x45B83349
	.word	0x2A561C36
	.word	0x43C23561
	.word	0x2DAF48A4
	.word	0x37543FAE
	.word	0x76C10386
	.word	0x09820B9A
	.word	0x33B22125
	.word	0x3D894392
	.word	0x1C0E282E
	.word	0x4C76733D
	.word	0x02527251
	.word	0x0F983F79
	.word	0x72363A9B
	.word	0x65A7221A
	.word	0x67BE3594
	.word	0x7EB12561
	.word	0x6AFF0F18
	.word	0x7AC85B3E
	.word	0x1CB269F6
	.word	0x476D0C46
	.word	0x7F7A3D4A
	.word	0x67BA5A72
	.word	0x09F52B9A
	.word	0x1353539D
	.word	0x4D842FB3
	.word	0x580B2FBB
	.word	0x3DDB3B42
	.word	0x2A5536DA
	.word	0x65472331
	.word	0x10710ADB
	.word	0x11C275C7
	.word	0x545250ED
	.word	0x46B9167E
	.word	0x685176CD
	.word	0x7F973BA3
	.word	0x6A940FBE
	.word	0x0F1929B0
	.word	0x733C054A
	.word	0x27514869
	.word	0x195217B7
	.word	0x56776DB9
	.word	0x5A6F6A48
	.word	0x04737A4A
	.word	0x512D1739
	.word	0x3D2B23E6
	.word	0x66510778
	.word	0x538C0990
	.word	0x68B50A23
	.word	0x295A6D61
	.word	0x37F667C5
	.word	0x27B83024
	.word	0x6DE36D50
	.word	0x34776AB1
	.word	0x32A02ADA
	.word	0x301E410A
	.word	0x279D6218
	.word	0x48BD4B37
	.word	0x153B609B
	.word	0x2D722FE1
	.word	0x473841CC
	.word	0x6EB84CB0
	.word	0x43DE54A8
	.word	0x17730866
	.word	0x49F0213C
	.word	0x4ABC2AB8
	.word	0x414F49E0
	.word	0x726C55F0
	.word	0x0A6F4433
	.word	0x4A6A7E44
	.word	0x587E25DA
	.word	0x54B57AF3
	.word	0x024E00F7
	.word	0x02300D25
	.word	0x76060C6B
	.word	0x1C317880
	.word	0x3B8D13CC
	.word	0x3AC8098A
	.word	0x31B26B25
	.word	0x53CF25C1
	.word	0x721B6270
	.word	0x2EB6417C
	.word	0x07F474D4
	.word	0x490B5780
	.word	0x65532F9F
	.word	0x77CC3E61
	.word	0x436D0D02
	.word	0x516D779F
	.word	0x597B3E8E
	.word	0x2CA7547C
	.word	0x166A2372
	.word	0x40060C9E
	.word	0x49456671
	.word	0x2E312269
	.word	0x64637FA6
	.word	0x0AF8311A
	.word	0x475015F8
	.word	0x252000A4
	.word	0x3B7C7C5B
	.word	0x20EE7B4B
	.word	0x0FA546CB
	.word	0x2F746101
	.word	0x7E063309
	.word	0x6E9D5483
	.word	0x493D6114
	.word	0x3DFA1E33
	.word	0x3BFD1766
	.word	0x144B40B4
	.word	0x77780EF4
	.word	0x21CD3B48
	.word	0x3C8902E2
	.word	0x4B4715E9
	.word	0x1BA5000A
	.word	0x49D21328
	.word	0x3780302B
	.word	0x7B6B23C9
	.word	0x067E1CF1
	.word	0x303A781C
	.word	0x3EE026A9
	.word	0x009F4B19
	.word	0x59AB2AC0
	.word	0x78024343
	.word	0x58571600
	.word	0x20570539
	.word	0x393D5E8B
	.word	0x3A74541C
	.word	0x46BE2193
	.word	0x2F125BA4
	.word	0x2D3260DF
	.word	0x04A50001
	.word	0x03971BFD
	.word	0x65DC4F73
	.word	0x32F64147
	.word	0x04F671A8
	.word	0x68943298
	.word	0x67CB30D9
	.word	0x7EDE59CC
	.word	0x689578A3
	.word	0x091208F9
	.word	0x778366A6
	.word	0x6DAD226E
	.word	0x68FC48DF
	.word	0x3B984470
	.word	0x5CB325C6
	.word	0x261174AF
	.word	0x096F2A27
	.word	0x535A078A
	.word	0x799818C0
	.word	0x6A243F07
	.word	0x048117A0
	.word	0x09BA5D90
	.word	0x1077773A
	.word	0x18EE286E
	.word	0x698D4F4C
	.word	0x17C41607
	.word	0x39250D72
	.word	0x5FE023D7
	.word	0x6A3F5189
	.word	0x7FAF1030
	.word	0x068133C4
	.word	0x1C5873B1
	.word	0x580A5090
	.word	0x06617688
	.word	0x5BF73629
	.word	0x6D211D67
	.word	0x51B10FF9
	.word	0x5CEA6A47
	.word	0x72FD2BB4
	.word	0x73F24CDF
	.word	0x20C13435
	.word	0x7A061EE3
	.word	0x10973E15
	.word	0x46ED27FD
	.word	0x47130210
	.word	0x239D658C
	.word	0x6AD46119
	.word	0x1220121F
	.word	0x3C4D0E37
	.word	0x284428B0
	.word	0x3E517A26
	.word	0x69055FA1
	.word	0x5B605CAD
	.word	0x48BB5777
	.word	0x13B477C0
	.word	0x48047958
	.word	0x00097056
	.word	0x516F4145
	.word	0x35305908
	.word	0x45ED7018
	.word	0x54524A6F
	.word	0x63F8613D
	.word	0x5405253A
	.word	0x75800030
	.word	0x4E105A11
	.word	0x709A19BA
	.word	0x5DFE532D
	.word	0x76E804EB
	.word	0x5C655BB4
	.word	0x5FC65FD6
	.word	0x02F320D5
	.word	0x39395C0F
	.word	0x453E28A8
	.word	0x6B9856E5
	.word	0x6A485AC3
	.word	0x6BF83960
	.word	0x32D3769C
	.word	0x29595BF9
	.word	0x186A13A1
	.word	0x20926A1C
	.word	0x712C0719
	.word	0x42FC015E
	.word	0x04574BB8
	.word	0x1BE1087E
	.word	0x5B984705
	.word	0x60A37A1D
	.word	0x5D15086C
	.word	0x57AC1F3D
	.word	0x7A365E22
	.word	0x4219757B
	.word	0x7F375BBD
	.word	0x34253D0C
	.word	0x4F6F2E8F
	.word	0x08576A79
	.word	0x1A5D5BC6
	.word	0x596B781A
	.word	0x55774444
	.word	0x2F025354
	.word	0x06B30A3F
	.word	0x49096192
	.word	0x2BD23498
	.word	0x35E95904
	.word	0x4A6F2BFC
	.word	0x1F73691A
	.word	0x74CB6DBD
	.word	0x7A896EBF
	.word	0x4F55106E
	.word	0x058D3056
	.word	0x62FC7640
	.word	0x418B5D75
	.word	0x4835491F
	.word	0x52264E64
	.word	0x76CB1C8C
	.word	0x70433F54
	.word	0x466A5139
	.word	0x5B77035F
	.word	0x6BE91666
	.word	0x76316B43
	.word	0x7F5B24FE
	.word	0x78A75BDE
	.word	0x56D41070
	.word	0x66825069
	.word	0x41FB494F
	.word	0x33484474
	.word	0x72542DA8
	.word	0x418D41A5
	.word	0x1C4A4327
	.word	0x28D90D30
	.word	0x1CFF76E8
	.word	0x6E583116
	.word	0x30D47F1E
	.word	0x1C445D1D
	.word	0x06B73A66
	.word	0x64135B92
	.word	0x3C2F28E9
	.word	0x376015C1
	.word	0x0E295B34
	.word	0x039A6431
	.word	0x4A8072D7
	.word	0x7C6E26A0
	.word	0x4E4E10BF
	.word	0x20F55FC1
	.word	0x1CF54D53
	.word	0x679D50B8
	.word	0x5BEB1651
	.word	0x3CD95051
	.word	0x3F490E67
	.word	0x40885A04
	.word	0x33134A91
	.word	0x6E2610A9
	.word	0x4D450935
	.word	0x1BB530FB
	.word	0x54A23F00
	.word	0x7B692FCF
	.word	0x683C157E
	.word	0x0C160010
	.word	0x13C2377C
	.word	0x245A3C81
	.word	0x5C8C071E
	.word	0x048A3132
	.word	0x136819BF
	.word	0x1B5D00BF
	.word	0x7722158B
	.word	0x695B614C
	.word	0x73D54CDE
	.word	0x2F032D40
	.word	0x0AF4335B
	.word	0x51BF43C4
	.word	0x301708CC
	.word	0x238874FA
	.word	0x268755BD
	.word	0x795975FE
	.word	0x2B8815D7
	.word	0x3C55189D
	.word	0x79692BFD
	/****************************************************************
	                           DMA TEST #0.1
	 ****************************************************************/
	ori	$1,	$0,	0x0001		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0000		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x27F0
	lui	$13,	0x0080			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep1:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep1		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write1:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write1		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x61B7			/* load random number	*/
	ori	$9,	$9,	0x42D8
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read1:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read1		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk1:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk1		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln1:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln1		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.2
	 ****************************************************************/
	ori	$1,	$0,	0x0002		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0008		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x27F8
	lui	$13,	0xFF80			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep2:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep2		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write2:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write2		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x6F4C			/* load random number	*/
	ori	$9,	$9,	0x7C28
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read2:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read2		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk2:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk2		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln2:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln2		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.3
	 ****************************************************************/
	ori	$1,	$0,	0x0003		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x07F0		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2800
	lui	$13,	0x0100			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep3:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep3		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write3:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write3		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x757D			/* load random number	*/
	ori	$9,	$9,	0x6217
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read3:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read3		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk3:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk3		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln3:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln3		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.4
	 ****************************************************************/
	ori	$1,	$0,	0x0004		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x07F8		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2808
	lui	$13,	0x0200			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep4:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep4		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write4:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write4		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x69B6			/* load random number	*/
	ori	$9,	$9,	0x4703
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read4:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read4		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk4:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk4		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln4:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln4		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.5
	 ****************************************************************/
	ori	$1,	$0,	0x0005		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0800		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2FF0
	lui	$13,	0x0400			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep5:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep5		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write5:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write5		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x23D4			/* load random number	*/
	ori	$9,	$9,	0x562D
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read5:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read5		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk5:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk5		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln5:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln5		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.6
	 ****************************************************************/
	ori	$1,	$0,	0x0006		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0808		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2FF8
	lui	$13,	0x0800			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep6:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep6		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write6:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write6		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x17D5			/* load random number	*/
	ori	$9,	$9,	0x2346
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read6:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read6		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk6:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk6		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln6:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln6		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.7
	 ****************************************************************/
	ori	$1,	$0,	0x0007		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0FF0		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x3000
	lui	$13,	0x1000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep7:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep7		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write7:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write7		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x6D42			/* load random number	*/
	ori	$9,	$9,	0x100F
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read7:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read7		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk7:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk7		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln7:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln7		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.8
	 ****************************************************************/
	ori	$1,	$0,	0x0008		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0FF8		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x3008
	lui	$13,	0xFF80			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x0007

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
Prep8:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep8		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write8:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write8		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x5995			/* load random number	*/
	ori	$9,	$9,	0x30D3
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x0004		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read8:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read8		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0008		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk8:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk8		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln8:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln8		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.9
	 ****************************************************************/
	ori	$1,	$0,	0x0009		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0000		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x27E8
	lui	$13,	0x2000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep9:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep9		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write9:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write9		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x7196			/* load random number	*/
	ori	$9,	$9,	0x6054
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read9:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read9		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk9:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk9		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln9:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln9		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.10
	 ****************************************************************/
	ori	$1,	$0,	0x000A		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0008		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x27F0
	lui	$13,	0x4000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep10:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep10		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write10:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write10		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x7261			/* load random number	*/
	ori	$9,	$9,	0x6191
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read10:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read10		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk10:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk10		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln10:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln10		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.11
	 ****************************************************************/
	ori	$1,	$0,	0x000B		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x07E8		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x27F8
	lui	$13,	0x8000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep11:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep11		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write11:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write11		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x7D8F			/* load random number	*/
	ori	$9,	$9,	0x316C
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read11:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read11		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk11:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk11		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln11:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln11		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.12
	 ****************************************************************/
	ori	$1,	$0,	0x000C		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x07F0		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2800
	lui	$13,	0xC000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep12:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep12		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write12:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write12		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x1CB9			/* load random number	*/
	ori	$9,	$9,	0x740C
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read12:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read12		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk12:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk12		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln12:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln12		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.13
	 ****************************************************************/
	ori	$1,	$0,	0x000D		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x07F8		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2808
	lui	$13,	0xA000			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep13:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep13		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write13:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write13		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x474F			/* load random number	*/
	ori	$9,	$9,	0x29A0
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read13:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read13		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk13:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk13		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln13:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln13		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.14
	 ****************************************************************/
	ori	$1,	$0,	0x000E		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0800		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2FE8
	lui	$13,	0x0180			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep14:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep14		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write14:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write14		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x4A78			/* load random number	*/
	ori	$9,	$9,	0x7BC9
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read14:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read14		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk14:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk14		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln14:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln14		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.15
	 ****************************************************************/
	ori	$1,	$0,	0x000F		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0808		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2FF0
	lui	$13,	0x0280			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep15:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep15		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write15:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write15		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x057E			/* load random number	*/
	ori	$9,	$9,	0x70CD
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read15:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read15		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk15:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk15		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln15:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln15		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	                           DMA TEST #0.16
	 ****************************************************************/
	ori	$1,	$0,	0x0010		/* R1  = TEST ID   	*/
	ori	$2,	$0,	0x0004		/* R2  = 4		*/
	ori	$10,	$0,	0x0FE8		/* R10 = DMEM ADDRESS	*/
	lui	$11,	0x0000			/* R11 = DRAM ADDRESS	*/
	ori	$11,	$11,	0x2FF8
	lui	$13,	0xFF80			/* R13 = WRITE DMA LEN	*/
	ori	$13,	$13,	0x000F

	/* Prepare DMA write data */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	or	$6,	$10,	$0		/* copy DMEM address	*/
	xor	$4,	$11,	$9		/* gen data pattern	*/
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
Prep16:	sw	$4,	0x0000 ($6)		/* wr pattn into DMEM	*/
	sub	$4,	$4,	$2		/* update data pattern	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$6,	$6,	$2		/* update DMEM pointer	*/
	bne	$3,	$0,	Prep16		/* done?		*/
	nop					/* bne delay slot	*/

	/* DMA write */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Write16:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Write16		/* wait for DMA to end	*/

	/* Mess up DMEM before reading data back */
	lui	$9,	0x1DE3			/* load random number	*/
	ori	$9,	$9,	0x136A
	or	$6,	$10,	$0		/* copy DMEM address	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM	*/
	addi	$6,	$6,	0x000C		/* goto end of DMEM	*/
	sw	$9,	0x0000 ($6)		/* mess-up DMEM again	*/

	/* DMA read data back */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$2			/* initiate DMA read	*/
Read16:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Read16		/* wait for DMA to end	*/

	/* Check result */
	lui	$9,	0xFFFF			/* ld for bit-wise inv	*/
	ori	$9,	$9,	0xFFFF
	ori	$3,	$0,	0x0010		/* len of data (bytes)	*/
	or	$4,	$11,	$0		/* R4 = R11 =DRAM addr	*/
	or	$6,	$10,	$0		/* R6 = R10 =DMEM addr	*/
Chk16:	lw	$5,	0x0000 ($6)		/* read test data	*/
	xor	$5,	$5,	$9		/* convert data	*/
	bne	$5,	$4,	Fail		/* verify data		*/
	nop					/* bne delay slot	*/
	sw	$5,	0x0000 ($6)		/* restore data	*/
	sub	$3,	$3,	$2		/* decrement counter	*/
	add	$4,	$4,	$2		/* predict next data	*/
	add	$6,	$6,	$2		/* advance DMEM ptr	*/
	bne	$3,	$0,	Chk16		/* check if done	*/
	nop					/* bne delay slot	*/

	/* Clean-up RDRAM */
	mtc0	$10,	$0			/* DMEM ad -> DMA reg	*/
	mtc0	$11,	$1			/* DRAM ad -> DMA reg	*/
	mtc0	$13,	$3			/* initiate DMA write	*/
Cln16:	mfc0	$14,	$4			/* read status reg	*/
	andi	$15,	$14,	0x0004		/* extract busy bit	*/
	bne	$15,	$0,	Cln16		/* wait for DMA to end	*/
	nop					/* bne delay slot	*/

	/****************************************************************
	  Wrap up ...
	 ****************************************************************/
	nop					
Done:	ori	$1,	$0,	0xFEED		/* Test passed		*/
	break

Time:	ori	$1,	$0,	0xDEAD		/* Timed-out from DMA	*/
	break

Fail:	break