Created
June 7, 2025 14:00
-
-
Save eeeeeeeeeevan/0377957ea38b42728cdea4500843a59c to your computer and use it in GitHub Desktop.
playing with MIPS asm - fuckass shitty lcg impl
This file contains hidden or 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
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