Gate 2003 pyq CAO | Consider the following assembly language program for a hypothetical ....
Автор: Gate CS pyqs - the other way[Hin]
Загружено: 2022-03-07
Просмотров: 643
Описание:
Consider the following assembly language program for a hypothetical processor A,B, and C are 8−bit registers. The meanings of various instructions are shown as comments.
Z: MOV B, #0; ;B←0
MOV C, #8; ;C←8
CMP C, #0 ; ;compare C with 0
JZ X; ;jump to X if zero flag is set
SUB C, #1; ;C←C−1
RRC A, #1; ;right rotate A through carry by one bit.
JC Y; .jump to Y if carry flag is set
JMP Z; jump to Z
Y: ADD B, #1; B←B+1
JMP Z; jump to Z
X:
If the initial value of register A is A0 the value of register B after the program execution will be
a)the number of 0 bits in A0
b)the number of 1 bits in A0
c)A0
d)8
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: