Page 1 of 2
Don't know where else to post...
Posted: Wed Apr 08, 2009 3:56 pm
by likeagunfire
Hi all,
I read carefully through forums and didn't find the right place where to ask for this, so sorry if I make any spam.
I want to learn assembler, but do to so, I'm looking for good books or even for good examples over the internet that would teach me goin' step by step, how to program by myself and get the resultants right away. The thing is that I already have a few books, but I'm not happy with them, there's this one by Jeff Dutemann "Assembly Language Step by Step Programming with DOS and Linux, Second Edition", it's good but it goes on and on about ramblings, that, sorry, but I'm not ready to read any further.
I'm specifically looking for a book that would drag me to doing by page five, not by page 203, and that would make me feel good about what I'm doing and make it interesting to me. That's the problem I'm seeing, there's lot of books with talks about "let's program, but before that, let's talk about how depressing 1939 year was..." and I don't want any of that.
I found a book that's full of examples and let's the reader to analyze what he's doing and really "teaches", but I don't know Russian language, so I'm hoping maybe there's something like that in English...
Thanks for advices!
Re: Don't know where else to post...
Posted: Wed Apr 08, 2009 4:28 pm
by Combuster
I don't know any books, I learnt assembly without that by grabbing some internet pages and writing DOS .com files
Re: Don't know where else to post...
Posted: Wed Apr 08, 2009 6:57 pm
by 01000101
This is an interesting question (every time it's asked
).
I only have one assembly book here and it's not a step-by-step guide (32/64-bit Assembly Language Architecture by Leiterman). I only use that for SSE/FPU instruction referencing. I'd suggest looking into the infamous Art of Assembly. That was usually my main reference when I was learning assembly (NASM). I didn't really learn assembly the traditional way, I found it easiest to just jump right in to building a bootloader, messing up and retrying about 10,000 times.
Re: Don't know where else to post...
Posted: Wed Apr 08, 2009 9:14 pm
by earlz
http://earlz.biz.tm/old_site/emu8086_help/ is a pretty good jump-straight in type thing. It uses a propietary assembler, though isn't too hard to adjust to yasm syntax(just take a quick glance through the yasm manual)
I very much recommend learning in 16-bit first, I recommend starting with an assembly based OS also. Dos is acceptable, as is DexOS.. if your wanting to jump into assembly, you may also try writing a simple bootloader, as that is just as fun with BIOS...
Re: Don't know where else to post...
Posted: Wed Apr 08, 2009 9:37 pm
by Troy Martin
I learned assembly in a few long steps. The first step was looking through the source and modifying an assembly OS (MikeOS in my case.) Step two was reading through some more assembly sources. The third step, the biggest, was writing my own OS,
TBOS. I continue to learn more and more about assembly language through writing my operating system.
Real mode assembly bare bones is a simple, single sector OS/shell written in real mode x86 assembly. You should probably use NASM to assemble it, but FASM might work. Probably YASM too.
Re: Don't know where else to post...
Posted: Wed Apr 08, 2009 9:42 pm
by nekros
I'm on the screw around with a bootloader side of the fence.
Re: Don't know where else to post...
Posted: Thu Apr 09, 2009 12:28 pm
by Dex
Your not alone with regard that book "Jeff Dutemann "Assembly Language Step by Step Programming with DOS and Linux", with its programming is like making a cake, then spends the next 5 chapter goes on about cakes.
It will teach you nothing, what i learnt with was "Adam's Assembler Tutorial 1.0"
http://www.programmersheaven.com/downlo ... nload.aspx
Together with the book "IBM PC Assembly language and programming, by Peter Abel" note: this is not abook to read from cover to cover, but more a reference book.
And the best wat to learn is as been pointed out, just keep making smal program, you can take someone elser examples and change them to see how they work, but its most important to code something you want, have fun, its not school, i started with bootable games, well bootable everything, the programs then self were bootable, no os to fall back on, everything you need was in the program.
This will help you later if you want to code your own OS.
Good luck, and keep coding and you know what practise makes.
Re: Don't know where else to post...
Posted: Thu Apr 09, 2009 12:50 pm
by bewing
If you have any other choice, the smart thing to do is to start with some other (much simpler) cpu chip.
The Z80 chip is a very common embedded CPU, with an extremely simple assembly language.
The Motorola 6802 is also very simple, but has a few quirks that make you pay close attention (such as which instructions modify which flags).
Even the Motorola 68000 line of chips has a much simpler and better-designed set of ASM opcodes than the x86 line has.
Once you learn the basics, then you will have a much easier time paying attention to all the complexities and strange stuff in the x86 ASM.
Re: Don't know where else to post...
Posted: Thu Apr 09, 2009 2:24 pm
by Firestryke31
I got started with z80 ASM for the TI-83+ (which is almost directly compatible with the TI-84+). If you have one of those I would suggest "Learn TI83+ Assembly in 28 Days" (or whatever it's called) over at TIcalc.org. The only bad habit it got me into was optimizing for space and not speed all the time, due to a max of 8.8KB of executable code (without special tricks or writing an "app").
Re: Don't know where else to post...
Posted: Thu Apr 09, 2009 9:47 pm
by earlz
Firestryke31 wrote:I got started with z80 ASM for the TI-83+ (which is almost directly compatible with the TI-84+). If you have one of those I would suggest "Learn TI83+ Assembly in 28 Days" (or whatever it's called) over at TIcalc.org. The only bad habit it got me into was optimizing for space and not speed all the time, due to a max of 8.8KB of executable code (without special tricks or writing an "app").
Maybe I'm just not flexible, but compared to x86, I find Z80 assembly as hell. working with 8bit registers!=fun. It is a very limited cpu.. but I don't think that necessarily makes it an easy to learn to use well cpu. I prefer having decent size registers and memory buses; thank you.
Re: Don't know where else to post...
Posted: Thu Apr 09, 2009 11:51 pm
by Love4Boobies
I learnt assembly wirting .com files in the ol' DOS days myself, but I doubt that's the best way. If you're into the x86 architecture, I'd say the
Intel manuals (specifically, volumes 1 and 2) are just what you need - they don't bore you with stories and historical notes, they just stick to the facts. If you're into some other architecture, just look for the official manuals describing it. There's no better way to find *complete* information.
Re: Don't know where else to post...
Posted: Fri Apr 10, 2009 7:28 am
by likeagunfire
Thank you all for the answers!
I will surely look into book references and links. Also, I wanted to ask does anyone have any manual on how to write your own operating system not on a floppy disk but using Kingston "DataTraveler" flash stick?
Re: Don't know where else to post...
Posted: Fri Apr 10, 2009 7:35 am
by Love4Boobies
As far as PCs are concerned, you program an OS exactly the same way regardless of what you boot it from. The boot loader might be (partially) different. However, if you use something like GRUB you won't need to worry about that.
P.S: it doesn't matter what type (e.g. Kingstion) of flash stick it is, they're all made according to some standard. That's true for most devices, although drivers might be needed to enable extensions.
Re: Don't know where else to post...
Posted: Fri Apr 10, 2009 8:30 am
by earlz
likeagunfire wrote:Thank you all for the answers!
I will surely look into book references and links. Also, I wanted to ask does anyone have any manual on how to write your own operating system not on a floppy disk but using Kingston "DataTraveler" flash stick?
In the early stages of your OS it won't matter as long as you choose a USB supporting bootloader. After that though, you may wish to use floppies for data and your thumbdrive for booting until you can get your head around the overly complex PCI->EHCI/UHCI/OHCI->USB bit..
Re: Don't know where else to post...
Posted: Fri Apr 10, 2009 9:11 am
by likeagunfire
Love4Boobies wrote:I learnt assembly wirting .com files in the ol' DOS days myself, but I doubt that's the best way. If you're into the x86 architecture, I'd say the
Intel manuals (specifically, volumes 1 and 2) are just what you need - they don't bore you with stories and historical notes, they just stick to the facts. If you're into some other architecture, just look for the official manuals describing it. There's no better way to find *complete* information.
I need to "understand" what the assembler really does, not how to use CPU instructions and commands. I need a quick step for assembler.
earlz wrote:In the early stages of your OS it won't matter as long as you choose a USB supporting bootloader. After that though, you may wish to use floppies for data and your thumbdrive for booting until you can get your head around the overly complex PCI->EHCI/UHCI/OHCI->USB bit..
How to write/change boot sector to USB key (from Windows)?