我在一个经常调用的循环中有一个macro
问题是,当它结束并且我检查.txt文件时,只有第一个条目写在文件中。
.macro write_to_file(%string)
li $v0, 13 # Syscall to Open File
la $a0, fileOutput # File Address (it doesnt exists yet)
li $a1, 1 # Flag 1 = Write & Append
li $a2, 0 # Mode
syscall # Descriptor returned in $v0
move $a0, $v0 # syscall 15 needs descriptor on $a0
li $v0, 15 # Write to File Syscall
la $a1, %string # Output Buffer
li $a2, 15 # Characters ammount to be write
syscall
.end_macro