@@ -1164,11 +1164,164 @@ impl ControlUnit {
11641164 Opcode :: Ios => control. op_ios ( ctx, mem, devices) ,
11651165 Opcode :: Tsd => control. op_tsd ( ctx, devices, prev_program_counter, mem) ,
11661166 Opcode :: Sed => control. op_sed ( ctx, mem) ,
1167- _ => Err ( Alarm {
1167+ Opcode :: Exx => Err ( Alarm {
11681168 sequence : control. regs . k ,
1169- details : AlarmDetails :: ROUNDTUITAL ( format ! (
1170- "The emulator does not yet implement opcode {opcode}" ,
1171- ) ) ,
1169+ details : AlarmDetails :: ROUNDTUITAL {
1170+ explanation : "The emulator does not yet implement opcode EXX" . to_string ( ) ,
1171+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/16" ,
1172+ } ,
1173+ } ) ,
1174+ Opcode :: Adx => Err ( Alarm {
1175+ sequence : control. regs . k ,
1176+ details : AlarmDetails :: ROUNDTUITAL {
1177+ explanation : "The emulator does not yet implement opcode ADX" . to_string ( ) ,
1178+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/18" ,
1179+ } ,
1180+ } ) ,
1181+ Opcode :: Spf => Err ( Alarm {
1182+ sequence : control. regs . k ,
1183+ details : AlarmDetails :: ROUNDTUITAL {
1184+ explanation : "The emulator does not yet implement opcode SPF" . to_string ( ) ,
1185+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/13" ,
1186+ } ,
1187+ } ) ,
1188+ Opcode :: Flf | Opcode :: Flg => Err ( Alarm {
1189+ sequence : control. regs . k ,
1190+ details : AlarmDetails :: ROUNDTUITAL {
1191+ explanation : "The emulator does not yet implement opcode {opcode}"
1192+ . to_string ( ) ,
1193+ // Note: that bug report covers two opcodes.
1194+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/14" ,
1195+ } ,
1196+ } ) ,
1197+ Opcode :: Ite | Opcode :: Ita | Opcode :: Una | Opcode :: Dsa => Err ( Alarm {
1198+ sequence : control. regs . k ,
1199+ details : AlarmDetails :: ROUNDTUITAL {
1200+ explanation : "The emulator does not yet implement opcode {opcode}"
1201+ . to_string ( ) ,
1202+ // Note: this bug report covers several opcodes.
1203+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/25" ,
1204+ } ,
1205+ } ) ,
1206+ Opcode :: Jov => Err ( Alarm {
1207+ sequence : control. regs . k ,
1208+ details : AlarmDetails :: ROUNDTUITAL {
1209+ explanation : "The emulator does not yet implement opcode JOV" . to_string ( ) ,
1210+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/11" ,
1211+ } ,
1212+ } ) ,
1213+ Opcode :: Jpa => Err ( Alarm {
1214+ sequence : control. regs . k ,
1215+ details : AlarmDetails :: ROUNDTUITAL {
1216+ explanation : "The emulator does not yet implement opcode JPA" . to_string ( ) ,
1217+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/9" ,
1218+ } ,
1219+ } ) ,
1220+ Opcode :: Jna => Err ( Alarm {
1221+ sequence : control. regs . k ,
1222+ details : AlarmDetails :: ROUNDTUITAL {
1223+ explanation : "The emulator does not yet implement opcode JNA" . to_string ( ) ,
1224+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/10" ,
1225+ } ,
1226+ } ) ,
1227+ Opcode :: Exa => Err ( Alarm {
1228+ sequence : control. regs . k ,
1229+ details : AlarmDetails :: ROUNDTUITAL {
1230+ explanation : "The emulator does not yet implement opcode EXA" . to_string ( ) ,
1231+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/143" ,
1232+ } ,
1233+ } ) ,
1234+ Opcode :: Ins => Err ( Alarm {
1235+ sequence : control. regs . k ,
1236+ details : AlarmDetails :: ROUNDTUITAL {
1237+ explanation : "The emulator does not yet implement opcode INS" . to_string ( ) ,
1238+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/26" ,
1239+ } ,
1240+ } ) ,
1241+ Opcode :: Com => Err ( Alarm {
1242+ sequence : control. regs . k ,
1243+ details : AlarmDetails :: ROUNDTUITAL {
1244+ explanation : "The emulator does not yet implement opcode COM" . to_string ( ) ,
1245+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/27" ,
1246+ } ,
1247+ } ) ,
1248+ Opcode :: Cya | Opcode :: Cyb | Opcode :: Cab => Err ( Alarm {
1249+ sequence : control. regs . k ,
1250+ details : AlarmDetails :: ROUNDTUITAL {
1251+ explanation : "The emulator does not yet implement opcode {opcode}"
1252+ . to_string ( ) ,
1253+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/24" ,
1254+ } ,
1255+ } ) ,
1256+ Opcode :: Noa => Err ( Alarm {
1257+ sequence : control. regs . k ,
1258+ details : AlarmDetails :: ROUNDTUITAL {
1259+ explanation : "The emulator does not yet implement opcode NOA" . to_string ( ) ,
1260+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/22" ,
1261+ } ,
1262+ } ) ,
1263+ Opcode :: Nab => Err ( Alarm {
1264+ sequence : control. regs . k ,
1265+ details : AlarmDetails :: ROUNDTUITAL {
1266+ explanation : "The emulator does not yet implement opcode NAB" . to_string ( ) ,
1267+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/23" ,
1268+ } ,
1269+ } ) ,
1270+ Opcode :: Add => Err ( Alarm {
1271+ sequence : control. regs . k ,
1272+ details : AlarmDetails :: ROUNDTUITAL {
1273+ explanation : "The emulator does not yet implement opcode ADD" . to_string ( ) ,
1274+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/28" ,
1275+ } ,
1276+ } ) ,
1277+ Opcode :: Sca => Err ( Alarm {
1278+ sequence : control. regs . k ,
1279+ details : AlarmDetails :: ROUNDTUITAL {
1280+ explanation : "The emulator does not yet implement opcode SCA" . to_string ( ) ,
1281+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/19" ,
1282+ } ,
1283+ } ) ,
1284+ Opcode :: Scb => Err ( Alarm {
1285+ sequence : control. regs . k ,
1286+ details : AlarmDetails :: ROUNDTUITAL {
1287+ explanation : "The emulator does not yet implement opcode SCB" . to_string ( ) ,
1288+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/20" ,
1289+ } ,
1290+ } ) ,
1291+ Opcode :: Sab => Err ( Alarm {
1292+ sequence : control. regs . k ,
1293+ details : AlarmDetails :: ROUNDTUITAL {
1294+ explanation : "The emulator does not yet implement opcode SAB" . to_string ( ) ,
1295+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/21" ,
1296+ } ,
1297+ } ) ,
1298+ Opcode :: Tly => Err ( Alarm {
1299+ sequence : control. regs . k ,
1300+ details : AlarmDetails :: ROUNDTUITAL {
1301+ explanation : "The emulator does not yet implement opcode TLY" . to_string ( ) ,
1302+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/32" ,
1303+ } ,
1304+ } ) ,
1305+ Opcode :: Div => Err ( Alarm {
1306+ sequence : control. regs . k ,
1307+ details : AlarmDetails :: ROUNDTUITAL {
1308+ explanation : "The emulator does not yet implement opcode DIV" . to_string ( ) ,
1309+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/31" ,
1310+ } ,
1311+ } ) ,
1312+ Opcode :: Mul => Err ( Alarm {
1313+ sequence : control. regs . k ,
1314+ details : AlarmDetails :: ROUNDTUITAL {
1315+ explanation : "The emulator does not yet implement opcode MUL" . to_string ( ) ,
1316+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/30" ,
1317+ } ,
1318+ } ) ,
1319+ Opcode :: Sub => Err ( Alarm {
1320+ sequence : control. regs . k ,
1321+ details : AlarmDetails :: ROUNDTUITAL {
1322+ explanation : "The emulator does not yet implement opcode SUB" . to_string ( ) ,
1323+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/29" ,
1324+ } ,
11721325 } ) ,
11731326 }
11741327 }
@@ -1344,9 +1497,15 @@ impl ControlUnit {
13441497 // we don't know what the TX-2 did in this case.
13451498 Err ( self . alarm_unit . always_fire ( Alarm {
13461499 sequence : self . regs . k ,
1347- details : AlarmDetails :: ROUNDTUITAL ( format ! (
1500+ details : AlarmDetails :: ROUNDTUITAL {
1501+ explanation : format ! (
13481502 "memory unit indicated address {operand_address:o} is not mapped and we don't know what to do when QSAL is masked" ,
1349- ) )
1503+ ) ,
1504+ // Note: there are two different ways in which
1505+ // we can raise a ROUNDTUITAL alarm referring
1506+ // to this bug report URL.
1507+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/142" ,
1508+ }
13501509 } ) )
13511510 }
13521511 Err ( MemoryOpFailure :: ReadOnly ( _, _) ) => unreachable ! ( ) ,
@@ -1508,10 +1667,16 @@ impl ControlUnit {
15081667 // QSAL is masked. I don't know what the TX-2 did in this situation.
15091668 return Err ( self . alarm_unit . always_fire ( Alarm {
15101669 sequence : self . regs . k ,
1511- details : AlarmDetails :: ROUNDTUITAL ( format ! (
1512- "we don't know how to handle {} when QSAL is masked" ,
1513- msg( )
1514- ) ) ,
1670+ details : AlarmDetails :: ROUNDTUITAL {
1671+ explanation : format ! (
1672+ "we don't know how to handle {} when QSAL is masked" ,
1673+ msg( )
1674+ ) ,
1675+ // Note: there are two different ways in
1676+ // which we can raise a ROUNDTUITAL alarm
1677+ // referring to this bug report URL.
1678+ bug_report_url : "https://github.com/TX-2/TX-2-simulator/issues/142" ,
1679+ } ,
15151680 } ) ) ;
15161681 }
15171682 Ok ( ( word, extra) ) => {
0 commit comments