Question: Edit the code below to do the following: Use the System Service call technique to output a string that contains your full name. For example:
Edit the code below to do the following:
Use the System Service call technique to output a string that contains your full name. For example: My full name is: Robert Kevin Preston
Use the C++ function call to printf output a string that contains your UAH email address. For example: My UAH email address is: rkp0001@uah.edu.
Use the System Service Call to print the following string. "This is my first ARM Assembly program for CS309-01 (Fall 2017)."
@ File: helloworld.s @ Author: R. Kevin Preston @ Purpose: Provide enough assembly to allow students to complete an assignment. @ @ Use these commands to assemble, link and run the program @ @ as -o helloworld.o helloworld.s @ gcc -o helloworld helloworld.o @ ./helloworld ;echo $? @ .global main main:
@use system call to write string to the STDIO
MOV r7, #0x04 @ a 4 is a write command MOV r0, #0x01 @ write to STD out MOV r2, #0x0C @ Length of string in Hex. LDR r1, =string1 @ Put address of string in r1 SVC 0 @do the system call
@ Use the C library to print the second string. LDR r0, =string2 @ Put address of string in r0 BL printf @Make the call to printf
@ Force the exit of this program and return command to OS
MOV r7, #0X01 SVC 0
@ Declare the stings
.balign 4 @ Force a word boundry. string1: .asciz "Hello World " @Length 0x0C .balign 4 @ Force a word boundry
string2: .asciz "Hello World. " @Lenght 0x0E
.global printf
@end of code and end of file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
