34 lines
591 B
NASM
34 lines
591 B
NASM
.data
|
|
wVet: .space 100
|
|
wDim: .byte 10
|
|
|
|
.text
|
|
.globl main
|
|
.ent main
|
|
main:
|
|
la $t0, wVet # punta a inizio vettore
|
|
lb $t1, wDim
|
|
|
|
addi $t2, $0, 1
|
|
|
|
|
|
|
|
# lettura stringa. a quanto pare posso solo fare una read_chr
|
|
ciclo_riga:
|
|
addi $t3, $0, 1
|
|
ciclo_colonna:
|
|
mult $t2, $t3
|
|
mflo $t4
|
|
sb $t4, ($t0)
|
|
|
|
addi $t0, $t0, 1
|
|
addi $t3, $t3, 1
|
|
bne $t3, $t1, ciclo_colonna
|
|
|
|
addi $t0, $t0, 10
|
|
addi $t2, $t2, 1
|
|
bne $t2, $t1, ciclo_riga
|
|
|
|
li $v0, 10
|
|
syscall
|
|
.end main |