Для задачи A:if a>0then ifb>c thena↑2else d×a×b else (d-e)×fB:=if a×b>0 then A×x else 0
представьте программы линейных участков в безадресной форме. Составьте план использования неограниченного числа быстрых регистров (СОЗУ) для хранения промежуточных результатов счета. Сколько регистров потребуется?
(Отметьте один правильный вариант ответа.)
Варианты ответа
if a0 then if bc> then a↑2 else dab×× else de- f× ЗnА; if ab×0> then Ax×else 0 → if r1 then if r2 then r3 else dr4× else r5 f×ЗnА; if r6 0>then r7 else 0 ЗnВ → if r1 then if r2 then r3 else r8 else r2 ЗnА; if r9 then r7 else 0 ЗnВ → if r1 then r10 else r9 ЗnА; ЗnВ.Требуется 10 быстрых регистров
if a0 then if bc> then a2 else dab××else de- f×ЗnА; if ab×0> then Ax×else 0 → if r1 then if r2 then r3 else dr4×else r5 f×Зnr6; if r7 0>then r8 else 0 ЗnВ → if r1 then if r2 then r3 else r9 else r10 Зnr6; if r11 then r8 else 0 ЗпВ → if r1 then r12 else r10 ЗnА; ЗпВ.Требуется 12 быстрых регистров
if a0 then if bc> then a↑2 else dab×× else de- f× ЗnА; if ab×0> then Ax×else 0 → if r1 then if r2 then r3 else dr4× else r5 f× ЗnА; if r6 0>then r7 else 0 ЗnВ → if r1 then if r2 then r3 else r8 else r9 ЗnА; if r10 then r7 else 0 ЗпВ → if r1 then r11 else r9 ЗnА; ЗnВ.Требуется 11 быстрых регистров(Верный ответ)