i want to learn an assembly langauge... be it for windows or for linux....
whichever is simpler
also i am guessing there are no real advantages of learning assembly code
and what is the difference between assembly code and embeded code?
Languages I know: Java,VBScript, very little C
but i know many other web related languages but it wont help in learning assembly code
Can you please suggest a book or a valid source from where i can start learning?
If the only "real" programming languages you know are Java and VB then you are not ready for assembly.
Do you know how to manage your own memory usage? Ever heard about the heap and the stack? Are you familiar with memory addresses and offsets? Ever tried to decompile something?
Learn C first. Then you can think about assembly.
If you really want to learn an assembly language I would suggest learning one for neither windows or linux. I would invest in a microcontroller kit designed to be a teaching aide. You can find them starting at $70-100 or so. These kits will also have a much simpler CPU design which will aide in the understanding of the process.
Usually these kits will have a workbook filled with lessons, a microcontroller you can program via usb, and a breadboard that you can wire up additional led/s resistors and hardware to. If you get a good kit will also support manual clock control and hopefully will have an on screen representation of the cpu state on a computer you have it hooked up to.
If you don't know C that well I would also make sure you get a microcontroller with a C compiler. This will also allow you to learn C while learning how it actually executes on the CPU.
-NerdKits seems to have what I'm describing, although I'm sure you can find others, theirs is $80 + s/h currently and seems to have most of what you would need/want.
Thank You Both
requinix - thank you sir...i just bought a book "Let Us C" by yashwanth Kanetkar (indian author) and i have started learning... and since i work on a linux computer i was hoping you could suggest a few books on C that focuses on linux platform...
MBirchmeier - thank you sir and i have never even thought of something like that but now that i know it...i hope i can get my hands on a micro controller with a C compiler...then again it would be tough to get it as i am in India but i will try my level best
I'm guessing you can find an emulator for such a microcontroller pretty easily if you aren't able to get your hands on a physical kit. I wouldn't know where to look, but if you find something worthwhile that's emulated please let me know or post it here.
June 11th, 2011, 01:10 PM
Another time-tested alternative is to use a MIPS simulator such as SPIM or MARS, and learn on that. The advantage of this is that the MIPS architecture is very simple, and you can learn the principles of assembly language quite easily with it, yet it is a real CPU design that is still in use for several kinds of embedded hardware (it was, for example, the processor used in the Playstation and Playstation 2, though the later models switched to another design). While there is no standard C compiler for the simulators, both SPIM and MARS are widely used in compiler theory classes, and it is fairly easy to find toy compilers which will produce easily understood MIPS code (here is one I wrote myself, in Python, though it is for a toy language and only supports the most basic functionality).
The downside of it is that the development tools are generally limited (especially with SPIM), and you wouldn't have many opportunities to work on actual hardware of the type it simulates, unlike with the microcontroller kits. Still, it is an option to consider.
The Language Reference Thread has a section on assembly language, and while some of it is now out of date, at least some of the links should still be helpful.
Last edited by Schol-R-LEA; June 11th, 2011 at 01:27 PM.
June 25th, 2011, 10:37 AM
Thank You For Yor Reply Both Of YOu
i am really exited about the nerd kit idea and i have got glued to it
i dont intend to learn it any other way for now....as... what better way than learn something that will actually result in a physical achievement