Computer Architecture > QUESTIONS & ANSWERS > Computer Architecture and Assembly Language Programming | Download assignment for quality score | (All)
Q#1. Identify the problems in the following instructions and correct them by replacing them with one or two instruction having the same effect. i. mov [05], [ 24] ; Memory to memory move is illega ... l in Intel architecture. The correct instructions for this operation could be mov ax, [24] mov [24],ax ii. mov [label1], 501 ; Constant to memory move is illegal in Intel architecture. The correct instruction could be mov ax,501 mov [label1] ,ax iii. mov bx, al ; Size mismatch i.e. bx is 16 bit register and al is 8 bit register. The correct statement could be mov bx, ax or mov bl, al iv. mov ax, [si+di+100] ; Addition of two index register in one memory access is disallowed. We can do this operation by addition of index and base register. mov ax,[si+ bx+100] v. mov bx,[bs+bp+200] ; Addition of two based register in one memory access is disallowed. We can do this operation by addition of index and base register. mov ax,[bp+ si+100] Q#2. Write a program to calculate the square of 10 by using a loop that adds 10 to the accumulator 10 times. Solution: [org 0x0100] mov bx,10 mov cx,10 mov ax,0 l1: add ax, bx sub cx, 1 jnz l1 mov [total], ax mov ax,0x4c00 int 0x21 total: dw 0 This study source was downloaded by 100000853497421 from CourseH [Show More]
Last updated: 2 years ago
Preview 1 out of 3 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Feb 06, 2023
Number of pages
3
Written in
All
This document has been written for:
Uploaded
Feb 06, 2023
Downloads
0
Views
83
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·