Author Topic: To Learm NASM.  (Read 11733 times)

Offline Subhan

  • Jr. Member
  • *
  • Posts: 2
To Learm NASM.
« on: July 27, 2011, 07:07:48 AM »
Hi. Before i sorry for my english.

I'm new on assembly and i want to learn assembly. But i don't know that what i must do.
I have some programming language practice. But NASM is very hard.
Please give me some advice.

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: To Learm NASM.
« Reply #1 on: July 27, 2011, 12:30:53 PM »
It isn't entirely NASM-specific, but you can read the ASM Book @ ASMCommunity.net to get started on the basics.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: To Learm NASM.
« Reply #2 on: July 28, 2011, 08:36:07 PM »
Or...

http://www.drpaulcarter.com/pcasm

That one is Nasm-specific, but will work on any OS - uses C library functions for the OS-specific parts. Since you have experience in other languages, you probably have C installed and running(?). The book has been translated to several languages... probably not yours... Be sure to download the example files intended for your C compiler.

If you have trouble, let us know what happened.

Best,
Frank


Offline Subhan

  • Jr. Member
  • *
  • Posts: 2
Re: To Learm NASM.
« Reply #3 on: July 30, 2011, 08:18:47 AM »
Thanks for help.
i have worked c language (some). But i want to learn direct NASM.

I want that create weak programs and then i'll learn better.

I don't know these (AH, AX, int 80h and etc.) symblos mean. I want to start learn these symbols mean.
Where i can find somethings about these symbols.

(I must learn NASM. and i don't go to anywhere from here, until i learn nasm). Again thanks you very much.  :)

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: To Learm NASM.
« Reply #4 on: July 30, 2011, 01:04:00 PM »
Well... you could take a look at this:

http://home.myfairpoint.net/fbkotler/clueless.html

It's pretty out-of-date, just for dos, but should still work if your computer/OS still supports dos. (my email address in that is obsolete - talk to me here or at myfairpoint.net)

Nasm itself has a nice(?) manual. You can read it at:

http://www.nasm.us

if you didn't download it with Nasm.

If you don't like the Art Sands book that Keith gave you a link to, or Dr. Paul Carter's book that I gave you a link to, You could try Randy Hyde's "Art of Assembly":

http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/www.artofasm.com/DOS/index.html

The 32-bit version of Randy's book uses HLA, which is quite different from Nasm! The link above is to the 16-bit version, which uses Masm, which is only "a little bit"(?) different from Nasm.

I'd go with the Paul Carter book if I were you!

Best,
Frank


Offline David Cooper

  • Jr. Member
  • *
  • Posts: 9
Re: To Learm NASM.
« Reply #5 on: July 30, 2011, 07:18:38 PM »
Hi Frank,

Well... you could take a look at this:

http://home.myfairpoint.net/fbkotler/clueless.html

It's pretty out-of-date, just for dos, but should still work if your computer/OS still supports dos.

I'm a little puzzled by something about a lot of example programs, including the one at the above link. It's the "org 100h" part. Doesn't that result in the program being designed to run inside the IVT (Interrupt Vector Table) and if it's long enough trashing the BDA (BIOS Data Area) as well? I don't know where DOS sits in the machine, but I'd have thought the lowest sutiable place for a program to go would be at 500h.

David.

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: To Learm NASM.
« Reply #6 on: July 30, 2011, 07:58:55 PM »
It's the "org 100h" part. Doesn't that result in the program being designed to run inside the IVT (Interrupt Vector Table) and if it's long enough trashing the BDA (BIOS Data Area) as well?

Tip: The offset is only half of the equation in segmentation.

Offline David Cooper

  • Jr. Member
  • *
  • Posts: 9
Re: To Learm NASM.
« Reply #7 on: July 30, 2011, 08:20:52 PM »
Tip: The offset is only half of the equation in segmentation.

Ah yes of course - it was just too obvious for me! I'm used to working in 32-bit mode and with all the segments set to cover the full 4GB range, so I keep forgetting that you can change them at the drop of a had in real mode. I use real mode as little as possible - just for booting and occasionally going back to use the BIOS, and even then I set all the segment registers to zero unless I'm sending something to the screen to indicate progress.