NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: Eccentro on August 08, 2011, 05:57:10 PM

Title: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 08, 2011, 05:57:10 PM
I'm trying to use the 64 bit beta of Gnome 3 / OpenSUSE, but it's giving my 585 a lot of trouble - especially with the date and time.  I had some kind of a file system error this morning - twice - while trying to get the clock set correctly.  It's just not ready for prime time yet.  I'm sure it will all be worked out by the anticipated release date - next month.

What's your preference?
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 08, 2011, 06:55:02 PM
By "flavor" you mean distro, right? Actually it doesn't differ, you can use any distro to assemble and link, even on a 64 bit system(for coding also). I use Fedora, with GNOME 3, Frank Kotler, he is a command-line man, so he uses Slackware Linux, so he doesn't have a GUI, unlike us noobs :P and he likes using Slackware (I think ???)

Choose the one you feel comfortable with, but keep an eye on if it updates recently or not, since it is recommended to use the latest GCC with its Linker ld, the distro should update gcc frequently.

Best,
Mahmoud
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 08, 2011, 07:28:07 PM
Thanks.  I have the Gnome 3 / Fedora release, too.  You're not having any trouble with it?

I'll try the Slackware, too.  I started out as a DOS man, so that would be almost full circle.  hehe.

I definitely want to write pure 64 bit code.  I'm all about that right now.  ;D

Addendum:  I'm downloading the slackware64-13.37 iso presently.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 09, 2011, 02:28:22 AM
Thanks.  I have the Gnome 3 / Fedora release, too.  You're not having any trouble with it?

No, not any trouble ;)

I'll try the Slackware, too.  I started out as a DOS man, so that would be almost full circle.  hehe.

Good for you  :) And it is always positive to try something new ;D

Addendum:  I'm downloading the slackware64-13.37 iso presently.

You may know that, but... be sure you have a 64 bit system for Slackware 64 to work, and please notice that the system type doesn't differ in programming, the code only differs if you are coding in 64 bit assembly, so you can compile a 64 bit code on a 32 bit Operating System, but ofcourse you can't execute the output.

I know that you knew that, but just in case you didn't, a human can make mistakes :P

Slackware's size is large :P But it worth it :)

Command-Line = x10 times faster than any GUI system, if not more than 10 times...

Best,
Mahmoud
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 05:57:03 AM
Yeah - I knew that.  hehe.  Although you bring up a good point.  I could write the code on one of my other machines and test it on my Intel 585.

Someday, I'll get a faster computer than this Celeron, but, as you said, command-line operation is much faster than GUI and speed is good.  Especially in my field of interest, which is cognitive modeling.

I've got a lot of back burners going, so getting things done is becoming a priority.  hehe.

Thanks again for the help.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 02:30:53 PM
I'm stoked about the SlackWare.  I'm running the install now and I see that the iso came complete with the tools I'll need.  I can just add NASM go to it.

Good recommendation!  8)
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 09, 2011, 03:30:28 PM
I'm stoked about the SlackWare.  I'm running the install now and I see that the iso came complete with the tools I'll need.  I can just add NASM go to it.

Good recommendation!  8)

Nice ;) But which Software Set have you downloaded?? or did you download the whole 4 GB Image!? I just want to know, since it works good for you. And actually Frank recommended Slackware for me :)

Someday, I'll get a faster computer than this Celeron, but, as you said, command-line operation is much faster than GUI and speed is good.  Especially in my field of interest, which is cognitive modeling.

If you use your computer for programming only, and no gaming, then you don't have to buy a fast PC.

I use my computer for programming only, no gaming and here is my system specs:
-Pentium 4 with Hyperthreading enabled.
-2 GB of Ram.
-Overclocked ATi Radeon 9550. (used to be 256 mb of vram without overclocking)

It is a desktop, and can run Pro evolution soccer 2010 smoothly :P But I don't play it.

Best,
Mahmoud
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 04:05:31 PM
Yep.  I downloaded the 4+GB SlackWare 64bit iso and used a temporary install of Knoppix to burn it to a DVD.  Then I repartitioned the drive, using GParted, and ran the setup from the newly burned iso.

I'm currently looking for some quick tutorials to make the transition from the MSWorld easier.

I know that the writing of code is not that demanding, but the code that I write tends to be very much so - not that it's inefficient - quite the contrary - but a lot of it is heavy on real-time computation.  I'm always bumping up against the limits of the hardware and spend a lot of time and effort finding faster ways to do things, all the while maintaining the highest quality standards.

That's why I want to go 64bit.  Working with large tables of data and performing dsp ops on them is something that the 64bit instruction and register set is excellent at.  I got this computer on the cheap, but I got what I paid for.  A Celeron tends to come hobbled.  I'm wondering if I can upgrade the CPU.  I'll make due for now.

One reason that I needed NASM is that I can't add to the higher level languages in the MSWorld.  I tried their inline assembler and it sucked.

In the Linux environment, with this assembler and various languages and compilers, I can really work without proprietary limits.  I'll be free.  ;D  I can make my own tools.  I can make an OS.  I can make a language.  I can make a file system - or whatever.  It's my secret laboratory.  ;D

Your PC's not bad at all.

I am a gamer, but I have another computer for that.  It's fast, but it's not portable.  I play Fallout 3, Fallout Vegas and Oblivion on it.  Skyrim's coming out soon.  I can't wait for that.

Wow.  I'm really rambling.  hehe.  Peace.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Rob Neff on August 09, 2011, 04:36:52 PM
I got this computer on the cheap, but I got what I paid for.  A Celeron tends to come hobbled.  I'm wondering if I can upgrade the CPU.  I'll make due for now.

If you're trying to do computation-heavy operations on a celeron there's a bridge in san francisco I want to sell you  :D

One reason that I needed NASM is that I can't add to the higher level languages in the MSWorld.  I tried their inline assembler and it sucked.

Forget inline assembly for x64 using VisualStudio.  MS killed that idea years ago.
 
In the Linux environment, with this assembler and various languages and compilers, I can really work without proprietary limits.  I'll be free.  ;D  I can make my own tools.  I can make an OS.  I can make a language.  I can make a file system - or whatever.  It's my secret laboratory.  ;D

Take all those excellent ideas and apply that energy to any one ( or more ) of the current open source projects that could probably benefit from having you on board.

As for Linux distros, I'm fond of Fedora.  I even like the striped down look of Gnome 3.
I've been playing around with Scientific Linux ( a distro of RedHat's Enterprise Linux ) lately.

Oh, and welcome to our little family, sounds like you'll be here a while  8)
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 09, 2011, 05:09:06 PM

Forget inline assembly for x64 using VisualStudio.  MS killed that idea years ago.

MingW and all GCC compilers have the __asm(const char*) command, DJGPP uses AMD Syntax. Mingw uses Intel Syntax I think. And GCC Compilers are free and compatible with Linux!  ;)

Oh, and welcome to our little family, sounds like you'll be here a while  8)

Yup, welcome Eccentro, we have the greatest family, right, brother Rob?

Edit: Inappropriate content removed by forum moderation.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 06:05:43 PM
Rob Neff,

  Actually, I was working in the 32bit domain when I was using that inline assembler and yes, that was years ago.  I'm still using VB6 32bit.  Why?  Because it still works.  hehe.  I'm switching to 64bit at the same time that I'm switching to Linux.

  I'll need to get a feel for things first, but then I'll be happy to contribute.  I've been working on a suite of apps for music and am leaning toward the idea of a Linux only release.  I need to see what audio services are provided by the kernel, but if I can, I probably will.  I'm currently working with DirectX on that.

MJaoune,

  I hope to get familiar with those tools, but I came up via Dos, Basic, QBasic, Windows and VB route.  It's like growing up in a different country.  I'll assimilate.  hehe.

Thank you both for the warm welcome.  That's something Microsoft never gave me.   ;D
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 06:27:45 PM
That reminds me.  I was wondering if anyone has made an app that can convert the source code over from a MS VS project (VB or VC++) to something convenient in the Linux dimension.

I'll eventually be able to do it by hand, but I wrote a lot of code.  It'll be a big job.  Maybe there's a short cut.  Besides, comparing the before and after would be a quick way to learn the conventions.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 09, 2011, 06:59:35 PM
Quote
That reminds me.  I was wondering if anyone has made an app that can convert the source code over from a MS VS project (VB or VC++) to something convenient in the Linux dimension.

umm... Last time I checked, I didn't find a software that does this type of convertion, C++ is C++ and C is C, so you don't have to change the code, since all C and C++ compilers use the same syntax, you may only have to order and modify the VS files that  were created when the project was created, and you can also modify the makefiles if there were any. ;)

Best,
MJaoune

Edit: Inappropriate content removed by forum moderation.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 09, 2011, 07:44:18 PM
Yeah, the functions/modules will be that way, but I'm sure there will be differences between COM and whatever form of OOP is used in the Linux domain.  There are the API functions which will have to be replaced.  The more I think about it, the more I realize that I'll probably have to do a lot of it by hand.  It's ok.  I'm overhauling it all anyway.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Rob Neff on August 09, 2011, 09:23:31 PM
For a temporary test you can try running your win32 apps in Wine (http://www.winehq.org/).
Trying to convert apps from Win32 to Linux is not the way to go.
Very little code will port from Windows to native Linux.
I too used to use VisualStudio products up to and including VS2005 with inlined assembly.
That is until I ran into the x64 issues, the horrible mess that masm is, and my newfound love affair with Nasm began.  ;D
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 09, 2011, 11:57:58 PM
I would recommend you to use WXWidgets to create your next projects, since it is compatible with all Operating Systems, and it also have better functions, and the best documentation, but YMMV.

Best,
MJaoune
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 05:34:13 AM
Wine: I'll learn what I can from it.  Ultimately, the more code that is under my direct creative control, the better anyway.

WXWidgets:  I'm checking it out.  It looks pretty handy.

Is there something like DirectX for Linux that I should work with in to order to make my apps cooperate with other apps that use audio buffer IO and plug-in capabilities?  Oh, maybe there's a VST for Linux.  I'll look for that now.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Bryant Keller on August 10, 2011, 06:47:03 AM
OpenGL/OpenAL is probably about the closest thing to DX on Linux. If you're going to be using OOP heavy wrappers like wxWidgets, you might also want to look into the Ogre framework which provides a platform independent wrapper to OpenGL/OpenAL/DirectX/etc.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 08:06:36 AM
Sweet.  My search for this kind of info had me banging up against broken links and misdirection for the last hour.  I knew about OpenGL, but not about OpenAL.

I've got some ideas for standards that might find a home in the Linux audio niche, but I should see what's already happening to avoid stepping on toes.

Over on the Windows side, I stripped my main app forms down to the minimum and created my own light weight consolidated control system for them.  It uses a lot less memory and greatly reduces the number of objects and messages that need to be managed.  It's actually pretty sweet.  Perhaps I can continue in that mode with Ogre - or maybe I should work directly with OpenGL.  I'll look at the pros and cons.

Thanks for the tips.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 08:44:32 AM
OpenAL looks very similar to one of the many projects that I have half done.  I probably shouldn't  describe it in a public forum.  There are sufficient differences to make mine worth finishing.  My dev history is documented, so there's no intellectual property issue.   8)
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 10, 2011, 12:49:01 PM
I use OpenGL on both, Windows, and Linux, so OpenGL is not for linux only, it is for all Operating Systems.

Best,
MJaoune

Edit: Inappropriate content removed by forum moderation.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 01:28:08 PM
Yep.  I bought a really big book a few years back.  I think it was called the OpenGL Bible.  I've intended to get into it.  I've always liked the idea of OpenGL.

I see in some docs, though, that, in order to draw a window, code still needs to access the API.  It then paints on it using OpenGL functions.  I want to incorporate my consolidated control system into my windows.

Anyway, I'm reading this:  http://www.aboutdebian.com/linux.htm

It makes me think that maybe I should gather up all of my audio ideas and bring them together to form a new shell, dedicated to the tasks that my applications facilitate.  The shell could support other people's software.  I would document the shell's systems, standards and libraries in an SDK.

What do you think of that idea?  It would be an audio production shell for Linux.  It could be expanded for video production and gaming.  Then, in the future, when I'm producing video games and cognitive models, I could target them to run under this shell.

Is this a good direction to go in?  Why or why not?  :)
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 10, 2011, 02:14:52 PM
Yep.  I bought a really big book a few years back.  I think it was called the OpenGL Bible.  I've intended to get into it.  I've always liked the idea of OpenGL.

I see in some docs, though, that, in order to draw a window, code still needs to access the API.  It then paints on it using OpenGL functions.  I want to incorporate my consolidated control system into my windows.

You can draw a window using WXWidgets, and you can control input using WXwidgets or SFML (http://www.sfml-dev.org/).

It makes me think that maybe I should gather up all of my audio ideas and bring them together to form a new shell, dedicated to the tasks that my applications facilitate.  The shell could support other people's software.  I would document the shell's systems, standards and libraries in an SDK.

Is this a good direction to go in?  Why or why not?  :)

I don't know, you can ask Cyrill about that, he is experienced in Linux, but I think you need an extra hand(s) for this idea. If you want a reference, you can always take a look at Linux's source codes.

Best,
MJaoune
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 02:22:51 PM
Thanks.  I'm in brainstorming mode and am receptive to input.

BTW:  How does one make a living at this?  It would be nice to buy a better computer and a few cases of Ramen.   :D
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 10, 2011, 02:35:58 PM
Thanks.  I'm in brainstorming mode and am receptive to input.

BTW:  How does one make a living at this?  It would be nice to buy a better computer and a few cases of Ramen.   :D

Is your computer that bad? Can you give me your system Specs? And ofcourse, ramen is always important :P

Best,
MJaoune
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 10, 2011, 02:41:58 PM
No.  It's not that bad.  I just like the idea of using those 64bit functions that are probably disabled on this one.  You know, the batch instructions targeted at dsp.  I think I'll find that they don't work.  I could be wrong though.

I'm like Tim Taylor.  I always want more power.   ;D

It's actually good to have limits, though.  I don't want to write code that nobody else can run.

I would love to turn this into a gig that produces a modest income.  I need to get a bit of sleep. cu
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 10, 2011, 02:52:33 PM
No.  It's not that bad.  I just like the idea of using those 64bit functions that are probably disabled on this one.  You know, the batch instructions targeted at dsp.  I think I'll find that they don't work.  I could be wrong though.

I'm like Tim Taylor.  I always want more power.   ;D

It's actually good to have limits, though.  I don't want to write code that nobody else can run.

I would love to turn this into a gig that produces a modest income.  I need to get a bit of sleep. cu

You can write a code for many systems on your own single computer, and ask someone to test it, like if you don't have a x86(32) computer you can ask someone that has this type of a computer to test it for you.

Good Night :D,
MJaoune
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 14, 2011, 10:01:38 AM
I've decided on a first program to write with NASM.

Back in 1995, I came up with a method to validate the accuracy of a given sine function with absolute precision out to n bits.  The test works perfectly, but I haven't yet been able to figure out how to modify it to generate perfect sine values, from scratch, in a timely manner.  I do hope to nail that one soon.   ;D

I'll recreate the validation algorithm as a function that takes q (quadrant 0-3) and n (bits) as arguments and returns a true or false result to indicate whether or not the sine function is accurate out to n bits for the quadrant being tested.

If I build that shell we talked about, then I'll include this code in there somewhere.   8)
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 16, 2011, 01:18:45 AM
Good luck ;) And if you need any help or support, NASM Forum is always ready :)

Best,
Mahmoud
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 16, 2011, 08:02:48 AM
Thanks.  I'm sure that I will and that any such help will be acknowledged with a special thanks in the shell "credits."

I've been familiarizing myself with gcc on Slackware and tonight, I'll install NASM from the command line.   ;D  <-- grasshopper

BTW:  Get the champagne ready.  I think I just solved the old sine problem in way that makes it a very useful algorithm.  ;D <--  I'm soooo stoked right now.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 16, 2011, 10:56:10 AM
Thanks.  I'm sure that I will and that any such help will be acknowledged with a special thanks in the shell "credits."

I've been familiarizing myself with gcc on Slackware and tonight, I'll install NASM from the command line.   ;D  <-- grasshopper

BTW:  Get the champagne ready.  I think I just solved the old sine problem in way that makes it a very useful algorithm.  ;D <--  I'm soooo stoked right now.

I have never drank such things and never will ;). Anyway, it seems like you like Slackware? When you think you are ready, give it a go :D ! It is not bad to use more than one programming language, since this will make it more portable.

Best,
MJaoune
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 16, 2011, 02:08:52 PM
Champagne's not for me either.  That was just allegorical.  I am super close to the solution, though. ;D

And, yeppers - I will definitely end up using a combination of languages and tools.  I'm grateful for those threads illustrating how to use C and NASM together.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 16, 2011, 05:11:07 PM
Champagne's not for me either.  That was just allegorical.  I am super close to the solution, though. ;D

LOL! :D

And, yeppers - I will definitely end up using a combination of languages and tools.  I'm grateful for those threads illustrating how to use C and NASM together.

Yes I agree with you, if you want more information, you can get PCASM pdf book at http://www.drpaulcarter.com/pcasm/ (http://www.drpaulcarter.com/pcasm/) which was created by a Doctor who studied computer science, he included NASM as the main assembler in this book.


Just a quick note for your compilation:
-DJGPP is for compiling and linking to create a DOS file.
-MingW is for compiling and linking to create Windows Executables (.exe)
-Cygwin is like MingW
-Linux GCC is for compiling and linking to create a Linux file.

Just to help you in compiling.

Edit: Inappropriate content removed by forum moderation.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 16, 2011, 07:29:38 PM
That all looks like good advice.  Thanks.

When you say don't use MS, do you mean don't publish a product made with a MS product or do you mean don't even agree to the EULA?

I just downloaded PCASM.  I'll check it out tonight.  Thanks again.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Frank Kotler on August 16, 2011, 08:38:04 PM
The "don't use MS" is merely Mahmoud's opinion. I happen to agree with him, but it's just a "matter of opinion". Some people apparently think that their compilers are "better".

If you're planning to "publish a product", the EULA may be relevant. I understand they're not all the same. Some of 'em allow using tools for "drivers and apps for Windows, among other things" Some, with the "free" versions, leave out the "among other things" and are legal "for Windows" only... so I understand.

I am not a lawyer and this is not legal advice. If it's an issue for you, check it out yourself! "Don't use MS" is not a "rule" with Nasm or this forum, it's merely a suggestion - a pretty good one, IMO. YMMV.

Best,
Frank

Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 17, 2011, 05:25:35 AM
I hear ya.  Thanks.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Bryant Keller on August 18, 2011, 12:47:58 AM
When I'm programming on a windows system, I like Pelles C. It's a really good C compiler (no C++ support) that has an awesome development environment and really nice back-end assembler. It's also a really good substitute for Windows Mobile Device programming if you don't want to use MSVC.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: MJaoune on August 18, 2011, 01:25:41 AM
When I'm programming on a windows system, I like Pelles C. It's a really good C compiler (no C++ support) that has an awesome development environment and really nice back-end assembler. It's also a really good substitute for Windows Mobile Device programming if you don't want to use MSVC.

Yes, I agree with Bryant on this one. Pelles C is a great IDE and compiler, I used it to create The Netwide Linker for Windows (But on Linux I used a normal Text Editor (VIM and EMACS) and GCC Linux compiler). But I think that some C++ libraries work with Pelle's C (Last time I tried), but ofcourse iostream might not work.

Best,
Mahmoud

Edit: Link to The Netwide Linker removed due to licensing issues.
Title: Re: What flavor of Linux do you recommend for 64 bit coding?
Post by: Eccentro on August 18, 2011, 03:33:16 AM
 8) Pelles C Thanks.  I just downloaded both the 32b and the 64b versions.  It's nice to have tools.