Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using 8086 assembly language write a program which will: Display an appropriate prompt. Input a signed base 8 integer from the keyboard If an invalid

using 8086 assembly language

write a program which will:

Display an appropriate prompt.

Input a signed base 8 integer from the keyboard

If an invalid character (that is, not in the range '0'-'7') is input, erase the character by printing a backspace char (ASCII code 8), a blank (' ') and another backspace and do not attempt to convert the invalid character.

Convert the characters as they are input into the equivalent binary number stored in register BX

Overflow processing is NOT necessary.

Display another appropriate prompt.

Output the base-2 form of the binary number in register BX.

If the user indicates a negative number is being input, remember that fact, read the number as an absolute value, then negate it when input is finished.

Sample input/output:

Enter a base-8 number: 10 The binary number is: 0000000000001000

Another input/output sample:

Enter a base-8 number: -1234 The binary number is: 1111110101100100

.asm

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions