Question

Can someone help me with this problem. We're using microsoft visual studios and its from my assembly code language class.

Write a program and verify it using visual studio that does the following: Use type, lengthof, and size to make your program more independent of the data type. 3) Write a program that first reads the message entered by the user and stores it in Myname. Then it prints the content of cl on the screen. Myname byte 45 dup(?)

we're using this template in class from the lecture slides

media%2F59e%2F59ee195a-e71e-45f1-adbd-97

0 0
Add a comment Improve this question Transcribed image text
Answer #1

;code.asm

;This codes serves the function of the problem to display the name entered by the user

section .data

prompt db ‘What is your name? ‘
; do not change the order of the following three lines!
Myname dq ‘Hello ‘
name db ‘ ‘ ; space characters
endOfLine db ‘!’
; do not change the order of the previous three lines!
section .text
global _start
_start:
; Output the information ‘What is your name? ‘
mov eax, 4 ; write…
mov ebx, 1 ; to the standard output (screen/console)…
mov ecx, prompt ; the information at memory address prompt
mov edx, 19 ; 19 bytes (characters) of that information
int 0x80 ; invoke an interrupt
; Accept input and store the user’s name
mov eax, 3 ; read…
mov ebx, 1 ; from the standard input (keyboard/console)…
mov ecx, name ; storing at memory location name…
mov edx, 23 ; 23 bytes (characters) is ok for myName
int 0x80
; Output that information
mov eax, 4 ; write…
mov ebx, 1 ; to the standard output (screen/console)…
mov ecx, Myname; the information at Myname
mov edx, 23 ; 23 bytes (characters) is ok for myName
int 0x80
; Exit

Add a comment
Know the answer?
Add Answer to:
Can someone help me with this problem. We're using microsoft visual studios and its from my...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program using C in Microsoft visual studios. Write a function that receives an array...

    Write a program using C in Microsoft visual studios. Write a function that receives an array of integers and the array length and prints one integer per line (Hint: Use \n for a line break). Left align all of the integers and use a field width of 10. Populate an array of 10 elements from the user and pass the array and its length to the function.

  • using visual studios C# implementing using system; be sure I can copy and paste. Exercise #2:...

    using visual studios C# implementing using system; be sure I can copy and paste. Exercise #2: Design and implement class Radio to represent a radio object. The class defines the following attributes (variables) and methods: Assume that the station and volume settings range from 1 to 10. 1. A private variable of type int named station to represent a station number. Set to 1. 2. A private variable of type int named volume to represent the volume setting. Set to...

  • Can someone please help me with this problem? We are using CodeWarrior to write this program...

    Can someone please help me with this problem? We are using CodeWarrior to write this program in assembly language. The array sample contains eight 8-bit signed binary numbers (integers) as shown below. Write a program which stores the negative numbers in the array nelements, computes the sum of the positive numbens to be stored in the variable psum and stores the number of the positive numbers in the variable pnumber. Note that a zero is ther positive nor negative. Your...

  • Using Microsoft Visual Studio. 1) Complete the following C++ program by adding more line of code...

    Using Microsoft Visual Studio. 1) Complete the following C++ program by adding more line of code for 8-bit signed array, 16-bit unsigned array, 16-bit signed array, 32-bit signed array and 32-bit signed array. 2) Fill in all the blanks in Table 1 using your completed code, following the hints provided within the table. 3) Fill in all the blanks in Table 2 using your completed code, following the hints provided within the table. C++ Program #include <stdio.h> #include <iostream> int...

  • Can someone please help me. i keep getting an error in my code. I need it...

    Can someone please help me. i keep getting an error in my code. I need it to be on three seperate files! attached is my assignment and my code. c++ The class date Type implements the date in a program. Write the class functions as specified in the UML class diagram. The values for the month, day, and year should be validated (in the class functions) before storing the date into the data members. Set the invalid member data to...

  • Please solve the following problem with programming using proper data structures. (Programming Language: Python) A similar...

    Please solve the following problem with programming using proper data structures. (Programming Language: Python) A similar application to the parentheses matching problem comes from hypertext markup language (HTML). In HTML, tags exist in both opening and closing forms and must be balanced to properly describe a web document. This very simple HTML document: Example> Hello, world is intended only to show the matching and nesting structure for tags in the language. Write a program that can check an HTML document...

  • This homework problem has me pulling my hair out. We are working with text files in Java using Ne...

    This homework problem has me pulling my hair out. We are working with text files in Java using NetBeans GUI application. We're suppose to make a movie list and be able to pull up movies already in the text file (which I can do) and also be able to add and delete movies to and from the file (which is what I'm having trouble with). I've attached the specifications and the movie list if you need it. Any help would...

  • Hello! I'm posting this program that is partially completed if someone can help me out, I...

    Hello! I'm posting this program that is partially completed if someone can help me out, I will give you a good rating! Thanks, // You are given a partially completed program that creates a list of employees, like employees' record. // Each record has this information: employee's name, supervisors's name, department of the employee, room number. // The struct 'employeeRecord' holds information of one employee. Department is enum type. // An array of structs called 'list' is made to hold...

  • Hi. Could you help me with the code below? I need to validate the code below, using expressions that can carry out the actions or that make appropriate changes to the program’s state, using conditiona...

    Hi. Could you help me with the code below? I need to validate the code below, using expressions that can carry out the actions or that make appropriate changes to the program’s state, using conditional and iterative control structures that repeat actions as needed. The unit measurement is missing from the final output and I need it to offer options to lbs, oz, grams, tbsp, tsp, qt, pt, and gal. & fl. oz. Can this be added? The final output...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT