/* * isa_test.dsp -- ADSP-219x ISA coverage test for disassembler validation. * Assembles with open21xx as219x. */ .section/PM program0; .global _start; _start: /* Type 30: NOP */ nop; /* Type 6: Dreg = Imm16 */ ax0 = 0x1234; ax1 = 0x5678; ay0 = 0xAAAA; mx0 = 0x4000; my0 = 0x2000; /* Type 7: Reg1/Reg2 = Imm16 */ i0 = 0x0100; i1 = 0x0200; i4 = 0x0300; m0 = 1; m1 = 1; m3 = -1; m4 = 1; l0 = 0; l4 = 0; cntr = 10; /* Type 17: Reg = Reg */ ar = ax0; si = ax1; mr0 = mx0; /* Type 9: Conditional Compute */ ar = ax0 + ay0; ar = ax0 - ay0; ar = ax0 and ay0; ar = ax0 or ay0; ar = ax0 xor ay0; ar = pass ax0; ar = -ax0; ar = abs ax0; mr = mx0 * my0 (ss); /* Type 10: Direct Jump */ jump _skip1; _skip1: nop; /* Type 10: Conditional Jump */ if eq jump _skip2; _skip2: nop; /* Type 10: Call */ call _sub1; jump _after_sub; _sub1: nop; rts; _after_sub: /* Type 20: Return variants */ nop; /* Type 11: DO UNTIL */ cntr = 4; do _loop_end until ce; nop; _loop_end: nop; /* Type 15: Shift Immediate */ sr = lshift si by 4 (hi); sr = ashift si by -2 (hi); /* Type 18: Mode Control */ dis ar_sat; ena ar_sat; /* Type 25: Saturate */ sat mr; /* Type 33: Reg3 = short constant */ se = 0; /* Infinite loop */ _halt: jump _halt;