# Ask the user about an integer and check if it is positive, zero or negative #first method to solve .data arithmos: .asciiz "dose arithmo " thetikos: .asciiz "einai thetikos " arnitikos: .asciiz "einai arnitkos " zero: .asciiz "einai miden" .text .globl main main: # the user enter the number addi $v0,$0,4 #li $v0,4 la $a0, arithmos syscall #get the number addi $v0,$0,5 syscall #store the result move $t0,$v0 #check if number is zero beq $t0,$0,label_2 #check if greater the zero, then is "thetikos", else "arnitikos" bgt $t0,$0,label addi $v0,$0,4 la $a0, arnitikos syscall #exit li $v0,10 syscall label: addi $v0,$0,4 la $a0,thetikos syscall label_2: addi $v0,$0,4 la $a0,zero syscall