??? 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. |