Translating C to MIPS Assembly Example

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 12

  • @blakewisniewski3750
    @blakewisniewski3750 6 років тому +21

    In line "slt $t2, $s1, $t1" why are you using $s1 and what value does it hold? Shouldnt the middle argument be $a2?

    • @luisponce3580
      @luisponce3580 5 років тому

      That one dislike is from a x86 programmer. Nice video!!!

  • @rajarshigoala2959
    @rajarshigoala2959 3 роки тому +1

    Are there no online tools to do this exactly as he shows. Some of them have lots of extra info.

  • @Yuh0847
    @Yuh0847 2 роки тому

    for line sb $s2, 0(t0), shouldnt we use t1 instead of t2 for img[i] since in the lbu $t1, 0($t0) line it translates to t1 = img[i]? (5:03)

    • @matthewwatkins88
      @matthewwatkins88  2 роки тому

      Well, t1 is not used in that equatiion, so it is hard to say to use it with in mind.

  • @Ravill
    @Ravill 3 роки тому +2

    I feel bad for this video for the lack of comments. I will be the second

    • @lee_dar_39lo
      @lee_dar_39lo 3 роки тому

      " Hashagui dude, I agree with you, so if this counts it is the 3rd :) " - add : ' ikuuu them all ' on league though :)

  • @NSB25445
    @NSB25445 3 роки тому

    Why isn't the addi $s2, $0, 255 instruction inside the loop?

    • @matthewwatkins88
      @matthewwatkins88  2 роки тому +1

      The 255 value is the largest value that this unsighted char could take on. The loop is looking for when the value is less than the largest value it could take on. The loop is looking for the smallest value it takes on. Does that clarify items?

    • @NSB25445
      @NSB25445 2 роки тому

      @@matthewwatkins88 It does, thank you.