MIPS
MIPS (Microprocessor without Interlocked Pipelined Stages) is a family of reduced instruction set computer (RISC) instruction set architectures (ISA).
The MIPS assembly language has two primary characteristics:
- All MIPS instructions are 32 bits long
- All MIPS instructions belong to one of three instruction formats
Hello World
in MIPS assembly
.data msg: .asciiz "\nHello, World!\n" .text main: li $v0, 4 # addiu $2, $0, 0x00000004 la $a0, msg # lui $1, 0x00001001 # ori $4, $1, 0x00000000 syscall # prints "Hello, World!" li $v0, 10 # addiu $2, $0, 0x0000000a syscall # ends program
Assemble & run with mars-mips ./hello.asm