Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/08/11 09:20
Read: times


 
#184139 - Translation into assembler task of programmer.
Responding to: ???'s previous message
Rajesh Kumar said:
Thanks for very good tutorial and suggestions but sir, I am not familiar with 'C'. If Possible please guide through ASM.

It was not C. It was pseudo-code.

But I can't translate it to assembler without actually doing your job.

What I posted is similar to a flow-chart, showing a concept. It really, really, really is up to you to have the skills - or get the skills - to convert from a conceptual design into actual assembler instructions.

In C, some people initially have a bit of a problem with arrays and pointers - basically the concept of an address. The assembler instructions operates on numbers. Sometimes numbers stored in registers. Sometimes immediate values. Sometimes numbers stored in memory cells, with other numbers representing the memory address. My pseudo-code does not really contain anything that is hard to translate into assembler.

Going all the way to a loop-based animation with multiple patterns selectable may be a bit tricky - which table of LED values to emit, and how long the sequence is, for each of the defined sequences. But that is a specific problem that can be handled by specific, and targeted, questions if you do get stuck there. But that too can be handled by an array giving start of sequence, and length of sequence.

You really can't be the programmer if you don't do your own translations into actual code. C, Pascal, assembler or whatever you have decided.

You probably think you are smart and saving time by asking for help with actual code. In reality, you are costing yourself lots of time. Own work will mean that you understand the code. Own work will mean you learn, so you can write your next program that much faster. Own work means that you can get progress at the time when you are sitting at the computer - you don't have to wait for any turn-around time on a forum, chatting with people living in other time zones and having their own life taking up their time.

The main goal can't be to get a program to present a running light. The main goal must be to improve your knowledge in programming microcontrollers. And as with all learning, that takes time. Time that can only be spent by you. If you feel that you don't want that, then it's time to take a chat with your tutor.

List of 36 messages in thread
TopicAuthorDate
Speed control of running adancing LEDs            01/01/70 00:00      
   Duplicate Posting            01/01/70 00:00      
      This is just an inadequately understood homework problem            01/01/70 00:00      
   Design your code, make it pretty.            01/01/70 00:00      
   RE: please suggest some idea            01/01/70 00:00      
      I totally agree with ANDY            01/01/70 00:00      
         Very unhelpful comments            01/01/70 00:00      
            Thank you sir            01/01/70 00:00      
               While analysing the problem            01/01/70 00:00      
               Translation into assembler task of programmer.            01/01/70 00:00      
   'subb' instruction            01/01/70 00:00      
      Yes, debounce is definitely good to have.            01/01/70 00:00      
         Got Success !            01/01/70 00:00      
            What is the final code?            01/01/70 00:00      
               homework is done..            01/01/70 00:00      
               Surely not secret, at least for my seniors            01/01/70 00:00      
               Teacher will know            01/01/70 00:00      
                  Don't worry            01/01/70 00:00      
                     What code?            01/01/70 00:00      
                     You must show your effort.            01/01/70 00:00      
                        yes, it's another "gimmee", yet nobody sees it            01/01/70 00:00      
                           what's the problem            01/01/70 00:00      
                              Why ever source current for driving LEDs?            01/01/70 00:00      
                              true enough, but is that what he did?            01/01/70 00:00      
                           I think everybody saw that?            01/01/70 00:00      
                              Cleverness            01/01/70 00:00      
                                 Stange !            01/01/70 00:00      
                                    because it is            01/01/70 00:00      
                                    Yes, often very obvious when copied code turned in            01/01/70 00:00      
                              I agree with Andy            01/01/70 00:00      
                                 the key word is 'help'            01/01/70 00:00      
                                    May not be an achievement for you            01/01/70 00:00      
                                       So ... where's the evidence of your struggle?            01/01/70 00:00      
                                    problem can be outside            01/01/70 00:00      
                                    This is certainly correct!            01/01/70 00:00      
   About sinciarity            01/01/70 00:00      

Back to Subject List