Giter Club home page Giter Club logo

osu-cs271-project's Introduction

String Primitives and Macros

  • Oregon State University CS 271 Winter 2022 Portfolio Project
  • README adopted from course module

Introduction

The purpose of this assignment is to reinforce concepts related to string primitive instructions and macros

  • Designing, implementing, and calling low-level I/O procedures
  • Implementing and using macros

Program Description

Write and test a MASM program to perform the following tasks

  • Implement and test two macros for string processing. These macros should use Irvine’s ReadString to get input from the user, and WriteString procedures to display output.
    • mGetString: Display a prompt (input parameter, by reference), then get the user’s keyboard input into a memory location (output parameter, by reference). You may also need to provide a count (input parameter, by value) for the length of input string you can accommodate and a provide a number of bytes read (output parameter, by reference) by the macro.
    • mDisplayString: Print the string which is stored in a specified memory location (input parameter, by reference).
  • Implement and test two procedures for signed integers which use string primitive instructions
    • ReadVal:
    1. Invoke the mGetString macro (see parameter requirements above) to get user input in the form of a string of digits.
    2. Convert (using string primitives) the string of ascii digits to its numeric value representation (SDWORD), validating the user’s input is a valid number (no letters, symbols, etc).
    3. Store this one value in a memory variable (output parameter, by reference).
  • WriteVal:
    1. Convert a numeric SDWORD value (input parameter, by value) to a string of ASCII digits.
    2. Invoke the mDisplayString macro to print the ASCII representation of the SDWORD value to the output.
  • Write a test program (in main) which uses the ReadVal and WriteVal procedures above to:
    1. Get 10 valid integers from the user. Your ReadVal will be called within the loop in main. Do not put your counted loop within ReadVal.
    2. Stores these numeric values in an array.
    3. Display the integers, their sum, and their truncated average.
  • Your ReadVal will be called within the loop in main. Do not put your counted loop within ReadVal.

osu-cs271-project's People

Contributors

umjennifer avatar

Stargazers

 avatar

Watchers

 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.