Assembly:Where to start?

timog

Active Member
Joined
Sep 16, 2010
Messages
31
Reaction score
0
Location
South Africa
Hey I can program in C,little bit in Python and Pacal and I really want to learn assembly. I'm 18 and finishing high school, programming is my hobby because school work sure isn't much of a challenge.

I've downloaded a few books on Assembly they are: The Art of Assembly,Assembly for Beginners, Assembly for Complete Beginners and Wrox Professional Assembly Language. I also downloaded a FASM, MASM and HLA compiler.

Now a few questions.
1.)The examples in the Assembly for Complete Beginners are for MASM, should I run them in an emulator,someone told me that I can damage my pc if I don't use one, and if yes which emulator should I use?

2.)Also how do developers make their assembly code portable? The only info I've found on this topic are on writing viruses,since virii written in assembly have to be portable.

3.)What exactly is HLA and is it the real thing or just a HLL disguised as assembly to help teach beginners assembly?

4.)And where is the assembly community, except for on the obvious vxheaven and cracker websites?


I am reading allot lately but I feel like someone whose learning Latin, but will never make it to the Vatican to meet others who speak Latin. My friends all program in Java,but don't seem to care about C or C++,they think they can use Java for everything. I'm running Windows 7 and Ubuntu 10.0.10 on an Intel. I've only been programming for about a year now...am I diving into assembly too soon? My reasons for wanting to learn assembly: 1. Want to understand more on how CPU's work. 2. Looking for a challenge. 3. Want to learn to write efficient code. 4. Want to write smaller en faster programs. 5. Want to learn more about OS dev when I have mastered assembly. 6. If I master assembly, learning more HLL would be easier. 7. Want to have something to offer when applying for a job that others won't have. 8. Interested in AVR for example the Arduino,which uses C and not assembly but would like to understand more about AVR. Thanks. Timo
 
No, you won't damage your PC, although it might lock up some subsystem and cause you to reboot your PC.

If you're looking at doing low-level HDD access, then you absolutely must use a virtualized PC.

In general you can use a virtual PC to test your code out. Quicker and less hassle than using a physical PC.

This way, should it hang, you can simply reset the VM. Or just restore the main backup image and continue without having to reinstall Windows.

VirtualBox is a good place to start looking at virtual PC's. --> http://www.virtualbox.org/

Enjoy it - I dabbled a bit in the dark arts as well, very interesting.

And you must comment your code, it's easy to forget what you programmed...
 
Reply

Thanks makes alot of sense. I liked your comment:"Enjoy it - I dabbled a bit in the dark arts as well, very interesting. " Lol
 
Last time I checked, myBB only allowed 19 year-olds upwards. :)

I was thinking more along the lines of you have to be at least 21 to learn Assemby? ;)

/jk, @timog - good on you mate for taking up a challenge, and trying something new, I salute you.
 
First step is to figure out WHY you want to learn assembly, which it seems like you already know.

Next step is to choose a particular architecture. x86 assembly isn't really the best place to learn due to its CISC nature.

Then all you need to do is start reading.

I would rather start with something like PIC programming.
1) It has a VERY flat learning curve.
2) You can get stuff going in a very short time.
3) The Microchip documentation is encyclopedic.
4) There are really a LOT of good websites that offer tutorials, etc.
5) The experience will let you learn about how micro architectures work in a more practical way.
6) The experience will help you get a job, if you wanted it; x86 assembly development jobs aren't very common.

If you need to get started in PIC assembly, you'll need
1) A PIC (I can give you some if you like).
2) A PIC programmer (I can help you build one; great learning experience).
 
I am reading allot lately but I feel like someone whose learning Latin, but will never make it to the Vatican to meet others who speak Latin. My friends all program in Java,but don't seem to care about C or C++,they think they can use Java for everything. I'm running Windows 7 and Ubuntu 10.0.10 on an Intel. I've only been programming for about a year now...am I diving into assembly too soon? My reasons for wanting to learn assembly: 1. Want to understand more on how CPU's work. 2. Looking for a challenge. 3. Want to learn to write efficient code. 4. Want to write smaller en faster programs. 5. Want to learn more about OS dev when I have mastered assembly. 6. If I master assembly, learning more HLL would be easier. 7. Want to have something to offer when applying for a job that others won't have. 8. Interested in AVR for example the Arduino,which uses C and not assembly but would like to understand more about AVR. Thanks. Timo

IMHO the only valid point is point #1. I'm a computer engineering student who codes C on microchip devices for some of my subjects. we code in C which gets compiled into Assembly and normally the compiled Assembly is usually very very efficient (very little further optimizations can be done even for large programs, ofcourse this requires you to code in C efficiently for this to be true)

In SA i dont know how important knowing Assembly is. It is usefull to know, you learn about RISC and how to deal with devices with different architectures. if you dont plan on setting out your career on small chips or programmable devices then i dont see much point for you to learn Assembly. Programs are far to complex to be coded in Assembly these days.

But hey you can never learn too much :D g0g0g0
 
First step is to figure out WHY you want to learn assembly, which it seems like you already know.

Next step is to choose a particular architecture. x86 assembly isn't really the best place to learn due to its CISC nature.

Then all you need to do is start reading.

I would rather start with something like PIC programming.
1) It has a VERY flat learning curve.
2) You can get stuff going in a very short time.
3) The Microchip documentation is encyclopedic.
4) There are really a LOT of good websites that offer tutorials, etc.
5) The experience will let you learn about how micro architectures work in a more practical way.
6) The experience will help you get a job, if you wanted it; x86 assembly development jobs aren't very common.

If you need to get started in PIC assembly, you'll need
1) A PIC (I can give you some if you like).
2) A PIC programmer (I can help you build one; great learning experience).

Hi Sn3rd,

I have been wanting to get a PIC kit. Do you perhaps know where I can buy one? Tell me you sell them!! :D

RBD
 
IMHO the only valid point is point #1. I'm a computer engineering student who codes C on microchip devices for some of my subjects. we code in C which gets compiled into Assembly and normally the compiled Assembly is usually very very efficient (very little further optimizations can be done even for large programs, ofcourse this requires you to code in C efficiently for this to be true)

In SA i dont know how important knowing Assembly is. It is usefull to know, you learn about RISC and how to deal with devices with different architectures. if you dont plan on setting out your career on small chips or programmable devices then i dont see much point for you to learn Assembly. Programs are far to complex to be coded in Assembly these days.

But hey you can never learn too much :D g0g0g0

IMO, knowing any Assembly language shows an affinity for logic. This kind of thing is invaluable. You'd be suprised how many "qualified" candidates are logic-challenged.

I disagree that C for PIC is anywhere near as efficient as PIC Assembler.

For the purposes of learning, Assembler, as pointed out, is the way to go. Personally, I just feel more in control with Assembler than with C (on a PIC, at least... x86 is a different story :D).

Hi Sn3rd,

I have been wanting to get a PIC kit. Do you perhaps know where I can buy one? Tell me you sell them!! :D

RBD

lol... Sell them? No, sorry.

You can try http://www.mantech.co.za/ if you're in JHB. I'm sure Sn3rd will know a cheaper place, they're a bit pricey.

The cheapest way is to build it yourself. It requires you to know someone who already has a programmer. I know; you need a programmer to build a programmer... go figure.

Mantech is pricey, but they should do the trick. Otherwise, go direct to Microchip.

What follows is from the Microchip website:
Representatives
Tempe Technologies Pty Ltd
62 Oude Kaap Estates
Cnr Elm & Poplar Streets

Dowerglen, 1609
South Africa
Phone: +27-11-452-0530
Fax: +27-11-452-0543
Email: [email protected]

Tempe Technologies Pty. Ltd.
P. O. Box 2480

Edenvale,, 1610
South Africa
Phone: +27-11-452-0530
Fax: +27-11-452-0543
Email: [email protected]

Distributors
Avnet Kopp PTY LTD.
P. O. Box 3853

Rivonia, 2128
South Africa
Phone: +27-11-444-2333
Fax: +27-11-444-1706

Future Electronics South Africa
201 Icon Corporate, Icon Building
Cnr Loop & Hans Stridom Ave.

Cape Town,
South Africa
Phone: 27 (0) 21 421 8292
Fax: 27 (0) 425 2011
Website: http://www.futureelectronics.com
Email: [email protected]

Mouser Electronics
2 Cliveden Office Village, Lancaster Road
Cressex Business Park, High Wycombe

Buckinghamshire, HP12 3YZ
South Africa
Phone: +44 (0) 1494-467490
Fax: +44 (0) 1494-467499
Website: http://www.mouser.com/microchip/
Email: [email protected]

RS Components SA
1 & 2 Indianapolis Street
Kyalami Business Park or
P.O. Box 12182, Vorna Valley 1686

Kyalami,Midrand
South Africa
Phone: +27 11 691 9300
Fax: +27 11 466 1577
Website: http://www.rssouthafrica.com
Email: [email protected]
 
Ive been using this puppy http://www.cypress.com/?rID=38235 for a while now. it is amazing.

I've also been using Freescale GT16 here and there in pure assembly

going forward in this day and age Assembly will become less relevant as tech evolves. yes its a good learning experience. tonnes of research has been thrown into the differences between C compiled Assembly and Normal handwritten assembly and the results are compelling. yes off the bat Assembly is faster but at the end of the day you can achieve what you want quicker because C is more human friendly.

Like i said. Learn Assembly anyways, the more you know the better!
 
Top
Sign up to the MyBroadband newsletter
X