Answer to Question #212596 in Assembler for Harshitha

Question #212596

Read each integer in an array of n 32 bit unsigned integer, mask it's MSB and LSB to zero without affecting other bits and then store the updated integer at corresponding position in another array


1
Expert's answer
2021-07-01T10:35:55-0400
TITLE  Assignment
INCLUDE Irvine32.inc
.data
Array1 DWORD 8003h, 3, 10, 0A500h, 15, 0E002h, 1Fh
Array2 DWORD LENGTHOF Array1 DUP(?)
.code
main PROC
mov ecx, LENGTHOF Array1
  mov ESI, OFFSET Array1
  mov EDI, OFFSET Array2

L1:
    MOV EAX,0
    MOV EAX, [ESI]        ; Read integer in an Array1
    AND EAX,7FFEh        ; mask it's MSB and LSB to zero
    MOV [EDI], EAX        ; store the updated integer
    ADD ESI, TYPE Array1
    ADD EDI, TYPE Array2
  Loop L1        
    
    call crlf
    call WaitMsg
    exit
main ENDP
end main

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS