answersLogoWhite

0

Mov ax,data

mov ds,ax

mov dl,05h

up2: lea si,ser1

mov cl,05h

up1: mov al,ds:[si]

mov ah,al

inc si

cmp al,ds:[si]

jc down

mov ah,ds:[si]

mov ds:[si],al

dec si

mov ds:[si],ah

inc si

down:dec cl

jnz up1

dec dl

jnz up2

int 3h

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: 8086 program to arrange a string of bytes in ascending order?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How can you convert byte to string in java?

To convert byte to String in java use the String(bytes, UTF-8); //example for one encoding type. You must know the special encoding that contains a variety of characters.


What is the function in java to find the size of given variable?

Dependion on the variable there are several methods to do it, this can only be applied to primitive types and arrays, for an array its the "name_of_array.length", for the arraylist this change just a little, it would be like "name_of_array_list.size()", for an int, double, float, long, byte, it would be like "name_of_variable.LENGTH" this is a public variable so you dont need a get, an finally for the String there is a method "name_of_string.length()" this would return the size of this String


What is an adequate measure of the size of input for a program that requires two integer numbers n?

Not sure what you mean; if you want to measure the "input size" in bytes, that would probably be 8 bytes, since integers typically use 4 bytes.


How many bytes does an Boolean take in a c program?

There is no boolean in C, we usually use int/short/char to store logical values.


Memory occupied by object in Java?

An object in Java may contain a small amount or a large amount of memory - it depends almost entirely on what you store in it. For example, a String is an object. Now, you can have a String that contains 10 characters - that object will contain 20 bytes (2 bytes per character - characters are stored as Unicode), plus a small amount of overhead. The amount of overhead may vary, depending on the specific Java implementation. Another String, which contains 100 million characters, will be stored using 200 million bytes (plus a small amount of overhead). I believe the JVM may also round the space used up by an object up - for example, to the closest power of two. But once again, this is implementation-specific.