add character to array

This topic contains 1 reply, has 2 voices, and was last updated by  ChrisImgtec 2 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31862

    I try to add letter ‘1’ into an array but it doesn’t work. Here is my code. Can somebody help me, please 🙁
    .data
    time: .space 12

    .text
    main:
    la $a0, time
    li $t0, 49
    sb $t0, 0($a0)
    addi $a0, $a0, 1
    sb $zero, 0($a0)
    li $v0, 4
    syscall

    li $v0, 10
    syscall

    #39107

    ChrisImgtec
    Moderator

    Should work! Why do you think it doesn’t?

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.