Skip to content

Instantly share code, notes, and snippets.

@eeeeeeeeeevan
Created June 7, 2025 14:00
Show Gist options
  • Save eeeeeeeeeevan/0377957ea38b42728cdea4500843a59c to your computer and use it in GitHub Desktop.
Save eeeeeeeeeevan/0377957ea38b42728cdea4500843a59c to your computer and use it in GitHub Desktop.
playing with MIPS asm - fuckass shitty lcg impl
main:
li $v0, 4
la $a0, prompt
syscall
li $v0, 5
syscall
move $t0, $v0
lw $t1, a
lw $t2, c
lw $t3, m
mult $t0, $t1
mflo $t4
addu $t4, $t4, $t2
andi $t4, $t4, 0x7FFFFFFF
move $a0, $t4
li $v0, 1
syscall
li $v0, 10
syscall
.data
prompt: .asciiz "enter seed: "
a: .word 1103515245
c: .word 12345
m: .word 2147483648
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment