Question: ----------------------------------------------------------------------------------- / * -- HelloWorld -- */ .global _start _start: mov r0, #1 ldr r1, =string1 mov r2, #13 mov r7, #4 swi 0 mov

-----------------------------------------------------------------------------------

/ * -- HelloWorld -- */

.global _start

_start:

mov r0, #1

ldr r1, =string1

mov r2, #13

mov r7, #4

swi 0

mov r7, #1

swi 0

.data

string1:

.ascii "Hello World! "

------------------------------------------------------------------------------

Modify theHello World program above so that it asks the user for their first initial (e.g. T) and then responds with Hi _! (e.g. Hi T!). The Linux system call to read is Syscall 3, just as with the other calls you put 3 into R7 to indicate the system call number. When you use this call, the system looks for the device to read from in R0 (0 = keyboard), looks to R2 for the number of characters to read (in this case 1) and places the characters into memory starting with the address in R1

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!