From 22fc0c35e5ba8f6358dddef2df3621f4fee56bc1 Mon Sep 17 00:00:00 2001 From: Perry Kivolowitz Date: Fri, 20 May 2022 09:53:24 -0500 Subject: [PATCH] expansion plus new spelling words --- section_1/if/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/section_1/if/README.md b/section_1/if/README.md index 482a25c..dcb412e 100644 --- a/section_1/if/README.md +++ b/section_1/if/README.md @@ -173,7 +173,8 @@ T: .asciz "TRUE" // 24 `Line 11` is one way of loading the address represented by a label. In this case, the label `T` corresponds to the address to the first -letter of the C string "TRUE". +letter of the C string "TRUE". `Line 15` loads the address of the C +string containing "FALSE". The occurrences of `.asciz` on `line 23` and `line 24` are invocations of an *assembler directive* the creates a C string. Recall that C strings are NULL @@ -214,4 +215,14 @@ resulting value but does set the condition bits. ### 3 +We claim `if05.s` (the complete program given above) is too long! By two instructions, +that is. Copy `if05.s` to make `if06.s`. Then, modify `if06.s` to be two instructions +shorter. + +To do so, notice that there are two occurrences of `bl puts` in `if05.s`. Refactor +the code to have only one. + +Answer: The shorter version is found [here](./if06.s). It is well documented and +should be studied. + ### 4