Question

MOV AX, O MOV CX, 5 MOV BX, 3 MOV DX, 16 INC BX ADD AX, BX LOOP L1 L1: What is the value of AX, how many cycle is the loop?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The value of AX will be 30, and the no. of times the loop will run is 5 times.

Explanation:

The loop instruction will decrements cx and jump to label if cx is not equal to zero.

As cx is set to 5, the loop will decrement cx 5 times to become 0, hence the loop will run 5 times.

Also in the Loop the register BX is increamented and Added to AX, hence AX value after 5 loops will be

AX = 4+5+6+7+8 = 30

Add a comment
Know the answer?
Add Answer to:
MOV AX, O MOV CX, 5 MOV BX, 3 MOV DX, 16 INC BX ADD AX,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Explain what does the following program do. c) MOV DX,0 MOV BL, E MOV CX,FF し1: MOV Ax.cx DIV BL...

    by using 8086 microprocessor Explain what does the following program do. c) MOV DX,0 MOV BL, E MOV CX,FF し1: MOV Ax.cx DIV BL CMP AH,0 JZ L2 TST: LOOP L1 JMP EXIT L2: INC DX JMP TST EXIT: HLT Exit Explain what does the following program do. c) MOV DX,0 MOV BL, E MOV CX,FF し1: MOV Ax.cx DIV BL CMP AH,0 JZ L2 TST: LOOP L1 JMP EXIT L2: INC DX JMP TST EXIT: HLT Exit

  • mov ax, 0 mov bx, 1000H K1 cmp [bx), 2. je K2 inc bx inc ax...

    mov ax, 0 mov bx, 1000H K1 cmp [bx), 2. je K2 inc bx inc ax jmp K1 K2 : hlt Adres Data 1000H 1 1001H 5 1002HB 1003H LA 1004H 2 1005h B 1006H 3 1007HB 1008h 3 1009h А 1010H3 ₂ Ax=....., BX=........

  • Answer based on microprocessor 8086 (10) LEA BX, CX 7. Suppose that (AX)-4AOBH, the content of...

    Answer based on microprocessor 8086 (10) LEA BX, CX 7. Suppose that (AX)-4AOBH, the content of [1020H] storage unit is 260FH. Try to determine the results of the following instructions. (1) MOV AX, 1020H (AX) (2) XCHG AX, [1020H) ; (AX) (3) MOV AX, [1020H) ;(AX)=- (4) LEA AX, [1020H) ; (AX) 10. Suppose the size of the stack segment is 256 bytes. The starting address of the stack is 1250: 0000H, assuming there are 5 word-sized data in the...

  • e) What is the output of following program? MOV AX, 1234 Address Value 1 2000 11...

    e) What is the output of following program? MOV AX, 1234 Address Value 1 2000 11 200122 MOV BX, [2000] PUSH BX INC BX PUSH AX INC BH POP CX OR CX, BX POP AX AND AX, BX INT 05 AX= BX = CX (Show your rough work here)

  • 1. What will be the contents of BX after the following instructions execute? mov bx,5 stc...

    1. What will be the contents of BX after the following instructions execute? mov bx,5 stc mov ax,60h adc bx,ax 2. Describe the output when the following code executes in 64-bit mode: .data dividend_hi QWORD 00000108h dividend_lo QWORD 33300020h divisor QWORD 00000100h .code mov rdx,dividend_hi mov rax,dividend_lo div divisor 3. The following program is supposed to subtract val2 from val1. Find and correct all logic errors (CLC clears the Carry flag): .data val1 QWORD 20403004362047A1h val2 QWORD 055210304A2630B2h result QWORD...

  • You have to put the input to the line(Linea), rectangle(rectangulo), triangle(triangulo) and circle(circulo) in assembly 8086...

    You have to put the input to the line(Linea), rectangle(rectangulo), triangle(triangulo) and circle(circulo) in assembly 8086 please, Same as this code, add that input that I'm asking. Which user of the size and the area where the figure will be located on the screen. .MODEL SMALL   .STACK 100h .DATA    mensaje db 'Seleccione una opcion del siguiente Menu',13, 10        db '1. Dibujar un Circulo', 13, 10        db '2. Dibujar una Linea', 13, 10        db '3. Dibujar un...

  • 37. What is the binary value of AL after the following instructions have mov al,01101011b stc...

    37. What is the binary value of AL after the following instructions have mov al,01101011b stc rcl al,2 38. What is the binary value of AX after the following instructions have executed? mov ax, 0000000010011101b mov bx, 1010101010000000b shld ax, bx,1 39. What is the binary value of AX after the following instructions have executed? mov ax, 0000000010011101b mov bx, 1010101010001011b shrd ax, bx, 2 will be the hexadecimal values of DX and AX after the following instructions have executed?...

  • mov ecx, 5 L1: add eax, 2 loop L1 3. What is the final value of...

    mov ecx, 5 L1: add eax, 2 loop L1 3. What is the final value of myNum? Show your work. [5 points .data myNum BYTE 10h, 20h .code Increment PROC add eax, FFh ret Increment ENDP main PROC movzx eaxX, myNum call Increment mov myNum, al main ENDP

  • 5. Assume DS-1000, CS- 800, Ax-3412H, and BX-0200H. For the following x86 assembly code: MOV [BX...

    5. Assume DS-1000, CS- 800, Ax-3412H, and BX-0200H. For the following x86 assembly code: MOV [BX +1000H], AX a) Translate the assembly code to machine code (in Hex). The opcode of MOV instruction is 100010. b) Show the values of AX, BX, and new values in memory, if there are, in the following figure c) (10 points) AFTER executing the instruction. (5 points) What is the memory address accessed by the instruction, assuming real mode operation? Show it in the...

  • please do not copy from previous posted answer (20pts) 6. Assume that a data segment in...

    please do not copy from previous posted answer (20pts) 6. Assume that a data segment in 80x86 Assembly has the following declarations: dw 1ABBH W х db 16 у db 'wxy' Z dw -26, 11 address 00. Show the values as they would appear in debug. Assume the memory starts Address 00 01 02 03 04 05 06 07 08 09 Value Given the above data segment, play computer with the following code and show the final hexadecimal values of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT