Page 1 of 1
Assembly Language of Today
Posted: Sat May 24, 2008 6:35 am
by html81993
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?
Posted: Sat May 24, 2008 7:16 am
by 01000101
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.
Posted: Sat May 24, 2008 9:57 am
by Dex
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
Posted: Sat May 24, 2008 8:34 pm
by bewing
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.
Posted: Sun May 25, 2008 3:49 am
by Korona
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.
Posted: Mon May 26, 2008 12:36 pm
by html81993
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)?
Posted: Mon May 26, 2008 12:59 pm
by Dex
If you use FASM you can simply do this
c:\fasm MyFile.asm MyFile.exe <enter>
PDP - 11
Posted: Tue Jun 03, 2008 2:49 am
by DeletedAccount
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
Posted: Tue Jun 03, 2008 3:24 am
by Brendan
Hi,
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)?
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")...
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