Question: Assembly Language Create a program named StringToInt.hla that does the following: Uses stdin.getc() to read a sequence of 1 and 0 characters from the user.

Assembly Language

Create a program named

StringToInt.hla

that does the following:

Uses stdin.getc() to read a sequence of 1 and 0 characters from the user. Converts this string of characters to an integer using the AND, SHL, and OR instructions. Displays the integer result in the following formats:

hexadecimal (unsigned, use, e.g., puth32(ebx))

decimal (signed, use, e.g., puti32(ebx)).

You may assume the user will not enter more than 32 digits.

If the user enters the characters 11111111111111111111111111111111,

Your program should output:

FF

-1

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!