Help me with this assembly language exercise

Discussion in 'Programmer's Corner' started by lephuduc, Oct 24, 2012.

  1. lephuduc

    Thread Starter New Member

    Oct 11, 2012
    Can anyone help me to write the code for the exercise below? I'm working with PCSpim.
    The following is a sample of a program output given the inputs 1 - 5:
    Enter an integer: 1
    Enter an integer: 2
    Enter an integer: 3
    Enter an integer: 4
    Enter an integer: 5
    Enter an integer: 0
    The number of entries = 5
    The sum = 15
    Write a program which uses a loop to accept an unspecified number of integer inputs, keep track of how many entries are made, and calculate a running sum of the entries. When a value of '0' is entered by the user, output the results and exit the program.
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    Do you know what pseudo-code is? Just write in your native language how you would solve this problem... Then worry about programming it in Assembler (or any other language for that matter)