" detection interrupts\"", objnum);
}
-void on_pic_detect1(const PicInsnInfo *pii, const PicInsn *pi, int segn) {
- Segment *seg;
- if (segn >= NUM_SEGMENTS) die("PIC sent detect @#%#x out of range",segn);
+static SegmentNum on_pic_detect_prep(int detyn, int objnum) {
+ SegmentNum segn;
+
+ if (objnum >= info_segmentmaplen ||
+ (segn= info_segmentmap[objnum]) < 0)
+ die("PIC sent detect%d @#%#x not in map",detyn,objnum);
+ oprintf(UPO,"picio in detect%d %s\n",detyn,info_segments[segn].pname);
+
+ return segn;
+}
+
+void on_pic_detect1(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
+ SegmentNum segn;
+ Segment *seg;
+
+ segn= on_pic_detect_prep(1,objnum);
seg= &segments[segn];
switch (sta_state) {
}
void on_pic_detect0(const PicInsnInfo *pii, const PicInsn *pi, int objnum) {
+ on_pic_detect_prep(0,objnum);
}
void choreographers_all_abandon(void) { }