Question

x86 Assembly Language:Question 49 5pts Write a short code segment. Make your code as short as possible Create a macro named Mult16 that multiplies

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

Program

; Multiply two 16-bit memory operands, returning
; the 16-bit product in DX:AX. Limitation: The
; <source> argument cannot be AX.

mMult16 macro dest,source
push ax
mov ax,dest ;; AX = destination
mov dx,source ;; DX = source
mul dx ;; DX:AX = product
pop ax
endm

1 ; Multiply two 16-bit memory operands, returning 2 the 16-bit product in DX:AX. Limitation: The 3 ; <source> argument canno

==========================================================================================

Hope this helps!

Please let me know if any changes needed.

Thank you!

I hope you're safe during the pandemic.

Add a comment
Know the answer?
Add Answer to:
x86 Assembly Language: Question 49 5pts Write a short code segment. Make your code as short...
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
  • Assembly language x86 processors in c++ Suppose the content of ax register is OxAFBB. Write program...

    Assembly language x86 processors in c++ Suppose the content of ax register is OxAFBB. Write program to do the following 16 15 14 13 12 11 10 987 6 5 4 3 2 1 1 1 0 0 a. Count and display the number of ones b. Determine whether the bit number 8 is on or off c. The bits 14,13,12,11 indicates the number of doors open (1011 means 8+2+1-11 doors open). Determine how many doors are open 01 0

  • 2) Write a MIPS assembly language version of the following C code segment: int A[75], B[75];...

    2) Write a MIPS assembly language version of the following C code segment: int A[75], B[75]; for (i = 1; i < 73; i ++) { C[i] = (A[i + 1] + A[i]) * (B[i + 2] - A[i-1]); } Arrays A, B and C start at memory location A000hex, B000hex and C000hex respectively. Try to reduce the total number of instructions and the number of expensive instructions such as multiplies. WRITE A SIMPLE CODE WORKING FOR MARS 4.5

  • Assembly language 64 bit please ! An example file for set up ==========+ ;| Data Segment...

    Assembly language 64 bit please ! An example file for set up ==========+ ;| Data Segment BEGINS Here | ;+======================================================================+ segment .data ;Code this expression: sum = num1+num2 num1 dq 0 ;left operand of the addition operation num2 dq 0 ;right operand of the addition operation sum dq 0 ;will hold the computed Sum value RetVal dq 0 ;Integer value RETURNED by function calls ;can be ignored or used as determined by the programmer ;Message string prompting for the keyboard...

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