Ask Question, Ask an Expert


Ask Assembly Expert

1) prepare a function in Linux assembly that computes the length of a string, called my_strlen. The function needs to take the pointer to a string as its only argument and return the number of characters in the string. You may assume that all strings are zero-terminated. Do not count the zero byte. You may not use the rep* or scas* instructions for this part of the assignment.

2) prepare a Linux assembly program that prints out a string to the console, followed by a new line that contains the number of characters in the string (excluding any zero-character at the end of the string). The string should be "hard-coded" in your .data section as follows and be exactly like that: string: .ascii "Hello, world!\n\0" Your routine should first compute the length of the string using your my_strlen function from Task 1, then print out the string, and then print out that length. You may not use any additional items in your .data section or any additional sections other than .text and .data. Strings can be of arbitrary length (i.e. you cannot assume that the string length has a maximum number of digits). You may not overprepare the string. You may not use C library functions.

Assembly, Programming

  • Category:- Assembly
  • Reference No.:- M953

Have any Question? 

Related Questions in Assembly

1write build and run an assembly language program that

1. Write, build, and run an assembly language program that displays 0 through 9 on the screen. You can only use the following data segment: message BYTE "0",13,10,0 2. Write an Assembly Language program that will write o ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate