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?

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 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


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.


How do you write string in reverse through the HTML tags?

Not possible through html. Use php strrev function. For eg:


Reverse of a string without using string handling function?

shashi