1
0

feat: Initial commit

This commit is contained in:
2024-03-22 13:53:19 +01:00
parent 44aa2938a2
commit 2a54d9dbc2
34 changed files with 1475 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
.data
num: .word 3141592653
.text
.globl main
.ent main
main:
lw $t0, num
addi $t2, $0, 10
move $t3, $sp
seq_divide:
divu $t0, $t2
mfhi $t1 # remainder to $a2
mflo $t0
addi $sp, $sp, -4
sw $t1, 0($sp)
bne $t1, $0, seq_divide
print:
addi $sp, $sp, 4
lw $t0, 0($sp)
addi $a0, $t0, 48 # $t0 = $v0 - '0'
li $v0, 11
syscall
bne $sp, $t3, print
li $v0, 10
syscall
.end main