gambo22
February 22nd, 2006, 12:53 PM
hi im new to assembly and have a task that im having trouble with
I have read in and array of stings and need to convert then to ascii and compare
s1STR: .asciiz "assembly is cool\n"
s2STR: .asciiz "hi all\n"
s3STR: .asciiz "bye all\n"
stringsARRAY: .word s1STR, s2STR, s3STR, 0
.globl main
main:
la $a0, stringsARRAY
jal sort
nop
la $a0, starsMSG
jal txstr
nop
la $a0, stringsARRAY
jal do_print_strings
nop
sort:
do_print_strings:
subu $sp, $sp, 8
sw $ra, 4($sp)
sw $a1, 0($sp)
move $a1, $a0
I have read in and array of stings and need to convert then to ascii and compare
s1STR: .asciiz "assembly is cool\n"
s2STR: .asciiz "hi all\n"
s3STR: .asciiz "bye all\n"
stringsARRAY: .word s1STR, s2STR, s3STR, 0
.globl main
main:
la $a0, stringsARRAY
jal sort
nop
la $a0, starsMSG
jal txstr
nop
la $a0, stringsARRAY
jal do_print_strings
nop
sort:
do_print_strings:
subu $sp, $sp, 8
sw $ra, 4($sp)
sw $a1, 0($sp)
move $a1, $a0