aboutsummaryrefslogtreecommitdiff
path: root/semestre 3/architecture des ordinateurs/td/25-10-22.md
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-11-01 13:27:41 +0100
committerAnhgelus Morhtuuzh <william@herges.fr>2025-11-01 13:27:41 +0100
commit341fc63ff791e08c7d0a00346080067c9bd1d5dd (patch)
tree817638957893aa4899da4386483a29baa6e99151 /semestre 3/architecture des ordinateurs/td/25-10-22.md
parentb47e5b1518d7089a2f6fdba439cf35dcf29e6089 (diff)
Cours du 17 au 21 octobre
Diffstat (limited to 'semestre 3/architecture des ordinateurs/td/25-10-22.md')
-rw-r--r--semestre 3/architecture des ordinateurs/td/25-10-22.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/semestre 3/architecture des ordinateurs/td/25-10-22.md b/semestre 3/architecture des ordinateurs/td/25-10-22.md
new file mode 100644
index 0000000..59d0775
--- /dev/null
+++ b/semestre 3/architecture des ordinateurs/td/25-10-22.md
@@ -0,0 +1,50 @@
+---
+tags:
+ - sorbonne
+ - informatique
+ - architecture-des-ordinateurs
+ - td
+semestre: 3
+---
+```asm
+# prologue
+addiu $29, $29, -8
+ori $8, $0, 12
+sw $8, 0($29)
+ori $8, $0, 3
+sw $8, 4($29)
+ori $8, $0, 5
+sw $8, 6($29)
+
+# épilogue
+addiu $29, $29, 8
+
+# @a = 0($29)
+# @b = 4($29)
+# @c = 6($29)
+```
+
+`"AaBb" = 0x41 0x61 0x42 0x62`
+`"0123456789" = 0x30 ... 0x39`
+`"1024" = 0x31 0x30 0x32 0x34`
+
+```asm
+.data
+ch: .asciiz "1234"
+.text
+#main
+ lui $8, $0, 0x1001
+ ori $12, $0, 10
+while:
+ lbu $9, 0($8)
+ beq $9, $0, while_end
+ andiu $9, $9, 0x0F
+ mult $10, $12
+ mflo $10
+ addu $10, $9
+ addiu $11, 1
+ addiu $8, 1
+ j while
+while_end:
+# 
+```