I discourage private questions simply because I believe that runs counter to the purpose of a forum: to disseminate information widely with a single presentation.
I recently received this question. I'm repeating it here, with my answer, because more than one person may find it useful.
Quote:
|
Originally Posted by Question
I'm a beginning EE student and work part time as a EE assistant. At work I'm working on some automotive lights that include a PIC10f206, a led driver, and a few LEDS. The lights are supposed to flash and stuff with a program that I'm supposed to write in assembly code using the datasheets. I understand the basic concept of assembly, but I'm very new to it. I have written a simple hello world program that flashes a few leds and stuff, but thats about it. I have no previous programming knowledge, so the concept is pretty new. I have picked up a few C programming books. But I haven't really sat down and read them. I would like to ask you on what a good way is to practice/get better at assembly. Maybe if I start off with another language, or maybe there some steps to take. I tried looking through the other threads, but I couldn't grasp any solid answers. Anything that can help me better understand the methods of assembly will help. Thank you for your time, sorry for the long post, just looking for some help.
|
Quote:
|
Originally Posted by Reply
Learning a higher-level language can help you adapt to solving problems using a tool which is VERY literal in the way that it follows instructions. One has to develop clarity of thought and accuracy of semantics and syntax.
Beyond that, a higher-level language is a handicap to learning assembly language. The whole purpose of the higher level language is to insert a layer of abstraction that divorces one as much as possible from the Von Neumann paradigm. Obviously, we can solve problems more effectively if we can think like humans, and not like a incredibly literal and stupid machine.
The way to learn assembly language is to learn what the hardware needs. Software is software only because it is easily modified. In the end, it's a list of signals used to turn on gates and clock clocks and combine signals in a logic device.
Learn how a very basic microprocessor works. How it gets this list of signals and applies them to an ALU, and what it does with the results at the output of the ALU. Then break down your requirements into pieces. Keep breaking down the pieces into ever smaller pieces. Soon, you'll get down to one or a few assembly language instructions. Take these groups and build them back up.
Eventually, you'll be thinking in assembly language. Just don't forget how to turn that off when you go back to a higher level language.
|