From 295eac1c95c28404acc36aad12419d441056f3b2 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Mon, 23 Jan 2023 19:16:59 -0800 Subject: [PATCH] Revert "Initial test regarding clearing" This reverts commit a1f1ba5b157e833dd1788b20e29b87d979ce2059. --- Source/DSPSpy/main_spy.cpp | 1 - Source/DSPSpy/tests/external_interrupt_status_bits.ds | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/DSPSpy/main_spy.cpp b/Source/DSPSpy/main_spy.cpp index c8082768eb..c77d37f5b6 100644 --- a/Source/DSPSpy/main_spy.cpp +++ b/Source/DSPSpy/main_spy.cpp @@ -454,7 +454,6 @@ void handle_dsp_mail(void) else if (mail == 0x88885370) { real_dsp.SetInterrupt(false); - CON_PrintRow(4, 25, "Test %d", real_dsp.CheckInterrupt()); //real_dsp.SendMailTo(real_dsp.CheckInterrupt() ? 0x99995372 : 0x99995370); //while (real_dsp.CheckMailTo()) // ; diff --git a/Source/DSPSpy/tests/external_interrupt_status_bits.ds b/Source/DSPSpy/tests/external_interrupt_status_bits.ds index c2cddb1d1e..8d5650c89f 100644 --- a/Source/DSPSpy/tests/external_interrupt_status_bits.ds +++ b/Source/DSPSpy/tests/external_interrupt_status_bits.ds @@ -30,11 +30,10 @@ test_main: ; We store a copy of $SR in $AR0. MRR $AR0, $SR ; $IX0 is set to SR_100, so we can add it to $AR0 repeatedly to cycle through $SR bits. + LRI $IX0, #0x0100 ; Subtract $IX0 from $AR0, so that we can add it the first time to get $SR ; (and have $AR0 always match $SR instead of overflowing) - LRI $IX0, #0x2000 - ADDARN $AR0, $IX0 - LRI $IX0, #0x0100 + SUBARN $AR0 LRIS $AX0.H, #1 CALL send_back @@ -42,7 +41,7 @@ test_main: ; We're checking 5 bits in $sr, so 1 << 5 or 0x20 times. BLOOPI #0x20, main_loop_last_ins CLR $ACC0 - SUBARN $AR0 + ADDARN $AR0, $IX0 MRR $SR, $AR0 ; Tell the CPU to set the external interrupt