Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: MARIE Programming

  1. Nov 27, 2012 #1
    1. The problem statement, all variables and given/known data

    Write a MARIE program that repeatedly receives a sequence of decimal digits (one digit at a time) and counts the number of occurrences of ‘0’ and stores it in memory location Count until a non-digit is received. Assemble and run your program using the MARIE simulator

    2. Relevant equations

    http://www.edwardbosworth.com/CPSC2105/Lectures/Slides_05/Chapter_04/MARIE_Organization.htm

    3. The attempt at a solution

    I start with reading user input, but how do i check how many zeroes are in the input if i can only add/subtract values?
     
  2. jcsd
  3. Nov 27, 2012 #2

    rcgldr

    User Avatar
    Homework Helper

    The MARIE processor also has a SKIPCOND instruction, how could you make use of that?
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook