andersch.dev

<2023-04-10 Mon>
[ os ]

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:

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

Resources