News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Anyone have exerpience with mips?

Started by Kyobreck, June 15, 2016, 10:45:08 PM

Previous topic - Next topic

Kyobreck

Apparently it's another assembly langauge? I'm gonna play with it, anyone have any experiences.
https://github.com/KyobreckKyobreck

mineiro

Only a noob inside of my part sir Kyobreck.
Mips is another architecture (processor), so yes, it have their own assembly language.
I have played a little to guide you, but, have simulators around the net (the way that I have started). You can use Qemu as a virtual machine, or you can use a more friendly simulator as "spim" (to windows and linux), look details about:
"Emulates a MIPS R2000/R3000 processor in software. Useful for students who are taught MIPS R2000/R3000 assembly.

SPIM S20 is a software simulator that runs assembly language programs for the MIPS R2000/R3000 RISC computers. SPIM can read and immediately run files containing assembly language statements. SPIM is a self-contained system for running these programs and contains a debugger and interface to the operating system."

Follows a simple code to you get started:
.data
msg1: .asciiz "\nType a number :"
msg2: .asciiz "Factorial is:"
msg3: .asciiz "Number outside scope, getting out\n"
lf:   .asciiz "\n"

.text
main:
#this is a comment, echo on output standart device: "type a number"
li $v0,4
la $a0,msg1
syscall

#read of input device an interger
li $v0,5
syscall
#this "call" returns value on register v0

#saving return value on another register to later action
move $s0,$v0
#number is behind 1 and 19? case yes, go on, if not goto forafaixa
#ps, factorial of number 20 is not allowed
blt $v0,1,forafaixa
bgt $v0,19,forafaixa

#lets multiply by 1, the valid start number
li $v0,1


#if number 1, it's done, if not, multiply by saved value on acumulator acumulador
#and sub 1 of acumulator, repeat while
novamente:
beq $s0,1,feito
mul $v0,$v0,$s0
sub $s0,$s0,1
j novamente
feito:

#move value to other register
move $s0,$v0

#echo 2nd message
li $v0,4
la $a0,msg2
syscall

#echo an interger number
li $v0,1
move $a0,$s0
syscall

#echo a new line
li $v0,4
la $a0,lf
syscall

#return control to system, get out
li $v0,10
syscall

forafaixa:
li $v0,4
la $a0,msg3
syscall
li $v0,10
syscall
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

anunitu

Found this,but not clear just where this chip is used.

MIPS (originally an acronym for Microprocessor without Interlocked Pipeline Stages) is a reduced instruction set computer (RISC) instruction set architecture (ISA) developed by MIPS Technologies (formerly MIPS Computer Systems, Inc.). The early MIPS architectures were 32-bit, with 64-bit versions added later.

anunitu


mineiro

computers like Silicon Graphics, devices with Windows Ce, Cisco routers, playstation and nintendo 64, ... .
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

anunitu

So,at least a real chance for perhaps a gig working with it. So maybe my PS3 is done in mips?...Interesting,I may look into the whole idea of learning it.

mineiro

Have a chance to be if it is retrocompatible, my read about say yes, but I do not have sure.
Like x86 to x86-64, but not itanium64 to personal computers.
They probably have inserted more instructions into ps3 processor "Cell Broadband Engine". Their O.S. is XrossMediaBar.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything

Kyobreck

Thanks for the replies guys. I haven't had time to really look over them because I'm in school right now for another 3 hours
https://github.com/KyobreckKyobreck