ANON_1 - .data Newline: .asciiz "\n" Result:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 .data Newline:.asciiz"\n" Result:.asciiz" The sum of the integers from 1 to N is " Array:.word 4, -4, 64679 Array2: .word -64679, 1048576, -1048577 .globlmain .text main: li$v0, 1 la$s0, Array lw$a0, 0($s0) syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s0) syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 8($s0) syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 la$s1, Array2 lw$a0, 0($s1) syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s1) syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 8($s1) syscall li$v0, 4 la$a0, Newline syscall la$a0, Newline
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 syscall ############################################################## li$v0, 1 lw$a0, 0($s0) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s0) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 8($s0) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 0($s1) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s1) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s1) srl$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall la$a0, Newline syscall
Background image of page 2
Sheet1 Page 3 ############################################################## li$v0, 1 lw$a0, 0($s0) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s0) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 8($s0) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 0($s1) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s1) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall li$v0, 1 lw$a0, 4($s1) sll$a0, $a0, 1 syscall li$v0, 4 la$a0, Newline syscall la$a0, Newline syscall ##############################################################
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 4 li$v0, 1 lw$a0, 0($s0) sra$a0, $a0, 1
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/11/2008 for the course CS 264 taught by Professor Salloum during the Spring '08 term at Cal Poly Pomona.

Page1 / 12

ANON_1 - .data Newline: .asciiz "\n" Result:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online