Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This Program will take in an array of characters and print them in reverse
- .data
- Input: .space 4
- Prompt: .asciiz "Please enter a string up to 60 characters: "
- #Mem: .asciiz "Memory Location: "
- #Char: .asciiz "Letter in memory location: "
- Divider: .asciiz "-----------------------"
- endl: .asciiz "\n"
- .text
- main:
- li $v0, 4
- la $a0, Prompt
- syscall
- ##### Take Input
- li $v0, 8
- syscall
- move $t0, $a0
- ##### Let's output a byte
- li $v0, 1
- la $t0, Input
- syscall
- #### Endl
- li $v0, 4
- la $a0, endl
- syscall
- li $v0, 4
- lb $a0, Input
- syscall
- #### Endl
- li $v0, 4
- la $a0, endl
- syscall
- syscall
- li $v0, 10
- syscall
Add Comment
Please, Sign In to add comment