## ECE2030 Intro to Computer Engineering ## ## Perfect Number ## ## Student: ## ## Author: Prof. Hsien-Hsin S. Lee ## ## School of Electrical & Computer Engineering ## Georgia Institute of Technology ## Atlanta, GA 30332 ## ## leehs@gatech.edu ## ## .rdata .globl string carat: .ascii "\n" .word 0x00000000 comma: .ascii "," .word 0x00000000 pend: .ascii "Program ends\n" .word 0x00000000 # Standard startup code. Invoke the routine main with no arguments. .text .globl __start __start: jal main addu $0, $0, $0 # Nop addiu $v0, $0, 10 syscall # syscall 10 (exit) .globl main main: addu $20, $0, $31 # Save return PC ############## Student decryption code begins ############### ############## Student decryption code ends ############### Exit: li $v0, 4 # system call (type 4) for printing out string (See fig A.17 in Appendix A) la $a0, pend # point the base address of pend to register $a0 (=$4) syscall # make system call, this will print out all the strings pointed by address in $a0, jr $31