Обнаружена ошибка в коде BSTRAP.MAC RT-11 v05.07, приводящая к неправильной начальной установке некоторых старых драйверов:
Код:
CHK64: ADD #<H.UNIT>,R2 ;Point to 64 unit owner flag
TST (R2)+ ;is it zero?
BEQ 20$ ;If yes, branch, no 64 unit support
MOV @R2,R2 ;Get 64 unit word (H.64UM)
BIC #^c<HUM.64>,R2 ;Isolate HUM.64 bits. Are they zero?
BEQ 20$ ;If yes, branch, no 64 unit support
CMP R2,#<^rZ > ;Is it a letter?
BHI 20$ ;If not, branch, no 64 unit support
CMP R0,SYBLK ;Is this SY?
BNE 10$ ;If not, branch
MOV R2,SY64 ;Save the SY 1 letter device name
10$: TST (PC)+ ;Skip over error return
20$: SEC ;Error return
RETURN ;from whence we came
При этом команда INSTALL в коде KMOVLY.MAC работает правильно:
Код:
.IF EQ <OWN$ER & UNI$64>
CLR $HSIZE-$RMON(R0) ;Clear the handler size entry
CMP @R4,#<^rHAN> ;Is this a new style handler?
BNE 90$ ;Nope
TST H.UNIT(R4) ;Does handler support extended units?
BEQ 90$ ;Nope
SUB #<32.>,$HSIZE-$RMON(R0) ;Cut off the extended ownership table
90$: ADD #<H.SIZ>,R4 ;Point to handler parameters
ADD (R4)+,$HSIZE-$RMON(R0) ;Put handler size in $HSIZE table
.IFF ;EQ <OWN$ER & UNI$64>
ADD #<H.SIZ>,R4 ;Point to handler parameters
MOV (R4)+,$HSIZE-$RMON(R0) ;Put handler size in $HSIZE table
.ENDC ;EQ <OWN$ER & UNI$64>
Исправленный код BSTRAP.MAC выглядит так:
Код:
CHK64: CMP @R2,#<^rHAN> ;Is this a new style handler?
BNE 20$ ;Nope
ADD #<H.UNIT>,R2 ;Point to 64 unit owner flag
TST (R2)+ ;is it zero?
BEQ 20$ ;If yes, branch, no 64 unit support
MOV @R2,R2 ;Get 64 unit word (H.64UM)
BIC #^c<HUM.64>,R2 ;Isolate HUM.64 bits. Are they zero?
BEQ 20$ ;If yes, branch, no 64 unit support
CMP R2,#<^rZ > ;Is it a letter?
BHI 20$ ;If not, branch, no 64 unit support
CMP R0,SYBLK ;Is this SY?
BNE 10$ ;If not, branch
MOV R2,SY64 ;Save the SY 1 letter device name
10$: TST (PC)+ ;Skip over error return
20$: SEC ;Error return
RETURN ;from whence we came