Skip to content

Fixed some errors in some MIPS assembly files#1

Open
zrmin wants to merge 4 commits into
uu-os-2018:masterfrom
zrmin:zrmin
Open

Fixed some errors in some MIPS assembly files#1
zrmin wants to merge 4 commits into
uu-os-2018:masterfrom
zrmin:zrmin

Conversation

@zrmin
Copy link
Copy Markdown

@zrmin zrmin commented Apr 18, 2023

There's one bug in jump_and_branches.s Line 64 (after I fixed, Line 69).
To initialize $s0 = 0, should use andi $s0, $s0, 0, but not addi $s0, $s0, 0, because the Mars initializes all registers to 0, so the instruction addi $s0, $s0, 0 do not become a bug when you run this file, but we should better use andi $s0, $s0, 0.

zrmin added 4 commits April 18, 2023 19:10
 位于分支 zrmin
 要提交的变更:
	修改:     basics.s
        assemlator --> assembler
        $ta        --> $at
        lw         --> sw
        (syscall(  --> (syscall)
        $a0        --> $v0
 位于分支 zrmin
 要提交的变更:
	修改:     jump_and_branches.s
        Line64   addi $s0, $s0, 0  -->  andi $s0, $s0, 0
        Line109  $t0 < $1          -->  $t0 < $t1
        Line109  less_than         --> less_than_1
        Line121  print             --> print_1
        Line139  greater_or_equal  --> not_less_than_2
        Line182  Add two lines of assembly instructions under the
                 comment "This code will never be reached"

                 li $v0, 10
                 syscall
 位于分支 zrmin
 要提交的变更:
	修改:     arrays.s
        Line37  consequtive          -->  consecutive
        Line46  stirngs              -->  strings
        Line53  a address (pointer)  -->  an address, a.k.a. a pointer
 位于分支 zrmin
 要提交的变更:
	修改:     subroutines.s
        Line54  li $0, 0x1234abcd  -->  li $t0, 0x1234abcd
        Line141 $a                 --> $a0
        Line143 "Hi <name>         --> "Hi <name>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant