8) The difference between the SUB and CMP instructions a) Only the SUB instruction alters the flags but not the operands b) The SUB and CMP instructions both alter the flags and operands c) The SUB and CMP instructions both alter the operands but not the flags d) Only the SUB instruction alters both the operands and the flags 9) Where is the product located when two 8-bit numbers are multiplied? a) AX b) AL:DL c) AX:DX d) EAX:EDX 10) Where is the remainder located when two 16-bit numbers are divided? a) AL b) DL c) AX d) DX 11) In the code below, on which line is a jump to L5 going to happen? 1: mov edx,-1 2: cmp edx,0 3: jl L5 4: jnle L5 5: jnl L5 a) 2 b) 3 c) 4 d) 5 12) In the code below, on which line is a jump to L5 going to happen? 1: mov bx, +32 2: cmp bx,-35 3: jng L5 4: jge L5 5: jnge L5 a) 2 b) 3 c) 4 d) 5 13) Convert the number 28.25 to a single-precision IEEE 754 format number. a) 0 10000001 11000100000000000000000 b) 0 10000011 11000100000000000000000 c) 0 10000010 11000100000000000000000 d) 0 10000011 10000100000000000000000
Added by Victoria M.
Close
Step 1
The SUB instruction subtracts the source operand from the destination operand and stores the result in the destination operand, while also altering the flags. The CMP instruction, on the other hand, compares two operands by performing a subtraction operation but Show more…
Show all steps
Your feedback will help us improve your experience
Adi S and 71 other Physics 102 Electricity and Magnetism educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
'Q: Compute the physical address for the specified operand in each of the following instructions The register contents and variable are as follows: (CS)-OAOOH, (DS)-OBOOH, (SS)-ODOOH (Si)-OFFOH, (DI)=OOBOH, (BP)-OOEAH and (IP)-OOOOH, LIST-OOFOH, AX-4020H, BX-2SOOH: 1) Destination operand of the instruction MOV LIST [BP+DI] , AX 2) Source operand of the instruction MOV CL , [BX+2OOH] 3) Destination operand of the instruction MOV [Dl+6400H] , DX 4) Source operand of the instruction MOV AL, [BP+SI-4OOH] 5) Destination operand of the instruction MOV [Dl+SP] AX 6) Source operand of the instruction MOV CL , [SP+ZOOH] 7) Destination operand of the instruction MOv [BX+Dl+6400H] CX 8) Source operand of the instruction MOV AL , [BP- O2O0H] 9) Destination operand of the instruction MOv [SI] , AX 10) Destination operand of the instruction MOV [BXJ[DI]+O4OOH,AL 11) Source operand of the instruction MOV AX, [BP+ZOOH] 12) Source operand of the instruction MOV AL, [SI-O1OOH] 13) Destination operand of the instruction MOV DI; [SI] 14) Destination operand of the instruction MOV [DI]+CFOOH,AH 15) Source operand of the instruction MOV CL, LIST[BX+ZOOH]'
Sri K.
1. To compare the source and destination operands, the CMP instruction performs subtraction between the operands. a. Subtraction b. Addition 2. This addressing mode uses a register to hold the actual address that identifies either the source or the destination to be used in the data transfer. a. Direct b. Indirect 3. The project that produced the first microprocessor originated in 1969 and was conceptualized by the company. a. BUSICOM b. Intel 4. The following features are first introduced in the Intel Pentium processor except: a. Branch Prediction b. Superscalar Capability c. Cache Memory d. None of the Choices 5. In protected mode, a selector value gives the following segment information EXCEPT: a. base address b. ending address c. access rights byte d. none of the choices
Adi S.
Question 2 Transform the following "C" program into assembly for the 6808 Microcontroller. Remember when converting this "C" code to follow best practices covered in DEF in terms of implementing subroutines in assembly. This means that parameters are passed on the stack to subroutines. Return values are passed back on the stack. You clean up the stack after every use (every subroutine call) to prepare it for the next call. Keep in mind that once you have translated this program into assembly, you can step through it to ensure that it behaves correctly and calculates the expected results. /* ------------------------------------------------------------- PURPOSE: This program will take 2 operand values and calculate the sum and difference of the values ------------------------------------------------------------- */ // This function calculates the sum of 2 operands called "A" and "B" int calculateSum(int A, int B) { return (A + B); } // This function calculates the difference between 2 operands by negating B and adding it to A int calculateDifference(int A, int B) { return (calculateSum(A, -B)); // reuse the calculateSum function } void main(void) { int firstOperand = 18; // to be stored at address $80 within the 6808 int secondOperand = 8; // to be stored at address $81 within the 6808 int sum = 0; // to be stored at address $84 within the 6808 int difference = 0; // to be stored at address $86 within the 6808 // call the calculateSum function in order to calculate the total and store it in the "sum" variable sum = calculateSum(firstOperand, secondOperand); // call the calculateDifference function in order to calculate the difference and store it in the "difference" variable difference = calculateDifference(firstOperand, secondOperand); }
Supreeta N.
Recommended Textbooks
University Physics with Modern Physics
Physics: Principles with Applications
Fundamentals of Physics
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD