From 7444d2842a623d26a1b3a634d85fd51dcab3622b Mon Sep 17 00:00:00 2001 From: Perry Kivolowitz Date: Thu, 19 May 2022 08:39:41 -0500 Subject: [PATCH] added Hello World to Hello World --- section_1/hello_world/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/section_1/hello_world/README.md b/section_1/hello_world/README.md index 73b52b2..939d44d 100644 --- a/section_1/hello_world/README.md +++ b/section_1/hello_world/README.md @@ -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 +```