From 00d0cdfaf367435eb3633911206b85bdc9e60df0 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Mon, 8 May 2023 09:32:14 +0200 Subject: [PATCH] function --- q2/fonctio/tp2/spim-fonction-call.s | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 q2/fonctio/tp2/spim-fonction-call.s diff --git a/q2/fonctio/tp2/spim-fonction-call.s b/q2/fonctio/tp2/spim-fonction-call.s new file mode 100644 index 0000000..a23dee4 --- /dev/null +++ b/q2/fonctio/tp2/spim-fonction-call.s @@ -0,0 +1,20 @@ + .data +text: .asciiz "Hello I'm in my fct" + + .text +main: + + # Appel Fonction + or $t0 $zero $ra + jal fct + or $ra $zero $t0 + jr $ra + +fct: + + li $v0, 4 + la $a0, text + syscall + jr $ra + +