; Dump of M9301-YB boot roms ; 23-038A9, 23-039A9, 23-040A9, 23-041A9 ; This code depends on the fact that when location 173024 is read, ; the M9312 _modifies_ the data on the bus with the contents of S1. ; So treat references to 173024 like references to a register that ; allows S1 to be read. S1LOC = 173024 ; Low bank - contains console emulator, CPU diagnostics, and bootstraps 165000 005000 CLR R0 165002 005002 CLR R2 165004 010703 MOV PC, R3 165006 000441 165010 120227 165012 000015 165014 001440 165016 162702 165020 000070 165022 062702 165024 000010 165026 103017 165030 006300 165032 006300 165034 006300 165036 050200 165040 000760 165042 010701 165044 000755 165046 010015 165050 000167 165052 006176 165054 000005 165056 000115 165060 010701 165062 000746 165064 010005 165066 005004 165070 000767 165072 010500 165074 010701 165076 000403 165100 011500 165102 000401 165104 000761 165106 000167 165110 006460 165112 000167 165114 006376 165116 000167 165120 006624 165122 010402 165124 012201 165126 010506 165130 012716 165132 000012 165134 010004 165136 000005 165140 000112 165142 005316 165144 001373 165146 000000 165150 177404 165152 052704 165154 000010 165156 006304 165160 103376 165162 010461 165164 000006 165166 005004 165170 000403 165172 176714 165174 000304 165176 010411 165200 062704 165202 000005 165204 000431 165206 177342 165210 000410 165212 004011 165214 174002 165216 100000 165220 172522 165222 000403 165224 060017 165226 177772 165230 000200 165232 010203 165234 005723 165236 000304 165240 062304 165242 010421 165244 005311 165246 062704 165250 177772 165252 010441 165254 062304 165256 031311 165260 001776 165262 122341 165264 122321 165266 001325 165270 012761 165272 177000 165274 000002 165276 010411 165300 105711 165302 100376 165304 005711 165306 100006 165310 030405 165312 100313 165314 022761 165316 001000 165320 000014 165322 001307 165324 105011 165326 005007 165330 172040 165332 000406 165334 176700 165336 000404 165340 172440 165342 010405 165344 000407 165346 176300 165350 110061 165352 000010 165354 016105 165356 000026 165360 100017 165362 005005 165364 052705 165366 101300 165370 010561 165372 000032 165374 012711 165376 000007 165400 012761 165402 177777 165404 000006 165406 012711 165410 000031 165412 105761 165414 000012 165416 100375 165420 030527 165422 020000 165424 001405 165426 012711 165430 000021 165432 012761 165434 014000 165436 000032 165440 016161 165442 000016 165444 000016 165446 012704 165450 100071 165452 000706 165454 177500 165456 000304 165460 010411 165462 012703 165464 165540 165466 012704 165470 000375 165472 112305 165474 112311 165476 100407 165500 130511 165502 001776 165504 105204 165506 100772 165510 116114 165512 000002 165514 000771 165516 010103 165520 005711 165522 100607 165524 122737 165526 000240 165530 000000 165532 001203 165534 010300 165536 005007 165540 017640 165542 002415 165544 112024 165546 177170 165550 012704 165552 123667 165554 010003 165556 131700 165560 001001 165562 000304 165564 105711 165566 001776 165570 012705 165572 000003 165574 000261 165576 010411 165600 141704 165602 031104 165604 001776 165606 100744 165610 103405 165612 131104 165614 100341 165616 116125 165620 000002 165622 000767 165624 006205 165626 103363 165630 112761 165632 000001 165634 000002 165636 000761 165640 177560 165642 000401 165644 177550 165646 010115 165650 042705 165652 000024 165654 010515 165656 011503 165660 005211 165662 105711 165664 100376 165666 116113 165670 000002 165672 005215 165674 120327 165676 000375 165700 001366 165702 105223 165704 000143 165706 005015 165710 000044 165712 052124 165714 051504 165716 046515 165720 041515 165722 041104 165724 045504 165726 052104 165730 052115 165732 050104 165734 052103 165736 051120 165740 054104 165742 006523 165744 020105 165746 020104 165750 020114 165752 000000 165754 066320 165756 071560 165760 032156 165762 044103 165764 113075 165766 131722 165770 016426 165772 014021 165774 040524 165776 046102 ; High bank - contains console emulator and CPU diagnostics ; Entry point -- Console emulator w/ Diagnostic ; DIP switches xx11111111 (173000) 173000 000400 BR ; Entry point -- User power fail @24 w/ Diagnostic ; DIP switches xx11111110 (173002) ; CPU Test 1 - Single operand tests 173002 005001 DIAGS: CLR R1 173004 005201 INC R1 173006 005101 COM R1 173010 006201 ASR R1 173012 006301 ASL R1 173014 006001 ROR R1 173016 005701 TST R3 173020 005401 NEG R3 173022 000402 BR 1f 173024 173000 ; Protoype new PC 173026 000340 ; and PS 173030 005301 1: DEC R1 173032 005601 SBC R1 173034 006101 ROL R1 173036 005501 ADC R1 173040 000301 SWAB R1 173042 001377 BNE . ; Loop on failure ; CPU Test 2 - Double operand tests 173044 012702 MOV #DOPDAT, R2 173046 173120 173050 011201 MOV @R2, R1 173052 022201 CMP (R2)+, R1 173054 001377 BNE . ; Loop on failure 173056 063201 ADD @(R2)+, R1 173060 165201 SUB @-(R2), R1 173062 044201 BIC -(R2), R1 173064 056201 BIS 12(R2), R1 173066 000012 173070 037201 BIT @14(R2), R1 173072 000014 173074 001777 BEQ . ; Loop on failure ; CPU Test 3 - Jump tests ; See description in M9301-TM for how these work on different models 173076 012701 MOV #NXT1, R1 173100 173102 173102 000121 NXT1: JMP (R1)+ 173104 012701 MOV #NXT2, R1 173106 173114 173110 000131 JMP @(R1)+ 173112 000111 JMP @R1 173114 173112 NXT2: 173116 000413 BR 173120 173120 DOPDAT: ; Operation test data 173122 173120 173124 100000 SOPDAT: 173126 177777 173130 177777 NOPDAT: 173132 177777 173134 173132 173136 173130 173140 173142 173142 000500 173144 000501 ; CPU Test 4 - Byte single operand tests 173146 105767 TSTB -xxx(PC) ; Should be zero (173yyy) 173150 177752 173152 001377 BNE . ; Loop on error 173154 012702 MOV #SOPDAT, R2 173156 173124 173160 105722 TSTB (R2)+ 173162 001377 BNE . ; Loop on error 173164 105712 TSTB @R2 173166 100377 BPL . ; Loop on error ; CPU Test 5 - Double operand non-modifying tests 173170 012703 MOV #NOPDAT, R3 173172 173130 173174 012702 MOV #NOPDAT+2, R2 173176 173132 173200 021322 CMP @R3, (R2)+ 173202 001377 BNE . ; Loop on error 173204 034342 BIT -(R3), -(R2) 173206 001777 BEQ . ; Loop on error 173210 022767 CMP #DIAGS, xxxx 173212 173002 173214 177606 173216 001003 Bxx .+3 173220 012706 MOV #24, SP 173222 000024 173224 000002 RTI ; Go to power-up handler ; Entry point -- Console emulator w/out Diagnostic ; DIP switches xx10110100 (173226) 173226 010701 MOV PC, R1 173230 000551 173232 010701 173234 000556 173236 010400 173240 000554 173242 010600 173244 000552 173246 010500 173250 000550 173252 012700 173254 165706 173256 112002 173260 010703 173262 000522 173264 001374 173266 010703 173270 000511 173272 000302 173274 001774 173276 005001 173300 020220 173302 001404 173304 005201 173306 005710 173310 001373 173312 000757 173314 012702 173316 172400 173320 156102 173322 165754 173324 006302 173326 020204 173330 001001 173332 005725 173334 010204 173336 020127 173340 000014 173342 103401 173344 000112 173346 010701 173350 000440 173352 005002 173354 000501 173356 022767 173360 173226 173362 177440 173364 001530 173366 012705 173370 173132 173372 012702 173374 000500 173376 011503 173400 005012 173402 112512 173404 005202 173406 112512 173410 005302 173412 023512 173414 001015 173416 005202 173420 143522 173422 024542 173424 143522 173426 001010 173430 011502 173432 016505 173434 177772 173436 110532 173440 150572 173442 000000 173444 020352 173446 001403 173450 000000 173452 000167 173454 171322 173456 012701 173460 173500 173462 011206 173464 005726 173466 004311 173470 000000 173472 004361 173474 000004 173476 000455 173500 005723 173502 001372 173504 021605 173506 001370 173510 000203 173512 000000 173514 105737 173516 177560 173520 100375 173522 105002 173524 153702 173526 177562 173530 105737 173532 177564 173534 100375 173536 110237 173540 177566 173542 022323 173544 142702 173546 000200 173550 000163 173552 177776 173554 012702 173556 005015 173560 010703 173562 000762 173564 000302 173566 000760 173570 000466 173572 012702 173574 000030 173576 000261 173600 006100 173602 106102 173604 010703 173606 000750 173610 012702 173612 020206 173614 006300 173616 001403 173620 106102 173622 103774 173624 000765 173626 105002 173630 000753 173632 005006 173634 012705 173636 017776 173640 005003 173642 010701 173644 000422 173646 012705 173650 160000 173652 012702 173654 000006 173656 005012 173660 010742 173662 012706 173664 000502 173666 005745 173670 012712 173672 173226 173674 021267 173676 177124 173700 001402 173702 010701 173704 000402 173706 000167 173710 171210 173712 010602 173714 010322 173716 020205 173720 101775 173722 005103 173724 020342 173726 001412 173730 010312 173732 020312 173734 001007 173736 020206 173740 101371 173742 005703 173744 001362 173746 022121 173750 000161 173752 177776 173754 010300 173756 011204 173760 010206 173762 000000 173764 047517 173766 051524 173770 027451 173772 006462 173774 020012 173776 020040