-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add linux mips assembler for gas ABI o32
Since the two assembly examples for MIPS are targeting the SPIM, A MIPS32 Simulator, I felt appropriate to add a Linux version for the same targeting the common o32 ABI. Can be tested on x86 Linux using qemu and cross gcc. The following is for mipsel: $ mipsel-linux-gnu-as -mips32 -EL a/Assembler_mipsel_linux.s -o /tmp/hello.o $ mipsel-linux-gnu-ld /tmp/hello.o -o hello $ qemu-mipsel ./hello
- Loading branch information
1 parent
b0bd238
commit c8297d9
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.rdata | ||
.align 2 | ||
hello: .asciz "Hello world\n"<0> | ||
.align 4 | ||
length: .word . - hello | ||
.text | ||
.globl __start | ||
__start: | ||
move $a0,$0 | ||
la $a1,hello | ||
lw $a2,length | ||
li $v0,0xfa4 | ||
syscall | ||
li $v0,0xfa1 | ||
syscall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters