GithubHelp home page GithubHelp logo

mips2's Introduction

MIPS Programming Assignment 2

Description:You will write a MIPS program that reads a string of up to 1000charactersfrom user input.The string consists of one or more substrings separated by comma. Spaces or tabsat the beginning or end or around commas areignored, those spaces or tabs should stay. For each of the substring, if it is a hexadecimal string, i.e. it has only the characters from '0' to '9' and from 'a' to 'f'and from 'A' to 'F', and it is of no more than 8 characters, the program prints out the corresponding unsigneddecimalinteger.If the hexadecimal string has more than 8 characters, the program prints out thestring of “too large”. Otherwise, the program prints out thestring of “NaN”. Empty stringsbefore the first comma,between commas or after the last comma are alsoconsidered “NaN”. The output should be separated by commas in the same way as the input.The program must have the following3 subprograms.Subprogram 1:It converts a single hexadecimal character to a decimal integer. Registers must be used to pass parameters into the subprogram. Values must be returned via registers.Subprogram 2:It converts a single hexadecimal string to a decimal integer.It must call Subprogram 1 to get the decimal value of each of the characters in the string. Registers must be used to pass parametersinto the subprogram.Values must be returned via the stack.Subprogram 3:It displays an unsigned decimal integer. The stackmust be used to pass parametersinto the subprogram.No values are returned.The main program must call Subprogram 2 for conversion and call Subprogram 3 for output.

mips2's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.