Create an HLA Assembly language
Here are some example program dialogues to guide your efforts:
Feed Me: 6
6_5_1_7_8
Feed Me: 10
10_9_1_11_12
In an effort to help you focus on building an Assembly program, I’d like to offer you the following C statements matches the program specifications stated above. If you like, use them as the basis for building your Assembly program.
int x;
printf( "Feed Me:" );
scanf( "%d", &x );
// acquire one less and one more
int oneLess = x - 1;
int oneMore = x + 1;
// print the desired output
printf( "%d", x );
printf( "_%d", oneLess );
printf( "_%d", x-oneLess );
printf( "_%d", oneMore );
printf( "_%d", x-oneLess+oneMore );
printf( "\n" );
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
- In Assembly language SPIM I need to make a program that will prompt user for the (x, y) coordinates of two points in the real (Cartesian) plane, and then calculates and displays the distance between the points with reasonable descriptive text. I need to prompt for the coordinates using a little subroutine using simple linkage wich isnt so simple for mearrow_forwardWrite a C program addition.c that conducts addition operation on two integer numbers passed on the command line An example run of your program is as follows: $> /addition 8 9 The sum of 8 and 9 is 17. $>arrow_forwardWrite a C++ program for the given instructions: Summary Suppose that the first number of a sequence is x, where x is an integer. Define: a0 = x; an+1 = an / 2 if an is even; an+1 = 3 X an + 1 if an is odd. Then there exists an integer k such that ak = 1. Instructions Write a program that prompts the user to input the value of x. The program outputs: The numbers a0, a1, a2, . . . , ak. The integer k such that ak = 1 (For example, if x = 75, then k = 14, and the numbers a0, a1, a2, ..., a14, respectively, are 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1.) Test your program for the following values of x: 75, 111, 678, 732, 873, 2048, and 65535.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education