:: 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 foo set log foo :: Limit maximum diagnostic execution time runlimit 2 minutes 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 :: Instruction Test 3 :: maindec-12-d0cb-pb Instruction Test 3 :: Also tests extended (banked) memory. echof "** PDP-12: Instruction Test 3: " load tests/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 go -q 400 e pc,l,ac,mq,4004,4005,4006,4007,4010,4012,if,df,flo,done if (PC != 05463) echof "MAINDEC-12-D0CB failed."; exit 1 echof echof "** PDP-12: Instruction Test 3: " echof "passed." q # Trace the whole diagnostic #br 0000-7777;e l,ac,mq,4004,4005,4006,4007,4010,4012,4673,4702,if,df,uf,done,int,enable;c :: 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