1107
1107
#define BOOT_LEN (sizeof (boot_rom) / sizeof (int16))
1109
1109
static const uint16 boot_rom[] = {
1111
0012706, BOOT_START, /* MOV #boot_start, SP */
1112
0012700, 0000000, /* MOV #unit, R0 ; unit number */
1113
0010003, /* MOV R0, R3 */
1114
0000303, /* SWAB R3 */
1115
0012701, 0177342, /* MOV #TCCM, R1 ; csr */
1116
0012702, 0004003, /* RW: MOV #4003, R2 ; rev+rnum+go */
1117
0050302, /* BIS R3, R2 */
1118
0010211, /* MOV R2, (R1) ; load csr */
1119
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1120
0001775, /* BEQ .-4 */
1121
0100370, /* BPL RW ; no err, cont */
1122
0005761, 0177776, /* TST -2(R1) ; end zone? */
1123
0100036, /* BPL ER ; no, err */
1124
0012702, 0000003, /* MOV #3, R2 ; rnum+go */
1125
0050302, /* BIS R3, R2 */
1126
0010211, /* MOV R2, (R1) ; load csr */
1127
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1128
0001775, /* BEQ .-4 */
1129
0100426, /* BMI ER ; err, die */
1130
0005761, 0000006, /* TST 6(R1) ; blk 0? */
1131
0001023, /* BNE ER ; no, die */
1132
0012761, 0177000, 0000002, /* MOV #-256.*2, 2(R1) ; load wc */
1133
0005061, 0000004, /* CLR 4(R1) ; clear ba */
1134
0012702, 0000005, /* MOV #READ+GO, R2 ; read & go */
1135
0050302, /* BIS R3, R2 */
1136
0010211, /* MOV R2, (R1) ; load csr */
1137
0005002, /* CLR R2 */
1138
0005003, /* CLR R3 */
1139
0012704, BOOT_START+020, /* MOV #START+20, R4 */
1140
0005005, /* CLR R5 */
1141
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1142
0001775, /* BEQ .-4 */
1143
0100401, /* BMI ER ; err, die */
1144
0005007, /* CLR PC */
1145
0012711, 0000001, /* ER: MOV #1, (R1) ; stop all */
1111
0012706, BOOT_START, /* MOV #boot_start, SP */
1112
0012700, 0000000, /* MOV #unit, R0 ; unit number */
1113
0010003, /* MOV R0, R3 */
1114
0000303, /* SWAB R3 */
1115
0012701, 0177342, /* MOV #TCCM, R1 ; csr */
1116
0012702, 0004003, /* RW: MOV #4003, R2 ; rev+rnum+go */
1117
0050302, /* BIS R3, R2 */
1118
0010211, /* MOV R2, (R1) ; load csr */
1119
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1120
0001775, /* BEQ .-4 */
1121
0100370, /* BPL RW ; no err, cont */
1122
0005761, 0177776, /* TST -2(R1) ; end zone? */
1123
0100036, /* BPL ER ; no, err */
1124
0012702, 0000003, /* MOV #3, R2 ; rnum+go */
1125
0050302, /* BIS R3, R2 */
1126
0010211, /* MOV R2, (R1) ; load csr */
1127
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1128
0001775, /* BEQ .-4 */
1129
0100426, /* BMI ER ; err, die */
1130
0005761, 0000006, /* TST 6(R1) ; blk 0? */
1131
0001023, /* BNE ER ; no, die */
1132
0012761, 0177000, 0000002, /* MOV #-256.*2, 2(R1) ; load wc */
1133
0005061, 0000004, /* CLR 4(R1) ; clear ba */
1134
0012702, 0000005, /* MOV #READ+GO, R2 ; read & go */
1135
0050302, /* BIS R3, R2 */
1136
0010211, /* MOV R2, (R1) ; load csr */
1137
0005002, /* CLR R2 */
1138
0005003, /* CLR R3 */
1139
0012704, BOOT_START+020, /* MOV #START+20, R4 */
1140
0005005, /* CLR R5 */
1141
0032711, 0100200, /* BIT #100200, (R1) ; wait */
1142
0001775, /* BEQ .-4 */
1143
0100401, /* BMI ER ; err, die */
1144
0005007, /* CLR PC */
1145
0012711, 0000001, /* ER: MOV #1, (R1) ; stop all */
1149
1149
t_stat dt_boot (int32 unitno, DEVICE *dptr)