Git Product home page Git Product logo

assembly_exercises's Introduction

Assembly_exercises

Some Risc-V assembly exercises from the discipline Computer Architecture and Organization. Each exercise statement is presented below and the correpondent solution in the file "ex_.asm".

Exercise 1: Read an integer from the keyboard and write it on the console. End the program with the system call.

Exercise 2: Read two integers from the keyboard and write the result of their sum on the console.

Exercise 3: Read a sequence of keyboard integers, add them up and print the result. The first number read indicates the number of integers to be read and added. End the program with the system call.

Exercise 4: Read an integer from the keyboard and determine if it is an odd or even number. Print on the screen "Eh par" or "Eh impar" in response. End the program with the system call.

Exercise 5: Make the lowercase characters in a sentence uppercase. It does not change capital letters, digits or special characters. End the program with the system call.

Exercise 6: Read an integer from the keyboard and print the number of bits in 1 in its binary representation. End the program with the system call.

Exercise 7: Read 3 integers from the keyboard, in order, a, b and c. Calculate and print the result of the expression: a + b*c. End the program with the system call.

Exercise 8: When reading a keyboard string with the system call a7 = 8, the function returns the string with the character new line ('\n') at the end. Make a function that receives the memory address of a string in a0 and replaces the character '\n' with zero, indicating the end of the string.

assembly_exercises's People

Contributors

alexxcunha avatar

Stargazers

Troy Timmerman avatar Marcos Eduardo M. Junqueira avatar

Watchers

 avatar

Forkers

zeng-xiao

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.