Don't know where else to post...

Programming, for all ages and all languages.
likeagunfire
Posts: 11
Joined: Wed Apr 08, 2009 2:21 pm

Don't know where else to post...

Post 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!
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Don't know where else to post...

Post by Combuster »

I don't know any books, I learnt assembly without that by grabbing some internet pages and writing DOS .com files
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Don't know where else to post...

Post by 01000101 »

This is an interesting question (every time it's asked :wink: ).

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.
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Don't know where else to post...

Post 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...
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Don't know where else to post...

Post 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.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Re: Don't know where else to post...

Post by nekros »

I'm on the screw around with a bootloader side of the fence.
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Re: Don't know where else to post...

Post 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.
Last edited by Dex on Thu Apr 09, 2009 2:03 pm, edited 1 time in total.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Don't know where else to post...

Post 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.
User avatar
Firestryke31
Member
Member
Posts: 550
Joined: Sat Nov 29, 2008 1:07 pm
Location: Throw a dart at central Texas
Contact:

Re: Don't know where else to post...

Post 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").
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Don't know where else to post...

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Don't know where else to post...

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
likeagunfire
Posts: 11
Joined: Wed Apr 08, 2009 2:21 pm

Re: Don't know where else to post...

Post 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?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Don't know where else to post...

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Don't know where else to post...

Post 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..
likeagunfire
Posts: 11
Joined: Wed Apr 08, 2009 2:21 pm

Re: Don't know where else to post...

Post 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)?
Post Reply