.text 0x00400000
####diavasma arithmou
li $v0,5
syscall
move $t2,$v0
####bazo ston kataxoriti t1 thn timh 1
li $t1,1
start:
#### emfanish tou mhnhmatos tou msg
li $v0,4
la $a0,msg
syscall
#### prosthesi tou t1 me to 1 mexris otou o o t1<=t2
add $t1,$t1,1
ble $t1,$t2,start
#### exodos
li $v0,10
syscall
.data
msg: .asciiz "\n my message"
####diavasma arithmou
li $v0,5
syscall
move $t2,$v0
####bazo ston kataxoriti t1 thn timh 1
li $t1,1
start:
#### emfanish tou mhnhmatos tou msg
li $v0,4
la $a0,msg
syscall
#### prosthesi tou t1 me to 1 mexris otou o o t1<=t2
add $t1,$t1,1
ble $t1,$t2,start
#### exodos
li $v0,10
syscall
.data
msg: .asciiz "\n my message"
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου