home *** CD-ROM | disk | FTP | other *** search
- /*
- Test of one-argument machine mnemonics.
-
- NO line of this file should generate an error.
-
- The first test in each series is short one argument.
- The last test in each series has one extra argument.
- */
- int mem;
- char *a1;
- char *pc;
- long d2, d3;
-
- /* WARNING: jmp(&func()); does not work yet. */
-
-
- main()
- {
- lab1:
-
- nop();
- reset();
- rte();
- rtr();
- rts();
- trapv();
-
- bcc(lab1);
- bcs(lab1);
- beq(lab1);
- bge(lab1);
- bgt(lab1);
- bhi(lab1);
- ble(lab1);
- bls(lab1);
- blt(lab1);
- bmi(lab1);
- bne(lab1);
- bpl(lab1);
- bvc(lab1);
- bvs(lab1);
- bra(lab1);
- bsr(lab1);
- jsr(lab1);
- /* comment out -----
- jsr(&main+5);
- ----- end comment out */
-
- clr(d2);
- clr(*a1);
- clr(*a1++);
- clr(*--a1);
- clr(*(a1+5));
- clr(*(a1+d3+5));
- clr(*(a1+d3));
- clr(mem);
-
- ext(d2);
-
- jmp(lab1);
- jmp(*a1);
- jmp(*(a1+5));
- jmp(*(a1+d3+5));
- jmp(*(a1+d3));
- jmp(*(pc+5));
- jmp(*(pc+d3+5));
- jmp(*(pc+d3));
-
- jsr(lab1);
- jsr(*a1);
- jsr(*(a1+5));
- jsr(*(a1+d3+5));
- jsr(*(a1+d3));
- jsr(*(pc+5));
- jsr(*(pc+d3+5));
- jsr(*(pc+d3));
-
- nbcd(d2);
- nbcd(*a1);
- nbcd(*a1++);
- nbcd(*--a1);
- nbcd(*(a1+5));
- nbcd(*(a1+d3+5));
- nbcd(*(a1+d3));
- nbcd(mem);
-
- neg(d2);
- neg(*a1);
- neg(*a1++);
- neg(*--a1);
- neg(*(a1+5));
- neg(*(a1+d3+5));
- neg(*(a1+d3));
- neg(mem);
-
- negx(d2);
- negx(*a1);
- negx(*a1++);
- negx(*--a1);
- negx(*(a1+5));
- negx(*(a1+d3+5));
- negx(*(a1+d3));
- negx(mem);
-
- not(d2);
- not(*a1);
- not(*a1++);
- not(*--a1);
- not(*(a1+5));
- not(*(a1+d3+5));
- not(*(a1+d3));
- not(mem);
-
- pea(*a1);
- pea(*(a1+5));
- pea(*(a1+d3+5));
- pea(mem);
- pea(*(pc+5));
- pea(*(pc+d3+5));
- pea(*(pc+d3));
-
- stop(6);
-
- swap(d2);
-
- tas(d2);
- tas(*a1);
- tas(*a1++);
- tas(*--a1);
- tas(*(a1+5));
- tas(*(a1+d3+5));
- tas(*(a1+d3));
- tas(mem);
-
- trap(6);
-
- tst(d2);
- tst(*a1);
- tst(*a1++);
- tst(*--a1);
- tst(*(a1+5));
- tst(*(a1+d3+5));
- tst(*(a1+d3));
- tst(mem);
-
- unlk(a1);
- }
-