Category Archives for MIPS assembly language

MIPS Floating Point Architecture using PCSPIM

    MIPS floating pointing architecture using pcspim

    Working with MIPS Floating Point Architecture using PCSPIM Until now we have checked only integer computations  in PCSPIM from our last tutorials, but in reality computations also involve floating point arithmetic. For this purpose MIPS supports various floating point instructions along with having 32 special floating point registers $f0 − $f31. Some very interesting facts […]

    Continue reading

    Recursion and Sorting in the MIPS Assembly Language

      MIPS system calls table

      Recursion (Factorial) in MIPS assembly language Recursion  occurs when a function/procedure calls itself. Following is the C++ code of a program that performs the factorial operation through recursion. It has two parts. The first part is the main part of the program that takes some integer as the input from the user, passes this number […]

      Continue reading

      Multiplication and Division in MIPS Assembly Language

        Division of numbers in MIPS

         Integer Multiplication in the MIPS Assembly Language The generic form of the mult (signed integer multiplication) and multu (unsigned integer multiplication) instructions is: Signed Integer Multiplication:              mult  $Rs, $Rt Unsigned Integer Multiplication:          multu $Rs, $Rt mult and multu belong to the Arithmetic Core Instruction Set and are R-type instructions where $Rd, the destination […]

        Continue reading

        MIPS System Calls, Procedure Calls and Using the Stack

          MIPS system calls

          SYSTEM CALLS in MIPS: System call is used to communicate with the system for reading from keyboard or writing to the screen. A System call requires some parameter to be passed in a particular register and a request/function number (or service code) to be passed in register $v0. Steps for using System Calls: Load service code […]

          Continue reading

          PCSPIM: MIPS Control Instructions and working with Arrays

            MIPS control instructions

            MIPS  Control Instruction: Summing the first ten integers Lets understand mips control instruction by examples. Followings are the MIPS control instructions. There are two types of MIPS control instructions. Branch instruction: These are conditional mips control instructions. These instructions includes branch if equal to, branch if greater than, branch if less than instruction. I will […]

            Continue reading

            pcspim tutorial : Getting started with MIPS instructions set simulator

              pcspim tutorial for mips instructions simulator

              PCSpim is a freely available personal computer simulator for MIPS. It simulates behavior of a MIPS processor on an Intel based machine. SPIM was originally developed by Dr James Larus at the University of Wisconsin, Madison around 20 years ago. You can download it from the University of Wisconsin, Madison website: http://www.cs.wisc.edu/~larus/SPIM/pcspim.zip. Using this simulator […]

              Continue reading