السلام عليكم ورحمة الله وبركاته
أنا أدرس مادة الassembly فقط مقدمه عنها
:unsure:
وطالبة مني الدكتوره سؤالين خارجين عن درستنا يعني ما اخذناها من قبل تقول ابحثو عنها بالنت بس ما حصلت اي شيء عنها فحاولت احلها بس ما بدا ما عرفت فياليت تساعدون وتعطوني على الأقل اساسيات امشي عليها
وشكرا :blush:
السؤالين هما : الأول :::: Write an assembly language program that prompts the user for two input strings and computes the Hamming distance between the two strings. The Hamming distance is the number of bit positions where the two strings differ.
For example, the ASCII representations of the strings “foo” and
“bar” in binary are:
“foo” = 0110 0110 0110 1111 0110 1111
“bar” = 0110 0010 0110 0001 0111 0010
So, the Hamming distance between “foo” and “bar” is 8.
If the user enters two strings with different lengths, your program should return the Hamming distance up to the length of the shorter string.
The maximum length of the string could be 255 characters.
The easiest way to examine the contents of a register bit-by-bit is to use successive SHR instruction to shift the least significant bit into the carry flag.
