write an assembly code which can call function in a loop
with al value from 0 to 9

Answers were Sorted based on User's Feedback



write an assembly code which can call function in a loop with al value from 0 to 9..

Answer / laxman

org 00h
mov r0,#09
mov r1,#01
loop : acall func; ; calling function in loop 9-0 times
djnz r0,loop


func : inc r1 ; output will be in r1 register
ret

end


if any thing plz mail to me laxman_balu@hotmail.com

Is This Answer Correct ?    8 Yes 1 No

write an assembly code which can call function in a loop with al value from 0 to 9..

Answer / dinesh kumar.r

MVI B,00
MVI C,OA
LOOP:
INR B
DCR C
SUB C
JNZ LOOP
HLT

Is This Answer Correct ?    2 Yes 1 No

write an assembly code which can call function in a loop with al value from 0 to 9..

Answer / sivasyam

mov ro,#10h

here:
acall fun
inc a1
djnz ro,here

Is This Answer Correct ?    5 Yes 5 No

write an assembly code which can call function in a loop with al value from 0 to 9..

Answer / sridevi

Mr.Lakshman, I found some changes in your code. Hope this is OK.

org 00h
mov r0,#00
mov r1,#00
loop : acall func
inc r0
cjne r0,#09,loop
jmp pgmend

func: inc r1
ret

pgmend:
end

Is This Answer Correct ?    2 Yes 2 No

write an assembly code which can call function in a loop with al value from 0 to 9..

Answer / pk

xor ax, ax
loop1:
call foo
inc al
cmp ax, 10
jb loop1

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More 86 Family Interview Questions

What is sim and rim instructions?

0 Answers  


Explain what is the difference between isr & function call?

0 Answers  


What are the different addressing modes in 8085?

25 Answers   Rambala Exports, Syntel,


The answer to the above question is breaking the combinational circuit and pipelining it. What will be affected if you do this?

0 Answers  


What does the out instruction do, define its format?

0 Answers  






What are the various interrupts in 8086?

0 Answers  


State the two type of 16 bit registers and define them?

0 Answers  


Mention the types of interrupts that 8085 supports?

0 Answers  


what type of registers contains an (INTEL) CPU?

2 Answers  


Where 8086 mostly used & tell application of 8086?

0 Answers  


Define the types of memory used in 8085 microprocessor?

0 Answers  


Explain the different modes of operations of the 8086?

0 Answers  


Categories