logo

String Manipulation

   

Added on  2019-09-23

5 Pages571 Words318 Views
 | 
 | 
 | 
String Manipulation_1

.data str: .space 40 fstr: .space 150 prompt: .asciiz "Input a string:" output: .asciiz "Output string:" newline: .asciiz "\n" .text .globl mainmain: # display prompt li $v0, 4 la $a0, prompt syscall # accept input string li $v0, 8 la $a0, str li $a1, 64 syscall li $t1, 0 # initiate index li $t7, 0 # output indexloop: li $t6 , 0 lb $t0 str($t1) beqz $t0 exit # check if "#" li $t2, '#' beq $t0, $t2, hash_to_a nop # check if "%" li $t2, '%' beq $t0, $t2, percent_to_g nop # check if "$"
String Manipulation_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Programing in MIPS Bubble Sort
|7
|495
|393

Three Operands Addition
|3
|597
|172