From c66f7dc49eaa461d4abf8d4d4933e880fcec222a Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 24 Mar 2023 12:51:34 +0100 Subject: [PATCH] "Hack hack" test. The 340 interrupt handling uses a special hack. PDP-10 emulators may not support this. See src/maint/hhtest.1 for longer explanation. --- build/ka10/processor.tcl | 7 ++++++ src/maint/hhtest.1 | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 src/maint/hhtest.1 diff --git a/build/ka10/processor.tcl b/build/ka10/processor.tcl index 5cd91455..f983e383 100644 --- a/build/ka10/processor.tcl +++ b/build/ka10/processor.tcl @@ -258,3 +258,10 @@ respond "*" ":kill\r" respond "*" ":midas sys; atsign 6slave_sysen2; ld10\r" respond " PDP6F = " "1\r" expect ":KILL" + +# Test for the 340 "hack hack". +respond "*" $emulator_escape +punch_tape "$out/hhtest.rim" +type ":vk\r" +respond "*" ":midas ptp:_maint;hhtest\r" +expect ":KILL" diff --git a/src/maint/hhtest.1 b/src/maint/hhtest.1 new file mode 100644 index 00000000..704b1b59 --- /dev/null +++ b/src/maint/hhtest.1 @@ -0,0 +1,47 @@ + TITLE "HACK HACK" TEST + +;This tests the ITS "hack hack" for handling Type 340 display +;interrupts. Data is output to the display through a BLKO from a low +;priority data channel, whereas other conditions are handled through a +;higher priority special channel. The "hack hack" is that when the +;BLKO overflows, ITS triggers an interrupt on the special channel. +;This interrupt is handled still in the overflow state, so the second +;interrupt location should be used. This hack goes back to at least +;ITS 672. + +NOSYMS +RIM10 + +APR==0 +PI==4 +TTY==120 + +SCHN==4 +DCHN==6 + +LOC 40+2*DCHN + BLKO TTY,PTR ;2. BLKO overflows. + CONO PI,4000+200_<-SCHN> ;3. Trigger special interrupt. + +LOC 40+2*SCHN + JRST 4,. + JSR OFLOW ;4. Execute second instruction. + +LOC 100 + +GO: CONO APR,675550 ;Reset APR. + CONO PI,711377 ;Reset PI. + CONO PI,2000+<200_<-SCHN>>+<200_<-DCHN>> ;Enable channels. + CONO TTY,DCHN + CONO PI,4000+200_<-DCHN> ;1. Trigger data interrupt. +REPEAT 10,JFCL + JRST 4,. ;Unsuccessful test ends here. + +LOC 200 + +OFLOW: 0 + JRST 4,. ;5. Successful test ends here. + +PTR: -1,,["A]-1 + +END GO