feat: Initial commit
This commit is contained in:
25
Laboratorio4/Esercizio1.asm
Normal file
25
Laboratorio4/Esercizio1.asm
Normal file
@@ -0,0 +1,25 @@
|
||||
.data
|
||||
mpari: .asciiz "Il numero è pari\n"
|
||||
mdispari: .asciiz "Il numero è dispari\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
li $v0, 5
|
||||
syscall
|
||||
move $t0, $v0
|
||||
|
||||
andi $t0, t0, 0x1
|
||||
|
||||
beq .dispari %t0, 0x1
|
||||
la $a0, mpari
|
||||
j fine
|
||||
dispari:
|
||||
la $a0, mdispari
|
||||
fine:
|
||||
li $v0, 4
|
||||
syscall
|
||||
|
||||
li $v0, 10
|
||||
syscall
|
||||
Reference in New Issue
Block a user