feat: Initial commit
This commit is contained in:
28
Laboratorio3/Esercizio2.asm
Normal file
28
Laboratorio3/Esercizio2.asm
Normal file
@@ -0,0 +1,28 @@
|
||||
.data
|
||||
formula: .asciiz "Overflow\n"
|
||||
res: .word 1
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
li $v0, 5
|
||||
syscall
|
||||
move $t1, $v0
|
||||
|
||||
li $v0, 5
|
||||
syscall
|
||||
move $t2, $v0
|
||||
|
||||
addu $t1, $t1, $t2
|
||||
|
||||
slt $t2, $t1, 0
|
||||
beq $t2, $0, fine
|
||||
la $a0, formula
|
||||
li $v0, 4
|
||||
syscall
|
||||
|
||||
fine:
|
||||
li $v0, 10
|
||||
syscall
|
||||
.end main
|
||||
Reference in New Issue
Block a user