Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSEMBLY language - Implement the code that is commented on the right side so that the function on the left accepts positive and negative numbers.

ASSEMBLY language - Implement the code that is commented on the right side so that the function on the left accepts positive and negative numbers.

PICTURE:

image text in transcribed

CODE:

IS_UNSIGNED_INT PROC

mov byte ptr IS_VALID, TRUE mov di, 0h mov ah, STRING[di] NEXT_CHAR: cmp ah, '$' ;mov byte ptr SIGNO,1h jz DECIDIR :cmp ah, '-' cmp ah, '0' ;jnz NEXT_CHAR jb DECIDIR ;mov byte ptr SIGNO,-1 cmp ah, '9' ;cmp ah, '+' ja DECIDIR ;jnz NEXT_CHAR inc di ;inc di mov ah, STRING[di] ;mov ah, STRING[di] jmp NEXT_CHAR

DECIDIR:

jnz NOT_VALID cmp di, 0h jnz KEEP NOT_VALID: mov byte ptr IS_VALID, FALSE

KEEP:

RET IS_UNSIGNED_INT ENDP

XXXXXXX : IS_UNSIGNED_INT PROC mov byte ptr IS_VALID, TRUE mov d, oh mov ah, STRING[di] NEXT_CHAR: cmp ah, '' jz DECIDIR cmp ah, 'O' jb DECIDIR cmp ah, '9' ja DECIDIR inc di mov ah, STRING[di] jmp NEXT_CHAR ;mov byte ptr SIGNO, 1h cmp ah, ; jnz NEXT_CHAR ; mov byte ptr SIGNO, -1 icmp ah, + inz NEXT_CHAR ; inc di ;mov ah, STRING[di] DECIDIR: jnz NOT_VALID cmp di, oh jnz KEEP NOT_VALID: mov byte ptr 1S_VALID, FALSE KEEP: RET IS_UNSIGNED_INT ENDP XXXXXXX : IS_UNSIGNED_INT PROC mov byte ptr IS_VALID, TRUE mov d, oh mov ah, STRING[di] NEXT_CHAR: cmp ah, '' jz DECIDIR cmp ah, 'O' jb DECIDIR cmp ah, '9' ja DECIDIR inc di mov ah, STRING[di] jmp NEXT_CHAR ;mov byte ptr SIGNO, 1h cmp ah, ; jnz NEXT_CHAR ; mov byte ptr SIGNO, -1 icmp ah, + inz NEXT_CHAR ; inc di ;mov ah, STRING[di] DECIDIR: jnz NOT_VALID cmp di, oh jnz KEEP NOT_VALID: mov byte ptr 1S_VALID, FALSE KEEP: RET IS_UNSIGNED_INT ENDP

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago