Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Courses
csci206_lecture_examples
Commits
b809aa4a
Commit
b809aa4a
authored
Feb 14, 2014
by
Alan Marchiori
Browse files
after class with example
;
parent
5973f3b6
Changes
3
Show whitespace changes
Inline
Side-by-side
section01/Lec14/PH2.8 - Procedures.odp
View file @
b809aa4a
No preview for this file type
section01/Lec14/factorial_in_class.asm
0 → 100644
View file @
b809aa4a
.data
prompt:
.asciiz
"N = "
sep:
.asciiz
"\
n
"
.text
main:
li
$
v0
,
4
la
$
a0
,
prompt
syscall
li
$
v0
,
5
syscall
move
$
a0
,
$
v0
jal
fact
move
$
s0
,
$
v0
li
$
v0
,
4
la
$
a0
,
sep
syscall
li
$
v0
,
1
move
$
a0
,
$
s0
syscall
li
$
v0
,
10
syscall
fact:
addi
$
sp
,
$
sp
,
-
8
sw
$
ra
,
0
(
$
sp
)
sw
$
a0
,
4
(
$
sp
)
beq
$
a0
,
$
zero
,
done
addi
$
a0
,
$
a0
,
-
1
jal
fact
lw
$
ra
,
0
(
$
sp
)
lw
$
a0
,
4
(
$
sp
)
mul
$
v0
,
$
v0
,
$
a0
addi
$
sp
,
$
sp
,
8
jr
$
ra
done:
li
$
v0
,
1
lw
$
ra
,
0
(
$
sp
)
#
lw
$
a0
,
4
(
$
sp
)
addi
$
sp
,
$
sp
,
8
jr
$
ra
section01/Lec14/factorial_start.asm
0 → 100644
View file @
b809aa4a
.data
prompt:
.asciiz
"N = "
sep:
.asciiz
"\
n
"
.text
main:
li
$
v0
,
4
la
$
a0
,
prompt
syscall
li
$
v0
,
5
syscall
move
$
a0
,
$
v0
jal
fact
move
$
s0
,
$
v0
li
$
v0
,
4
la
$
a0
,
sep
syscall
li
$
v0
,
1
move
$
a0
,
$
s0
syscall
li
$
v0
,
10
syscall
fact:
addi
$
sp
,
$
sp
,
-
8
sw
$
ra
,
0
(
$
sp
)
sw
$
a0
,
4
(
$
sp
)
beq
$
a0
,
$
zero
,
done
addi
$
a0
,
$
a0
,
-
1
jal
fact
lw
$
ra
,
0
(
$
sp
)
lw
$
a0
,
4
(
$
sp
)
mul
$
v0
,
$
v0
,
$
a0
addi
$
sp
,
$
sp
,
8
jr
$
ra
done:
li
$
v0
,
1
lw
$
ra
,
0
(
$
sp
)
#
lw
$
a0
,
4
(
$
sp
)
addi
$
sp
,
$
sp
,
8
jr
$
ra
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment