Skip to content

MASM program that implements macros and procedures to read and convert ascii digits to their numeric value representations (SDWORD), and vice versa

Notifications You must be signed in to change notification settings

kristinical/assembly_language_string_primitives_macros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

String Primitives and Macros

Portfolio assignment for CS 271: Computer Architecture & Assembly Language course at Oregon State University

Program Description

Write and test a MASM program to perform the following tasks:

  • Implement and test two macros for string processing

    • mGetString: Display a prompt (input parameter, by reference), then get the user’s keyboard input into a memory location (output parameter, by reference)
    • 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:
      • Invoke the mGetString macro to get user input in the form of a string of digits
      • 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.)
      • Store this one value in a memory variable (output parameter, by reference)
    • WriteVal:
      • Convert a numeric SDWORD value (input parameter, by value) to a string of ASCII digits
      • 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:

    • Get 10 valid integers from the user
    • Stores these numeric values in an array
    • Displays the integers, their sum, and their truncated average

About

MASM program that implements macros and procedures to read and convert ascii digits to their numeric value representations (SDWORD), and vice versa

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published