-
Notifications
You must be signed in to change notification settings - Fork 2
/
file0.txt
61 lines (58 loc) · 852 Bytes
/
file0.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.text
main:
sw $ra, 0($sp)
sw $fp, -4($sp)
add $fp, $sp, -4
add $sp, $sp, -8
lw $2, _framesize_main
sub $sp, $sp, $2
sw $8, 32($sp)
sw $9, 28($sp)
sw $10, 24($sp)
sw $11, 20($sp)
sw $12, 16($sp)
sw $13, 12($sp)
sw $14, 8($sp)
sw $15, 4($sp)
_begin_main:
li $8, 20
li $9, 5
sub $10, $8, $9
sw $10, -20($fp)
li $10, 100
s.s $f10, _globalint
l.s $f1, _globalint
li $10, 20
mul $2, $f1, $10
li $10, 5
sub $1, $f2, $10
sw $1, -8($fp)
li $10, 90
sw $10, -12($fp)
li $10, 10
sw $10, -4($fp)
lw $10, -4($fp)
li $9, 3
add $8, $10, $9
sw $8, -4($fp)
lw $8, -8($fp)
li $9, 5
div $10, $8, $9
sw $10, -16($fp)
_end_main:
lw $8, 32($sp)
lw $9, 28($sp)
lw $10, 24($sp)
lw $11, 20($sp)
lw $12, 16($sp)
lw $13, 12($sp)
lw $14, 8($sp)
lw $15, 4($sp)
lw $ra, 4($fp)
add $sp, $fp, 4
lw $fp, 0($fp)
li $v0, 10
syscall
.data
_framesize_main: .word 36
_globalint: .word 0