Question: The following Assembly function needs to take negative sign number. Add the external code in places where it goes in the function. External Code: //

The following Assembly function needs to take negative sign number. Add the external code in places where it goes in the function.

External Code: // Implement this inside the function so it can take negative number. You don't need to run this program just put the external code where it goes inside the function

cmp byte ptr SIGNO,-1 jnz ANOTHER mul SIGNO mov byte ptr STRING[di],'-' inc di

FUNCTION:

UNSIGNED_INT_TO_STRING PROC

mov ax, UNSIGNED_INT mov bx, 10 mov di, 0h

ANOTHER: mov dx, 0h div bx add dl, '0' mov STRING[di], dl inc di cmp ax, 0h jnz ANOTHER mov STRING[di], '$'

dec di mov si, 0

OTHER: mov ch, STRING[di] mov cl, STRING[si] mov STRING[di], cl mov STRING[si], ch dec di inc si cmp si, di jb OTHER

RET UNSIGNED_INT_TO_STRING ENDP

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!