Assembly Language of Today
Assembly Language of Today
I looked at the required reading on the wiki and saw that I needed to know assembly language. I have a book on the PDP-11s assembly language. If I read that, do you think it will at least give me the basics for starting assembly language?
I have no idea... but that alone leads me to believe that it's not the beaten path.
I would recommend reading The Art of Assembly (google it), or learn some INTEL syntax assembly through google as well. I'd start making a few applications, like a calculator or something and see if you have the hang of things.
I would recommend reading The Art of Assembly (google it), or learn some INTEL syntax assembly through google as well. I'd start making a few applications, like a calculator or something and see if you have the hang of things.
Website: https://joscor.com
We are all still learning asm, but for the basic's i found the book "IBM PC Assembly Language and Programming by Peter Abel" very good.
Or a good asm tut for download(if abit old now) is Adam's asm tuts
http://www.programmersheaven.com/downlo ... nload.aspx
Or a good asm tut for download(if abit old now) is Adam's asm tuts
http://www.programmersheaven.com/downlo ... nload.aspx
Yes, the DEC pdp11 had a decent 16bit assembly language. You would learn about 50% of what you need to know by reading that. You would learn more like 70% if you could find a Motorola MC680x0 user's manual.
But there is at least one completely free PC assembly book available on the web. Google for pcasm-book.pdf, or pcasm-book-pdf.zip
It still won't tell you everything about how to program in ASM -- but the way to learn the rest is just to do it. Get the debugging version of bochs, write some code, and singlestep your way through it, to see how all the opcodes and registers work.
But there is at least one completely free PC assembly book available on the web. Google for pcasm-book.pdf, or pcasm-book-pdf.zip
It still won't tell you everything about how to program in ASM -- but the way to learn the rest is just to do it. Get the debugging version of bochs, write some code, and singlestep your way through it, to see how all the opcodes and registers work.
IMHO you can easily learn x86 assembly language while writing an os. You have to know the basic general purpose registers and some basic instructions. I guess there are many tutorials covering this. You could start coding a small boot loader or a small realmode kernel or you could use grub and write some assembly code for protected mode. After you know the basics understanding assembly code should not be a problem. If you come across an instruction that you don't know simply look it up in the intel or amd manuals. There are also some tutorials about using assembly on linux. Maybe that is a good introduction into x86 assembly.
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
PDP - 11
If you have access to a PDP - 11 machine , then learning it might help . I have learned PDP - 11 , VAX , CRAY - 1 , CYBER -205 and lots of archaic instuction sets and achitectures to pass the university exams , even though i know very well that they are not going to help me
with anthing practical , It can help you bluff in front of you friends .....
Regards
Sandeep Mathew
with anthing practical , It can help you bluff in front of you friends .....
Regards
Sandeep Mathew
Hi,
For learning assembly language, there's fundamentals (learning hex, boolean logic, the more general concept of a device that reads a stream of bit patterns and does certain actions depending on which bit patterns it reads, etc) that apply to assembly language for all CPU types. Then there's implementation details - which instructions the target CPU support and how they work (and implementation details for things like memory management, protection, timing, etc). On top of that there's the assembler itself - which syntax (e.g. for 80x86 there's "Intel syntax" and "AT&T"), what preprocessor stuff it supports, which instructions it supports, etc.
Learning (one of the many possible variations of) PDP-11s assembly language will help with the fundamentals, but won't help much with anything else...
Cheers,
Brendan
See the documentation for whichever assembler you choose (there's at least 4 good free assemblers for 80x86), and possibly the linker you're using (if any). The assembler's (and/or linker's) documentation should describe command line options that control the output format, with some details on generating a (DOS, 16-bit) "*.exe" and/or a (Windows/PE, 32-bit or 64-bit) "*.exe" (but for OS development you normally need a flat binary file and not a "*.exe")...html81993 wrote:I have checked out some of the places you guys have suggested. Once I write some code, how do I assemble it into binary (.exe)?
For learning assembly language, there's fundamentals (learning hex, boolean logic, the more general concept of a device that reads a stream of bit patterns and does certain actions depending on which bit patterns it reads, etc) that apply to assembly language for all CPU types. Then there's implementation details - which instructions the target CPU support and how they work (and implementation details for things like memory management, protection, timing, etc). On top of that there's the assembler itself - which syntax (e.g. for 80x86 there's "Intel syntax" and "AT&T"), what preprocessor stuff it supports, which instructions it supports, etc.
Learning (one of the many possible variations of) PDP-11s assembly language will help with the fundamentals, but won't help much with anything else...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.