added Hello World to Hello World

This commit is contained in:
Perry Kivolowitz 2022-05-19 08:39:41 -05:00
parent 5fb10be549
commit 7444d2842a

View file

@ -520,3 +520,28 @@ if a_register has value 0
```
Answer: True
### 5
While this chapter is entitled "Hello World," the example used isn't actually "Hello World." Here is a "Hello World" for you to complete:
```text
.global main
main:
str x30, [sp, -16]! // Preserve x30
ldr x0, =HW // Load address of string for puts
WHAT GOES HERE? // puts(HW)
ldr x30, [sp], 16 // Restore x30
mov x0, xzr // return 0
ret
.data
HW: .asciz "Hello, World"
.end
```
Answer:
```text
bl puts
```