answersLogoWhite

0

program:

assume cs:code,ds:data

code segment

mov ax,data

mov ds,ax

mov cl,count

mov si,offset str1

mov di,0003h

back:mov al,[si]

xchg [di],al

mov [si],al

inc si

dec di

dec cl

jnz back

hlt

code ends

data segment

str1 db 01h,02h,03h,04h

count equ 02h

data ends

end

result:

input: str1 (ds:0000h) = 01h,02h,03h,04h

output: str1 (ds:0000h) = 04h,03h,02h,01h

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

Definition of buffer in assembly language?

its just like a string of c++


What is the use of Reverse String in C program?

The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


Program to reverse string in perl?

To reverse a string in Perl, you can use the reverse function along with split to break the string into individual characters, and then join them back together. Here’s a simple example: my $string = "Hello, World!"; my $reversed = join('', reverse split('', $string)); print $reversed; # Output: !dlroW ,olleH This code splits the string into characters, reverses the list of characters, and then joins them back into a single string.


Flow chart to reverse digits of numbers?

ALGORITHM REVERSEINPUT (string)"STRINGLENGTH() would be a function that returns the lenght of the string"FOR (i = STRINGLENGTH(string); i >= 0; i--) BEGINDISPAY (string[i])END FOREND REVERSE

Related Questions

How can you prove that the reverse of a regular language is regular?

The reverse of a regular language is regular because for every string in the original language, there exists a corresponding string in the reversed language that is also regular. This is because regular languages are closed under the operation of reversal, meaning that if a language is regular, its reverse will also be regular.


Definition of buffer in assembly language?

its just like a string of c++


How do you reverse every word in a filter with assembly language in Linux 64-bit?

To reverse every word in a filter with assembly language in Linux 64-bit is easy. All you have to do is assemble the language file in an object file.


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language


What is the use of Reverse String in C program?

The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.


How do you convert a number that consist of alphabet and number in reverse order?

To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }


How to display number in asm?

To display a number in assembly language, you typically convert the number to a string format. This involves dividing the number by 10 repeatedly to extract each digit, storing the digits in reverse order, and then using a system call (like write in Linux) to output the string to the console. The specific implementation can vary depending on the assembly language syntax and the operating system being used. Always ensure to handle any necessary conversions and character encoding for proper display.


How do you create a string and reverse a string in vb?

gov


How do you reverse a string in PHP?

A predefined function can reverse a string as shown below:echo strrev('pizza'); // outputs: azzip


Program to reverse string in perl?

To reverse a string in Perl, you can use the reverse function along with split to break the string into individual characters, and then join them back together. Here’s a simple example: my $string = "Hello, World!"; my $reversed = join('', reverse split('', $string)); print $reversed; # Output: !dlroW ,olleH This code splits the string into characters, reverses the list of characters, and then joins them back into a single string.


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Is assembly test also known as string test?

Yes....String Test=application Integration test=assembly test.