Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 26th, 2007, 10:15 PM   #1
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Assembly Language

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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MIPS assembly language cwl157 Assembly 41 Dec 4th, 2006 10:00 PM
Assembly Language for Intel-Based Computers melbolt Book Reviews 0 Aug 15th, 2006 12:04 AM
More languages? UnKnown X Coder's Corner Lounge 27 Dec 18th, 2005 3:06 PM
Does assembly language vary per machine? Xero Assembly 9 Jan 17th, 2005 11:34 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:23 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC