Question

Comment and show the result and how the flag register (CF, PF, SF, ZF) is affected...

Comment and show the result and how the flag register (CF, PF, SF, ZF) is affected after following.

MOV AL, 05H

MOV BL, 0FH

MUL BL

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

IN FLAG REGISTER,

SIGN FLAG ( SF ) = 1 ( IF MOST SIGNIFICANT BIT  OF ALU RESULT IS 1 ),

ZERO FLAG ( ZF ) = 1 ( IF ALU RESULT IS EQUAL TO 00H),

PARITY FLAG ( PF ) = 1 ( IF RESULT HAS EVEN NUMBER OF 1'S),

CARRY FLAG ( CF ) = 1 ( IF ADDITION OF TWO NUMBER CAUSE A CARRY OUT OF MOST SIGNIFICANT (LEFTMOST) BITS ADDED )

( MOV AL, 05H ) WILL STORE O5H IN AL REGISTER

( MOV BL, 0FH ) WILL STORE OFH IN BL REGISTER

(MUL BL ) WILL PERFORM MULTIPLICATION OF AL AND BL REGISTER AND STORE THE RESULT BACK IN AL REGISTER.

AFTER PERFORMING THE CODE ( MUL BL ) , AL WILL CONTAIN 4BH.

4BH CAN BE WRITTEN AS 01001011 IN HEXADECIMAL.

SINCE THE MOST SIGNIFICANT BIT IS 0, SO SF = 0.

SINCE THE RESULT IS NOT ZERO , SO ZF = 0.

SINCE RESULT CONTAIN ODD NUMBER OF 1'S, SO PF = 0.

SINCE NO CARRY OR BORROW IS DONE SO, CF = 0

Add a comment
Know the answer?
Add Answer to:
Comment and show the result and how the flag register (CF, PF, SF, ZF) is affected...
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
  • Need help just the answers In the following instruction sequence, show the changed values of AL...

    Need help just the answers In the following instruction sequence, show the changed values of AL where indicated, in binary; a. _____ b. ____ c. ____ d. ______ In the following instruction sequence. show the changed values of AL where indicated, in hexadecimal: a. ____ b. ____ c. _____ d. ____ In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where indicated: a. CF = ___ ZF = ___ SF = ____ b. CF...

  • ASSEMBLY LANGUAGE. For each problem, show the contents or setting of the requested item after executing...

    ASSEMBLY LANGUAGE. For each problem, show the contents or setting of the requested item after executing the instructions. 1. mov eax,0 mov al,5 mov bl,11 mul bl - Show the hexadecimal digits in eax: - Show the carry flag value:    - Show the overflow flag value:      mov eax,0 mov edx,0 mov ax,5h mov bx,20h mul bx - Show the hexadecimal digits in eax: - Show the hexadecimal digits in edx: - Show the carry flag value: - Show the...

  • In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where...

    In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where indicated: mov al, 00001111b test al, 00000010b mov al, 00000110b cmp al, 00000101b (Hint: type in your answer as CF = ZF = SF = ___)

  • Assume that the registers have the following values (all in hex) and that CS= 1000, DS...

    Assume that the registers have the following values (all in hex) and that CS= 1000, DS = 2000, SS=3000, SI=4000, DI = 5000, BX=6080, BP= 7000, AX=25FF, CX=8791, and DX=1299. Calculate the physical address of the memory where the operand is stored and the contents of the memory locations in each of the addressing examples. a) MOV [SI], AL b) MOV [SI+BX+8], AH c) MOV [BX]+300, DX Now Examine the status of the CF, PF, AF, ZF, and SF if...

  • Need help on Assembly language 1.Solve the following conditions: A. Suppose AL contains 11001011 and CF...

    Need help on Assembly language 1.Solve the following conditions: A. Suppose AL contains 11001011 and CF = 1.    Give the new contents of AL after each of the following instructions is executed.    Assume the above initial conditions for each part of this question. a. SHL AL,1 b. SHR AL,1 c. ROL AL,2 d. ROR AL,3 e. SAR AL,2 f. RCL AL,1 g. RCR AL,3 B. Suppose EAX contain ABCDH.    Show the contents of BX and CX after...

  • 1. Registry conditions:         A. Show how the decimal integer          * -120 would be stored...

    1. Registry conditions:         A. Show how the decimal integer          * -120 would be stored in 16 bits          * -120 would be stored in 8 bits          * -32456 would be stored in 32 bits          * -32456 would be stored in 16 bits         B. For each of the following decimal numbers, tell whether it could be         stored (1) as a 16-bit number (2) as an 8-bit number.          * 32768          * -40000          *...

  • 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...

  • 13. In 32-bit mode, if EBX is holding 0x004105BC, answer the following questions: a. How many...

    13. In 32-bit mode, if EBX is holding 0x004105BC, answer the following questions: a. How many bytes can the register EBX hold? b. How many bits can the register EBX hold? c. What is the hexadecimal value in the register BX? d. What is the hexadecimal value in the register BL?_ e. What is the hexadecimal value in the register BH? 14. In an 8-bit register, will 01111111 +00000001 cause the Carry Flag to set? Show the calculated result and...

  • Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at...

    Section B - ARM Assembly Language (25 marks) An ARM instruction set summary is provided at the end of this paper 1. (5 marks) Consider the following assembly instruction STMFD r13!, (r5-6} Before executing this instruction, registers hold the following values: Register Value Register r9 Value r4 0x00400040 0x00000000 r5 r10 0x11223344 0x00800080 r6 0x55667788 r11 0x10001000 r7 0x99aabbcc r12 0x20002000 r8 exddeeff00 r13 ex40004000 What memory locations are affected after executing the above instruction? In a table, with a...

  • 1) Assume the registers are initialized to the indicated values: Se al A c and code...

    1) Assume the registers are initialized to the indicated values: Se al A c and code frogments MUST use 32 ぁ ar movennes (anor be "nedfra-ne ibrary function or procedural calls ino- Pe Peue c for ll codr ond code frogments only othu ey document your code with Comments unless the code size is Drow Fow Chort for any flow of control involving branches and loops Use PoCedures as modules to organize most of the code and code fragments. In...

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