The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
249 views
Consider the following program segment used to execute on a hypothetical processor. Consider all the registers are of 16 bit size

I1 MOV CX,0005 ; CX ← 0005

I2 MOV BX,OFF7H ; BX ← OFF7H

I3 MOV AX,OBCAH ; AX ← OBCAH

I4 OR BX,AX ; BX ← BX (OR) AX

I5 AND DX,AX ; DX ← DX (AND) AX

I6 LOOP I3 ; LOOP till CX = 0

Processor clock frequency is 1 MHz. In which data transfer operations takes 6 cycles, data manipulation operations takes 4 cycles and transfer of control operations takes 2 cycles to execute. How much time is required to execute the program on a above CPU?
in CO and Architecture by Active (1.5k points) | 249 views
0
108 micro sec...??
+3
No. of cycles = 6+6 + 5(6+4+4+2) =92 ?
0
Minipanda ... dont  we have to do CX from 1 to 0 ...means loop should run upto 0 ...pls correct me if i am wrong ..
0
I am also having this doubt :P

But i think you are correct
0
92 is the correct one.
0

@MiNiPanda 

where we are modifying value of CX ?

0

Dharmendra Lodhi

I think the decrement was implicitly taking place since they didn't mention any operation

0
ok

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,093 questions
55,333 answers
190,852 comments
86,257 users