1# mach: all 2# output: 3# sim: --environment operating 4 5.include "t-macros.i" 6 7 start 8 9 ;; clear FX 10 loadpsw2 0x8005 11 loadacc2 a1 0x7f 0xffff 0xffff 12 load r8 0xffff 13 load r9 0x8001 14test_macu1: 15 MACU a1, r9, r8 16 checkacc2 1 a1 0x80 0x8000 0x7FFE 17 18 ;; set FX 19 loadpsw2 0x8085 20 loadacc2 a1 0x7f 0xffff 0xffff 21 load r8 0xffff 22 load r9 0x8001 23test_macu2: 24 MACU a1, r9, r8 25 checkacc2 2 a1 0x81 0x0000 0xfffd 26 27 28 29 30 ;; clear FX 31 ldi r2, #0x8005 32 mvtc r2, cr0 33 34 loadacc2 a1 0x7f 0xffff 0xffff 35 ldi r8, #0xffff 36 ldi r9, #0x7FFF 37test_macsu1: 38 MACSU a1, r9, r8 39 checkacc2 3 a1 0x80 0x7FFE 0x8000 40 41 ;; set FX 42 ldi r2, #0x8085 43 mvtc r2, cr0 44 45 loadacc2 a1 0x7f 0xffff 0xffff 46 ldi r8, #0xffff 47 ldi r9, #0x7FFF 48test_macsu2: 49 MACSU a1, r9, r8 50 checkacc2 4 a1 0x80 0xfffd 0x0001 51 52 ;; clear FX 53 ldi r2, #0x8005 54 mvtc r2, cr0 55 56 loadacc2 a1 0x7f 0xffff 0xffff 57 ldi r8, 0xffff 58 ldi r9, 0x8001 59test_macsu3: 60 MACSU a1, r9, r8 61 checkacc2 5 a1 0x7F 0x8001 0x7FFE 62 63 ;; set FX 64 ldi r2, #0x8085 65 mvtc r2, cr0 66 67 loadacc2 a1 0x7f 0xffff 0xffff 68 ldi r8, #0xffff 69 ldi r9, #0x8001 70test_macsu4: 71 MACSU a1, r9, r8 72 checkacc2 6 a1 0x7f 0x0002 0xFFFD 73 74 exit0 75 76