summaryrefslogtreecommitdiff
path: root/assignments/3-solution.md
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2025-01-23 12:09:22 -0700
committermo khan <mo@mokhan.ca>2025-01-23 12:09:22 -0700
commitc8ac898c9ec045d0de769886e5306dc177914527 (patch)
tree4aa57bb762572a61c977297f97962c402d7773d5 /assignments/3-solution.md
parentbe0232e94c981284c5cd8f2c6013c252ebeb98d0 (diff)
Update the things
Diffstat (limited to 'assignments/3-solution.md')
-rw-r--r--assignments/3-solution.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/assignments/3-solution.md b/assignments/3-solution.md
index 3403327..3ac8b91 100644
--- a/assignments/3-solution.md
+++ b/assignments/3-solution.md
@@ -6,8 +6,16 @@ Choose ONE exercise each from Chapters 6, 7, and 8
Chapter 6:
-> 13. Write a complete assembly language program (including all necessary pseudo-ops) that reads in a series of integers, one at a time, and outputs the largest and smallest values. The input will consist of a list of integer values
+> 13. Write a complete assembly language program (including all necessary
+> pseudo-ops) that reads in a series of integers, one at a time, and outputs
+> the largest and smallest values. The input will consist of a list of integer
+> values
+```assembly
+!include assignments/3/max_min.s
+```
+
+<!--
I wrote the following C code and then used the GNU C Compiler to convert the C
code into Assembly code for my machine. Below is the C code, compiler command,
and final assembly code.
@@ -26,6 +34,7 @@ main.s
```assembly
!include assignments/3/main.s
```
+-->
Chapter 7:
@@ -129,3 +138,9 @@ $ ruby caesar.rb
| Ciphertext | RTAJ TZY FY IFBS |
| Plaintext | MOVE OUT AT DAWN |
```
+
+References:
+
+* https://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/
+* https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html
+* https://cs.lmu.edu/~ray/notes/gasexamples/