home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 355_03 / slk3.exe / TEST / TST / X1BAD.TST < prev    next >
Text File  |  1991-11-14  |  3KB  |  220 lines

  1. /*
  2.     Test of one-argument machine mnemonics.
  3.  
  4.     ALL lines in this file should generate an error.
  5. */
  6. int mem;
  7.  
  8. main()
  9. {
  10. label:
  11.  
  12. bcc();
  13. bcc(d2);
  14. bcc(a1);
  15. bcc(*a1);
  16. bcc(*a1++);
  17. bcc(*--a1);
  18. bcc(*(a1+5));
  19. bcc(*(a1+d3+5));
  20. bcc(mem);
  21. bcc(*(pc+5));
  22. bcc(*(pc+d3+5));
  23. bcc(6);
  24. bcc(label,1);
  25.  
  26. bra();
  27. bra(d2);
  28. bra(a1);
  29. bra(*a1);
  30. bra(*a1++);
  31. bra(*--a1);
  32. bra(*(a1+5));
  33. bra(*(a1+d3+5));
  34. bra(mem);
  35. bra(*(pc+5));
  36. bra(*(pc+d3+5));
  37. bra(6);
  38. bra(label,1);
  39.  
  40. bsr();
  41. bsr(d2);
  42. bsr(a1);
  43. bsr(*a1);
  44. bsr(*a1++);
  45. bsr(*--a1);
  46. bsr(*(a1+5));
  47. bsr(*(a1+d3+5));
  48. bsr(mem);
  49. bsr(*(pc+5));
  50. bsr(*(pc+d3+5));
  51. bsr(6);
  52. bsr(label,1);
  53.  
  54. clr();
  55. clr(label);
  56. clr(a1);
  57. clr(*clr(pc+5));
  58. clr(*clr(pc+d3+5));
  59. clr(6);
  60. clr(d2,1);
  61.  
  62. dbcc();
  63. dbcc(d2);
  64. dbcc(a1);
  65. dbcc(*a1);
  66. dbcc(*a1++);
  67. dbcc(*--a1);
  68. dbcc(*(a1+5));
  69. dbcc(*(a1+d3+5));
  70. dbcc(mem);
  71. dbcc(*(pc+5));
  72. dbcc(*(pc+d3+5));
  73. dbcc(6);
  74. dbcc(label,1);
  75.  
  76. ext();
  77. ext(label);
  78. ext(a1);
  79. ext(*a1);
  80. ext(*a1++);
  81. ext(*--a1);
  82. ext(*(a1+5));
  83. ext(*(a1+d3+5));
  84. ext(mem);
  85. ext(*(pc+5));
  86. ext(*(pc+d3+5));
  87. ext(6);
  88. bcc(d2,1);
  89.  
  90. jmp();
  91. jmp(d2);
  92. jmp(a1);
  93. jmp(*a1++);
  94. jmp(*--a1);
  95. jmp(mem);
  96. jmp(6);
  97. jmp(label,1);
  98.  
  99. jsr();
  100. jsr(d2);
  101. jsr(a1);
  102. jsr(*a1++);
  103. jsr(*--a1);
  104. jsr(mem);
  105. jsr(6);
  106. jsr(label,1);
  107.  
  108. nbcd();
  109. nbcd(label);
  110. nbcd(a1);
  111. nbcd(*(pc+5));
  112. nbcd(*(pc+d3+5));
  113. nbcd(6);
  114. nbcd(d2,1);
  115.  
  116. neg();
  117. neg(label);
  118. neg(a1);
  119. neg(*(pc+5));
  120. neg(*(pc+d3+5));
  121. neg(6);
  122. neg(d2,1);
  123.  
  124. negx();
  125. negx(label);
  126. negx(a1);
  127. negx(*(pc+5));
  128. negx(*(pc+d3+5));
  129. negx(6);
  130. negx(d2,1);
  131.  
  132. not();
  133. not(label);
  134. not(a1);
  135. not(*(pc+5));
  136. not(*(pc+d3+5));
  137. not(6);
  138. not(d2,1);
  139.  
  140. pea();
  141. pea(label);
  142. pea(d2);
  143. pea(a1);
  144. pea(*a1++);
  145. pea(*--a1);
  146. pea(6);
  147. pea(*a1++,1);
  148.  
  149. stop();
  150. stop(label);
  151. stop(d2);
  152. stop(a1);
  153. stop(*a1);
  154. stop(*a1++);
  155. stop(*--a1);
  156. stop(*(a1+5));
  157. stop(*(a1+d3+5));
  158. stop(mem);
  159. stop(*(pc+5));
  160. stop(*(pc+d3+5));
  161. stop(7,1);
  162.  
  163. swap();
  164. swap(label);
  165. swap(a1);
  166. swap(*a1);
  167. swap(*a1++);
  168. swap(*--a1);
  169. swap(*(a1+5));
  170. swap(*(a1+d3+5));
  171. swap(mem);
  172. swap(*(pc+5));
  173. swap(*(pc+d3+5));
  174. swap(6);
  175. swap(d2,1);
  176.  
  177. tas();
  178. tas(label);
  179. tas(a1);
  180. tas(*(pc+5));
  181. tas(*(pc+d3+5));
  182. tas(6);
  183. tas(d2,1);
  184.  
  185. trap();
  186. trap(label);
  187. trap(d2);
  188. trap(a1);
  189. trap(*a1);
  190. trap(*a1++);
  191. trap(*--a1);
  192. trap(*(a1+5));
  193. trap(*(a1+d3+5));
  194. trap(mem);
  195. trap(*(pc+5));
  196. trap(*(pc+d3+5));
  197. trap(6,1);
  198.  
  199. tst();
  200. tst(label);
  201. tst(a1);
  202. tst(6);
  203. tst(d2,1);
  204.  
  205. unlk();
  206. unlk(label);
  207. unlk(d2);
  208. unlk(*a1);
  209. unlk(*a1++);
  210. unlk(*--a1);
  211. unlk(*(a1+5));
  212. unlk(*(a1+d3+5));
  213. unlk(mem);
  214. unlk(*(pc+5));
  215. unlk(*(pc+d3+5));
  216. unlk(6);
  217. unlk(a1,1);
  218.  
  219. }
  220.