想學習並精通 MIPS Assembly 嗎?

加入 Exercism 的 MIPS Assembly 學習軌道,即可獲得 70 個練習 並享有程式碼自動分析 以及 個人導師引導, 全部100% 免費。

關於 MIPS Assembly

# Convert ascii string of binary digits to integer
#
# $a0 - input, pointer to null-terminated string of 1's and 0's
# $v0 - output, integer form of binary string
# $t0 - ascii value of the char pointed to
# $t1 - integer value (0 or 1) of the char pointed to

.globl binary_convert

binary_convert:
        li      $v0, 0                  # Reset accumulator to 0.

loop:
        lb      $t0, 0($a0)             # Load a character,
        beq     $t0, $zero, end         # if it is null then return.
        sll     $v0, $v0, 1             # Otherwise shift accumulator left,
        addi    $t1, $t0, -48           # calculate the value of the character,
        or      $v0, $v0, $t1           # and add that to the accumulator.
        addi    $a0, $a0, 1             # Finally, increment the pointer
        j       loop                    # and loop.

end:
        jr $ra

在 Exercism 上,MIPS Assembly 共有70 個程式設計練習。 從 井字遊戲的狀態 到 埃特巴什密碼。


透過 Exercism 上有趣又有成就感的程式設計練習,測試你對各種概念的理解,讓你的程式設計能力更上一層樓。

查看 Exercism 上所有 MIPS Assembly 練習

MIPS Assembly 的核心功能


MIPS Assembly

易於學習

MIPS 是一套簡單的組合語言,常用於大學的電腦架構課程。

廣泛使用

MIPS 是數十億出貨產品的核心。

詳盡的說明文件

MIPS 有廣泛的說明文件,尤其在電腦架構的學術著作中更是如此。

快速

精簡的指令帶來快速的執行速度,這從它問世以來一直是一大特色。

精簡

作為以 RISC 為基礎的組合語言,它擁有精簡且正交的指令集。

穩定

MIPS 於 1985 年首次問世,不斷演進以迎接新挑戰,並自 2014 年起維持穩定。

以 MIPS Assembly 的方式獲得引導

每種語言都有自己做事的方式。MIPS Assembly 也不例外。我們的導師會幫助你學會像 MIPS Assembly 開發者那樣思考,以及如何寫出 道地的 MIPS Assembly 程式碼。解完一個練習後,把它提交給我們的 志工團隊,他們會給你提示、想法和回饋,告訴你 怎麼寫得更像你在 MIPS Assembly 中平常會看到的樣子。他們也會幫助你發現那些 你不知道自己不知道的事。

進一步了解引導

由社群提供的 MIPS Assembly 練習

Exercism 上的 MIPS Assembly 學習軌道有 70 個練習,幫助你寫出更好的程式碼。

查看所有 MIPS Assembly 練習
MIPS Assembly

開始使用 MIPS Assembly 學習軌道

最棒的是,它對所有人 100% 免費。

加入 MIPS Assembly 學習軌道