Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Directing addressing - Input and Output for Intel Assembly X86 Basic input numbers and provide output of users. Lab #4: Direct Addressing, Input, and ASCII
Directing addressing - Input and Output for Intel Assembly X86
Basic input numbers and provide output of users.
Lab #4: Direct Addressing, Input, and ASCII code Purpose: The purpose of this lab assignment is to further familiarize the student with the basic input and output mechanisms of the MS-DOS Operating System, the INT instruction, as well as the conversion of ASCII decimal digits received from the keyboard to a binary number to be used in a computation. The conversion of the binary result to ASCII decimal digits to be displayed on the screen was covered in the last lab. This lab is mostly about ASCII to binary conversion and it builds on the previous lab. You have up to two weeks to complete this lab Introduction: This lab is a modification of the previous lab in the sense that instead of input variables X and Y being hard coded by assigning them inside the program, we want to make the program flexible. We do so by letting a user type in the values of the variables from the keyboard. We will assume the numbers are decimal. Since the number typed from the keyboard consists of ASCII decimal digits it has to be converted to decimal and eventually converted to binary before it can be used in computation. There are a number of algorithms that can be used for this conversion but let us look at one example Suppose we want to convert the ASCII string 4096. Let us assume AX will be used keep track of the binary value. AX is initialized to zero. As each ASCII digit is read, we multiply AX by 10 and the digit's binary value is added to AX. After all digits have been read, Ax contains the binary value of the number 4096. Note that the most significant digit is typed first. The following table describes the algorithm. AX (before) New Digit AX (after) 0 *10+Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started