Question: Assuming all other files are provided (ie. makefile) Code using NASM. What should proj4_1.asm do 1. In the .data section, the program defines a C

Assuming all other files are provided (ie. makefile)

Code using NASM. Assuming all other files are provided (ie. makefile) Code using NASM.

What should proj4_1.asm do 1. In the .data section, the program defines a C string (i.e. terminated by 0) containing the text 12345678901234567890 2. In the .bss section, the program reserves space for 20 integers, you will treat it as an integer array. 3. In a loop it traverses the string and calculates the number of characters traversed. At the same times it initializes the array in .bss section one item at a time with the numeric value of the digit, e.g. the array should contain numbers 1, 2, 3, ..., 0, 1, 2, 9, 0 4. If it counted 20 characters and the string is not completely traversed, the traversal is interrupted, an error message is displayed and the program terminates, this ensures that no more than 20 integers are stored in the array 5. If the string is of length up to 20, the array is displayed in a loop using print_string and 6. When executing the program, you should see 7. Then rewrite in the program the definition of the string to contain instead the text print_nl and print_char subroutines with commas separating the numbers in the array 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6, 7,8,9,0 123456789012345678901 When re-compiled and executed, the program should display the error message and terminate What should proj4_1.asm do 1. In the .data section, the program defines a C string (i.e. terminated by 0) containing the text 12345678901234567890 2. In the .bss section, the program reserves space for 20 integers, you will treat it as an integer array. 3. In a loop it traverses the string and calculates the number of characters traversed. At the same times it initializes the array in .bss section one item at a time with the numeric value of the digit, e.g. the array should contain numbers 1, 2, 3, ..., 0, 1, 2, 9, 0 4. If it counted 20 characters and the string is not completely traversed, the traversal is interrupted, an error message is displayed and the program terminates, this ensures that no more than 20 integers are stored in the array 5. If the string is of length up to 20, the array is displayed in a loop using print_string and 6. When executing the program, you should see 7. Then rewrite in the program the definition of the string to contain instead the text print_nl and print_char subroutines with commas separating the numbers in the array 1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6, 7,8,9,0 123456789012345678901 When re-compiled and executed, the program should display the error message and terminate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!