Skip to content

Instantly share code, notes, and snippets.

View tremblerz's full-sized avatar
💭
I may be slow to respond.

Abhishek Singh tremblerz

💭
I may be slow to respond.
View GitHub Profile
@tremblerz
tremblerz / gist:ba49bd7a320c4597df40
Created February 11, 2016 19:14 — forked from MicBrain/gist:679724000d4bb87663aa
Recursive Method of Fibonacci numbers in MIPS
.text
main:
li $a0, 5
jal fib
move $a0, $v0
jal print_int
jal print_newline
fib:
addiu $sp, $sp, -12
@tremblerz
tremblerz / fparray.s
Created February 11, 2016 19:13 — forked from vaskaloidis/fparray.s
Mips Single Precision Floating Point Unit (FPU) Array
.data
break: .asciiz "\n"
ask: .asciiz "Please enter a random 4 digit number for a seed: "
input: .float 4
list : .word 100
@tremblerz
tremblerz / mergesort.asm
Created February 11, 2016 19:13 — forked from jmc734/mergesort.asm
Merge Sorting an Indirect Array in MIPS Assembly
.text
la $a0, info # Load the start address of the array
lw $t0, length # Load the array length
sll $t0, $t0, 2 # Multiple the array length by 4 (the size of the elements)
add $a1, $a0, $t0 # Calculate the array end address
jal mergesort # Call the merge sort function
b sortend # We are finished sorting
##
@tremblerz
tremblerz / str.asm
Created February 11, 2016 19:12 — forked from montycheese/str.asm
map a char freq in MIPS assembly lang
.data
str1: .asciiz "Enter String: "
#.align 2
getc: .asciiz "Enter char: "
#.align 2
ret: .asciiz "Character <ch> occurs in string <string> <n> times"
buffer: .space 100 #space to store our string
L1: .space 2 #space for our char
L2: .space 4 #space for our char’s frequency in string