1. You can now buy finished microcontroller project from us, Check out the Store for the complete list of projects.
  2. Need a custom project, Send us some details about your project. So that we can quote the price for it.

Edsim51 Assignment

Discussion in 'Project Doubts' started by FS7, Feb 7, 2012.

  1. FS7

    FS7 New Member

    Likes Received:
    0
    Trophy Points:
    0
    Hello. I am new to this forum.
    I have a college assignment that I had to deliver a few weeks back but I wasn't able to make it. Fortunatelly on exams season there's the chance to improve the project (in this case make it). I am struggling to understand how to make it but I don't know how to start it.


    They give me this code:
    Code (Text):
    1. mov r0, #30h
    2. mov r2, #10
    3. mov a, #122
    4. mov b, #253
    5. ciclo:
    6. mul ab
    7. add a,b
    8. dec b
    9. mov @r0,a
    10. add a,r2
    11. xrl b,#11011010b
    12. inc r0
    13. djnz r2, ciclo
    14. clr c
    And this is what they ask us to make:

    "Write a routine that traverses the memory cells of the address 0x30 to 0x39, where are the numerical values generated, and analyse them by detecting, for each one, whether it is odd or even and noting how many there are in each case. At the end, should be written in the memory cell 0x40 the amount of even values found and in the 0x41 the amount of odd values found in the sequence of numbers analyzed."

    I wonder if you can help me out with this project.

    Thank you guys in advance.
Loading...

Share This Page