1.include "macros.inc" 2 3start 4 5test_name SUB_1 6mvi r1, 0 7mvi r2, 0 8sub r3, r1, r2 9check_r3 0 10 11test_name SUB_2 12mvi r1, 0 13mvi r2, 1 14sub r3, r1, r2 15check_r3 -1 16 17test_name SUB_3 18mvi r1, 1 19mvi r2, 0 20sub r3, r1, r2 21check_r3 1 22 23test_name SUB_4 24mvi r1, 1 25mvi r2, -1 26sub r3, r1, r2 27check_r3 2 28 29test_name SUB_5 30mvi r1, -1 31mvi r2, 1 32sub r3, r1, r2 33check_r3 -2 34 35test_name SUB_6 36mvi r1, -1 37mvi r2, 0 38sub r3, r1, r2 39check_r3 -1 40 41test_name SUB_7 42mvi r1, 0 43mvi r2, -1 44sub r3, r1, r2 45check_r3 1 46 47test_name SUB_8 48mvi r3, 2 49sub r3, r3, r3 50check_r3 0 51 52test_name SUB_9 53mvi r1, 4 54mvi r3, 2 55sub r3, r1, r3 56check_r3 2 57 58test_name SUB_10 59mvi r1, 4 60mvi r3, 2 61sub r3, r3, r1 62check_r3 -2 63 64test_name SUB_11 65mvi r1, 4 66sub r3, r1, r1 67check_r3 0 68 69test_name SUB_12 70load r1 0x12345678 71load r2 0xabcdef97 72sub r3, r1, r2 73check_r3 0x666666e1 74 75end 76