# LC-3 Sim Help

Yea...so I hate assembler and the LC-3. But I have this homework problem, and I don't know how to do it...I don't want the answers, but help on getting started would be greatly appreciated, also any advice on making assembler easier or understanding it better:
1. Given an array of 25 integer decimal numbers in the range 0,1,.., 100, find the number of values that are:

A. < 60

B. 60 <= and < 70

C. 70 <= and < 80

D. 80 <= and < 90

E. >= 90

At the end of the program, put the number of values for each range in registers. Item A into R0, Item B into R1, C in R2, D in R3 and E in R4. Make up your own test data, but make sure it has at least one value in each range.

• : Yea...so I hate assembler and the LC-3. But I have this homework problem, and I don't know how to do it...I don't want the answers, but help on getting started would be greatly appreciated, also any advice on making assembler easier or understanding it better:
: 1. Given an array of 25 integer decimal numbers in the range 0,1,.., 100, find the number of values that are:
:
: A. < 60
:
: B. 60 <= and < 70
:
: C. 70 <= and < 80
:
: D. 80 <= and < 90
:
: E. >= 90
:
: At the end of the program, put the number of values for each range in registers. Item A into R0, Item B into R1, C in R2, D in R3 and E in R4. Make up your own test data, but make sure it has at least one value in each range.
:
:

You obviously need to use routines that use BGE or BLE or similiar ASSEMBLER commands.

Branch if Greater than or Equal to and
Branch if Less than or Equal to.
Test each number based on the value and INCrement a byte in memory from zero upwards and copy the values at the end to R1,R2 etc.

Hope this helps? :-)