Question: Lab# 5 : Logical, Bit Manipulation and String instructions Assignment # 1 : Write an assembly code to find number of ones in each number
Lab#: Logical, Bit Manipulation and String instructions
Assignment #: Write an assembly code to find number of ones in each number in the array X and store
the result in the array Y
X DB HOFHOAHH
Y DB DUP
Solution:
ORG H
HLT
X DB HFHAH
Y DB DUP
Assignment #: Write an assembly code to replace the even numbers in the array X with zero Note: without
using DIV or IDIV instructions:
x DB
Solution:
ORG H
HLT
X DB
Assignment #: Write an assembly code to count number of as in the following string Note: using SCASB
instruction and REPNE prefix:
STR DB 'aabcadxyaaAa'
Solution:
ORG H
HLT
STR DB 'aabcadxyaaAa'
L EQU $STR
Assembly Lab
Assignment #: Write an assembly code to reverse the string STR in STR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
