Author Topic: questions  (Read 5974 times)

Offline xdcx

  • Jr. Member
  • *
  • Posts: 12
questions
« on: January 04, 2013, 04:24:17 PM »
i was gonna post this somewhere else but i figure I'd ask here.

what does NASM use C for?
why does linux not need .model flat/small/etc (windows)?
do (C) compilers have to be updated to take advantage of new CPU instructions, etc? NASM?
inline intel syntax for linux?

when i install a piece of software/drivers, i see i386,
does this mean it software doesn't take advantage of anything after the i486, or
is it a term used synonymously with 32bit?

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: questions
« Reply #1 on: January 04, 2013, 05:39:56 PM »
i was gonna post this somewhere else but i figure I'd ask here.

For these types of questions here is probably as good as anywhere.

what does NASM use C for?

When building any assembler or compiler it is usually best to start off with an existing language to prototype and test with.  Long gone are the days when assemblers were made using bit-codes poked into memory.  The C language made the most sense for Nasm ( otherwise known as the Netwide Assembler ) as it allowed the source-code which builds the assembler executable to easily be compiled across a multiple operating systems ( most of which had a C compiler already installed along with the OS ).

why does linux not need .model flat/small/etc (windows)?

Those are Microsoft conventions from the 16-bit era.

do (C) compilers have to be updated to take advantage of new CPU instructions, etc? NASM?

yes

inline intel syntax for linux?

Not sure what you mean here


when i install a piece of software/drivers, i see i386,
does this mean it software doesn't take advantage of anything after the i486, or
is it a term used synonymously with 32bit?

This is a loaded question!  The term i386 references the line of CPUs manufactured by Intel ( and clone makers ).  That particular CPU has an instruction set that supports 8, 16, and 32-bit datum.

Many software distributions today use the moniker "i686" to reference the more modern CPUs of today.  Many software packages make use of i386 or i686 to designate the minimum CPU requirement for running their particular software.  However, note that software can also be made to detect what CPU it is running on and load appropriate libraries which can take advantage of later technologies ( even if they support i386 ).

Finally, note that Linus has stated that, beginning with the latest kernel ( 3.8 I think?? ) Linux will no longer support the i386.  So if you have old 386 machines laying around that are still in use hold on to your old CDs.
Microsoft's Windows OS stopped supporting the i386 years ago.

Hope that helped.

Offline xdcx

  • Jr. Member
  • *
  • Posts: 12
Re: questions
« Reply #2 on: January 04, 2013, 06:19:05 PM »
thanks  :)