:: pdp12_test.ini :: :: Run the paper tape-based diagnostics for the PDP-12 simulator. :: :: :: Script is where the diagnostics ought to reside as well. cd %~p0 !rm pdp12_test.log set log pdp12_test.log :: Limit maximum diagnostic execution time runlimit 1500M instructions set on on error ignore on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; exit 1 :: Maximum memory, extended address element: set cpu 32k set cpu eae :: PDP-12 CP Test 2: Skip and Data Handling (D0AB) :: This test halts after the first 3 instructions to let the :: operator verify that HLT and CLA works before continuing :: onto the real tests. :: maindec-12-d0ab-pb Instruction Test 2 # Set 6 sense switches to all ones. d sns 77 echof -n "** PDP-12: CP Test (2): " load diags/maindec-12-d0ab-pb.bin :: Patch address 5276 with HLT to stop execution after a :: full pass is done or else it will run forever. dep 7415 7402 dep sr 07777 run -q 20 #e PC if (PC != 00023 || AC != 0) echof "MAINDEC-12-D0AB failed."; exit 1 go -q if (PC != 00027 || AC != 07777) echof "MAINDEC-12-D0AB failed."; exit 1 go -q #e pc,mq,l,ac,0001 if (PC != 07416) echof "MAINDEC-12-D0AB failed."; exit 1 #echof -n "** PDP-12: CP Test (2): " echof "passed" :: PDP-12 CP Test 1: LINC Instruction Test 1 (D0BA) :: maindec-12-d0ba-pb Instruction Test 1 echof -n "** PDP-12: LINC Instruction Test (1): " load diags/maindec-12-d0ba-pb.bin :: Patch address 5103 with HLT to stop execution after a :: full pass is done or else it will run forever. dep 5103 0000 dep sr 7777 dep lsr 7777 # Start in LINC mode. #d linc 1 #go -q 4020 # For now, force a LINC instruction at 4017. dep 4017 6141 run -q 4017 #e PC if (PC != 04023 || AC != 0) echof "MAINDEC-12-D0BA failed."; exit 1 go -q #e 0001,4004,4006,4007,4010,4013 if (PC != 05104) echof "MAINDEC-12-D0BA failed."; exit 1 #echof -n "** PDP-12: LINC Instruction Test (1): " echof "passed" :: Instruction Test 3 :: maindec-12-d0cb-pb Instruction Test 3 :: Also tests extended (banked) memory. echof -n "** PDP-12: Instruction Test 3: " load diags/maindec-12-d0cb-pb.bin :: Patch address 5462 with HLT. dep 5462 0000 :: Set SR5 to test a PDP-12B or PDP-12C. :: (PDP-12A has most features, PDP-12C least.) dep sr 0100 #dep sr 0000 # Start in PDP mode. d linc 0 run -q 400 #e pc,l,ac,mq if (PC != 05463) echof "MAINDEC-12-D0CB failed."; exit 1 #echof -n "** PDP-12: Instruction Test 3: " echof "passed." q :: Random AND tests echof -n "** PDP-12: Random AND test: " load diags/maindec-8e-d0db-pb.bin :: Halt after one 4096 loop pass, suppress output dep sr 02400 go -q 200 if (PC != 00355) echof "MAINDEC-12-D0DB failed."; exit 1 echof "passed." :: Random TAD tests echof -n "** PDP-12: Random TAD test: " load diags/maindec-8e-d0eb-pb.bin :: Patch 6743 with HLT to stop the test after 4096 iterations. Would :: normally output a "T" until machine halted. dep 6743 7402 :: Suppress output dep sr 00400 go -q 200 if (PC != 06744) echof "MAINDEC-12-D0EB failed."; exit 1 echof "passed." :: Random ISZ tests :: Bit more of a challenge: cant just put a HLT instruction to :: terminate the test loop. And cant squelch the output either. if (SIM_REGEX_TYPE == "") echof "Missing Regular Expression support - skipping Random ISZ test\n"; goto ISZ_DONE echof "** PDP-8: Random ISZ test: " load diags/maindec-8e-d0fc-pb.bin dep sr 0 expect -r [25] "\r\nFC" echof; echof "** PDP-8: Random ISZ test: passed." expect -r "F [0-7]{4}" echof; echof "** PDP-8: Random ISZ test: MAINDEC-12-D0FC failed."; exit 1 go -q 200 :ISZ_DONE :: Random DCA tests echof -n "** PDP-8: Random DCA test: " load diags/maindec-8e-d0gc-pb.bin :: Patch 0404 with HLT to stop the test after 28,328 iterations (one complete pass) dep 0404 7402 dep sr 0 go -q 200 if (PC != 0405) echof "MAINDEC-12-D0GC failed."; exit 1 echof "passed." echof echof "!! All Tests Passed !!" echof exit 0 maindec-08-dhkab-a d0db-pb Random AND maindec-08-dikaa-b d0eb-pb Random TAD d0fc-pb Random ISZ d0gc-pb Random DCA