Author Topic: does nasm is easy to learn?  (Read 6773 times)

chiwing

  • Guest
does nasm is easy to learn?
« on: July 20, 2005, 05:46:00 PM »
hi, everybody^^
i am a beginner of nasm..
my friend who use nasm 3 years ago said, nasm do not support high grammar, like ".if" , ".endif" .
and it can't handle many predestinated file, if u insist to do so, it will say ' Out of hash space"...
nevertheless, i thought the newer version of nasm compiler may have corrections..
so, i want to ask :
1) does nasm support ".if" , ".endif" now?
2) does nasm can handle many predestinated file now?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: does nasm is easy to learn?
« Reply #1 on: July 20, 2005, 06:58:57 PM »
Hi Chiwing,

> i am a beginner of nasm..
> my friend who use nasm 3 years ago said, nasm do not support high grammar, like
> ".if" , ".endif" .

That's true.

> and it can't handle many predestinated file, if u insist to do so, it will say

I have no idea what a "predestinated" file is.

> ' Out of hash space"...

I've never seen this message. Can you provide an example file that triggers it?

> nevertheless, i thought the newer version of nasm compiler may have
> corrections..
> so, i want to ask :
> 1) does nasm support ".if" , ".endif" now?

No. That is, there's no "built in" support for High Level syntax, as you'd find in a High Level compiler. High level constructs can be accomplished by the use of macros, if you feel the need of such things. There are examples in the Manual, or in the "misc/" directory (if you've got the source).

You can find pre-written ".inc" files including such macros, and definitions of constants, structures, etc. for whatever OS you're using - "nagoa+.inc" is a popular one for Windows - the include files with the "asmutils" package are good for Linux, BSD, etc.

> 2) does nasm can handle many predestinated file now?

I'm afraid you're going to have to tell me what a "predestinated" file is, before I can answer that question. If you mean a file written in a syntax for some other assembler, generally not (depends a bit on "which other assembler).

As to the question in the subject line... *I* found Nasm very easy to learn. Very "intuitive", to me. Peoples "learning styles" differ a lot, so this may not be true for you. All I can suggest is "try it"!

Best,
Frank

nasm64developer

  • Guest
Re: does nasm is easy to learn?
« Reply #2 on: July 21, 2005, 04:05:01 AM »
> High level constructs can be accomplished by
> the use of macros, if you feel the need of
> such things.

On that note, a few days ago I wrote a set of
nestable SWITCH...CASE...DEFAULT...ENDSWITCH
and BREAK macros.

They expand to compare-n-branch chains -- not
jump tables -- but hey, I'm sure I could fix
that if I had to.

Let me know if anyone is interested...

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: does nasm is easy to learn?
« Reply #3 on: July 21, 2005, 04:27:36 AM »
Maybe something that should be made available in the "contributions" section? (or some other way)

Send 'em to me if you want me to do it, or you should be able to do it yourself...

Best,
Frank