The MASM Forum

Miscellaneous => The Orphanage => Topic started by: Magnum on March 30, 2014, 05:01:43 PM

Title: Linus programming
Post by: Magnum on March 30, 2014, 05:01:43 PM
I still dual boot.

Windows has "some issues", but it is quite developed.

I have been looking for a GUI interface for writing Linux programs.

Tried Kdevope and some others.

I installed it, but got no response to posts for help.

I honestly do not mind using a command line.

I looked for some examples, but found very little in C and
C++,

What do you think ?





Title: Re: Linus programming
Post by: Vortex on March 30, 2014, 07:48:16 PM
Hi Magnum,

Not sure but maybe you could try GTK or Qt.  Linux is rather better with the command-line interface. As a server operating system, Linux is rock-solid.

Honestly, the problem of some Linux people is that they can be very arrogant and selfish geeks and this is not tolerable. What I do is to search the net to solve the problems.

Title: Re: Linus programming
Post by: Gunther on March 30, 2014, 07:58:10 PM
Hi Erol,

Quote from: Vortex on March 30, 2014, 07:48:16 PM
Honestly, the problem of some Linux people is that they can be very arrogant and selfish geeks and this is not tolerable. What I do is to search the net to solve the problems.

your statement is right, but there are enough arrogant Windows people, too.

Andy,

you should have a look into NASMX (http://sourceforge.net/projects/nasmx/). It includes a lot of Linux graphics examples. May it's what you're searching for.

Gunther
Title: Re: Linus programming
Post by: jcfuller on March 30, 2014, 08:43:39 PM

I wrote a tiny gtk example for jwasm and linux located in the Samples folder. -> gtk01.asm

James
Title: Re: Linus programming
Post by: Gunther on March 30, 2014, 08:53:36 PM
Hi James,

Quote from: jcfuller on March 30, 2014, 08:43:39 PM
I wrote a tiny gtk example for jwasm and linux located in the Samples folder. -> gtk01.asm

I wasn't aware of that. Thank you for the hint.  :t

Gunther
Title: Re: Linus programming
Post by: Gunner on March 31, 2014, 01:04:41 PM
GTK+ is very easy to use.  You can code everything by hand as you would with the Windows API, or you can use GLADE - https://glade.gnome.org/
Title: Re: Linus programming
Post by: shankle on March 31, 2014, 09:29:21 PM
Am I right in saying MASM32 and GoAsm will not
work in any Linux distribution?
So Magnum, what language are you going to use there?
Are you going to convert all your Masm32 programs
and to what?

I have found the Linux people to be intolerable. They seem to be "SUDO"
bound, like it is their domain to dispense out piecemeal to the rest of us
dummies.
Title: Re: Linus programming
Post by: Gunther on March 31, 2014, 10:46:11 PM
Hi shankle,

don't be so relentless (неустанный).

First, MASM32 makes a pretty good job under Wine. Furthermore, there are Linux versions of jWasm and Solar Assembler, not to speak about YASM and NASM. So porting some existing Windows software to Unix isn't so hard. I've done it and I know what I'm speaking about.

Gunther
Title: Re: Linus programming
Post by: jcfuller on March 31, 2014, 11:48:40 PM
Before I lost interest in Linux I started porting Peter's (BaCON: http://www.basic-converter.org/) HUG wrapper to jwasm. It makes using gtk+ a lot easier. Not even sure where the code is now.

James
Title: Re: Linus programming
Post by: carlos on April 08, 2014, 01:33:19 PM
Quote from: Vortex on March 30, 2014, 07:48:16 PM
Hi Magnum,

Honestly, the problem of some Linux people is that they can be very arrogant and selfish geeks and this is not tolerable. What I do is to search the net to solve the problems.


Quite the contrary,  since I went to figth for the republic 7 years ago,  ( :) ) I never find a problem I was unable to solve with the hel of the linux comunuty, sometimes the answer is quite terse, and asumes you know a lot, but being carefull and following the advice, and ASKING A LOT, you could solve anything.

the best IDE I found on linux is  .... your favorite editor and a terminal window. realy in Linux, MAKE is the king, (or should I say queen?? ) even for installing software, ah, and if you want to follow the assembler route, follow the GAS path,  is harder, but you could use it to  crossplataform developing,  and the book "Professional assembly Language" from Wrox, use it,  this book is THE BEST for learning to program in assembler in LinuxWord.

hope this help you

Carlos
Title: Re: Linus programming
Post by: Gunther on April 08, 2014, 07:16:51 PM
Hi Andy,

Quote from: carlos on April 08, 2014, 01:33:19 PM
... and the book "Professional assembly Language" from Wrox, use it,  this book is THE BEST for learning to program in assembler in LinuxWord.

you should only follow this advice of Carlos if you really like AT&T assembly language syntax.  :lol:

Gunther
Title: Re: Linus programming
Post by: Vortex on April 09, 2014, 03:43:40 AM
Hi Carlos,

Concerning Linux, probably, it's a matter of luck to find the right guys to speak. Some Linux fanatics are thinking that you know a lot as you said and that can be unbearable.
Title: Re: Linus programming
Post by: Magnum on April 09, 2014, 06:57:20 AM
Quote from: shankle on March 31, 2014, 09:29:21 PM
Am I right in saying MASM32 and GoAsm will not
work in any Linux distribution?
So Magnum, what language are you going to use there?
Are you going to convert all your Masm32 programs
and to what?

I have found the Linux people to be intolerable. They seem to be "SUDO"
bound, like it is their domain to dispense out piecemeal to the rest of us
dummies.

No, I want to just start with using C which is what many front ends support.

I am using Puppy Slacko 5.6.0 which gives you root access as the default.

I agree with you that many Linux users are stubborn.
They feel that no one should have root access except for one day a year. :-)

Andy
Title: Re: Linus programming
Post by: carlos on April 09, 2014, 12:34:27 PM
Quote from: Gunther on April 08, 2014, 07:16:51 PM
Hi Andy,
.....
you should only follow this advice of Carlos if you really like AT&T assembly language syntax.  :lol:

Gunther

Only a diehard masochist will like GAS,  but it has an advantage over nasm, nasm is x86-centic, while GAS will work in every plataform Linux runs on,  so, if after developing in intel-word, you want to develop on the Raspberry pi, (or any ARM plataform) all you had to do is learn the new instruction  nemonics.

Title: Re: Linus programming
Post by: Gunther on April 09, 2014, 06:50:27 PM
Hi Carlos,

Quote from: carlos on April 09, 2014, 12:34:27 PM
Only a diehard masochist will like GAS,  but it has an advantage over nasm, nasm is x86-centic, while GAS will work in every plataform Linux runs on,  so, if after developing in intel-word, you want to develop on the Raspberry pi, (or any ARM plataform) all you had to do is learn the new instruction  nemonics.

are you really sure? Things are often not so easy. That's AT&T syntax for Intel processors:

    movl     $1, %eax

That's AT&T syntax for PowerPC:

    mulhwu  %r9, %r31, %r28

Not much common ground.

Gunther
Title: Re: Linus programming
Post by: carlos on April 11, 2014, 01:27:32 PM
Youŕe rigth Gunther, Assembler is the LEAST portable of all languages, but my point is, that is not the same to switch from nasm (an masm like assemembler) in intel linux, to GAS in Raspberry, that to switch from GAS Intel to GAS ARM,  NASM is TOTALY diferent from GAS, and it works only for Intel proccesor.  GAS is uniform acros all the Linux platforms,  if you learn GAS, (ugly as it is) you could prorogramm in assembler in intel, PowerPC, ARM  and all processors that Linux is ported on, or even to where it is not ported, (gpasm is based on GAS, and is an assembler for the microcchip PIC)

Yes GAS is ugly, but is the lingua franca in assembler, across platforms.

Carlos

Title: Re: Linus programming
Post by: jj2007 on April 11, 2014, 03:23:16 PM
http://www.japheth.de/JWasm/Samples.html

Hit Control F, then insert Linux

JWasm (apart from being pretty) even has a very powerful macro engine, and is Masm compatible.

As to the "it runs everywhere" argument: Yes, that's true. For example, bicycles can be used on Earth and on the Moon, while Ferraris can be used only on Earth. Is that a valid argument to use bicycles on Earth?

I do use my bicycle, but not for reasons of cross-platform compatibility ;-)
Title: Re: Linus programming
Post by: Gunther on April 11, 2014, 05:36:31 PM
Hi Carlos,

Quote from: carlos on April 11, 2014, 01:27:32 PM
GAS is uniform acros all the Linux platforms,  if you learn GAS, (ugly as it is) you could prorogramm in assembler in intel, PowerPC, ARM  and all processors that Linux is ported on, or even to where it is not ported, (gpasm is based on GAS, and is an assembler for the microcchip PIC)

I don't agree with you. The PowerPC hasn't registers %eax, %ebx etc. See my example in post #14. And here is an example for ARM:

        AREA     ARMex, CODE, READONLY
                                ; Name this block of code ARMex
        ENTRY                   ; Mark first instruction to execute
start
        MOV      r0, #10        ; Set up parameters
        MOV      r1, #3
        ADD      r0, r0, r1     ; r0 = r0 + r1
stop
        MOV      r0, #0x18      ; angel_SWIreason_ReportException
        LDR      r1, =0x20026   ; ADP_Stopped_ApplicationExit
        SVC      #0x123456      ; ARM semihosting (formerly SWI)
        END                     ; Mark end of file


Do you see any similarity to the GAS Intel syntax? I can't see that.

Gunther
Title: Re: Linus programming
Post by: qWord on April 11, 2014, 08:18:28 PM
Quote from: carlos on April 11, 2014, 01:27:32 PMGAS is ugly
just as side note, GAS is designed as backend assembler and thus has a simple-to-parse syntax:
Quote from: as documentation"`as' is primarily intended to assemble the output of the GNU C
compiler `gcc' for use by the linker `ld'.
Title: Re: Linus programming
Post by: Gunther on April 12, 2014, 01:27:32 AM
Quote from: qWord on April 11, 2014, 08:18:28 PM
just as side note, GAS is designed as backend assembler and thus has a simple-to-parse syntax:
that's right. But one can use GAS with:
.intel_syntax noprefix
It's comfortable.

Gunther
Title: Re: Linus programming
Post by: Vortex on April 12, 2014, 03:53:10 AM
The Solar Assembler is another alternative for Linux programming.
Title: Re: Linus programming
Post by: Gunther on April 12, 2014, 06:00:33 AM
Quote from: Vortex on April 12, 2014, 03:53:10 AM
The Solar Assembler is another alternative for Linux programming.

yes, it's a good alternative. Thank you, Erol. :t Here is Bogdans site (http://oby.ro/sol_asm/).

Gunther
Title: Re: Linus programming
Post by: Guenther78 on November 03, 2014, 09:11:20 AM
Hello,

I found the NASM forum (http://forum.nasm.us/index.php?topic=1457.0 (http://forum.nasm.us/index.php?topic=1457.0)), where the user Gunner sent some links to his tutorials. One, for example, is nasm and gtk, code that works for windows and linux: http://www.dreamincode.net/forums/topic/292403-nasm-cross-os-app-for-linuxwindows-using-gtk/ (http://www.dreamincode.net/forums/topic/292403-nasm-cross-os-app-for-linuxwindows-using-gtk/)

Best regards,

Guenther
Title: Re: Linus programming
Post by: Gunther on November 03, 2014, 11:38:01 PM
Thank you for the interesting link, Guenther. By the way, Gunner is member of our forum, too.

Gunther
Title: Re: Linus programming
Post by: Gunner on November 04, 2014, 02:03:48 PM
I had many requests for a Linux version of one of my Windows programs, so I finally bit the bullet and moved over to Linux.  Once I am done, (can't give a time frame since I work on it in my spare time) I will release the source fully commented.  It uses GTK+, libcURL, Glade (to design the interface), gcc to link, and might add SQLite if I decide to use a database.  I like the fact that you can use CSS to change the styles of the windows and widgets.  GTK support for windows is a bit lacking (the binaries are a bit behind linux).  It has been an interesting learning experience for sure.
Title: Re: Linus programming
Post by: Magnum on November 04, 2014, 07:21:16 PM
Great to hear.

What version are you running ?
Title: Re: Linus programming
Post by: Gunther on November 05, 2014, 04:40:22 AM
Quote from: Gunner on November 04, 2014, 02:03:48 PM
I had many requests for a Linux version of one of my Windows programs, so I finally bit the bullet and moved over to Linux.  Once I am done, (can't give a time frame since I work on it in my spare time) I will release the source fully commented.  It uses GTK+, libcURL, Glade (to design the interface), gcc to link, and might add SQLite if I decide to use a database.  I like the fact that you can use CSS to change the styles of the windows and widgets.  GTK support for windows is a bit lacking (the binaries are a bit behind linux).  It has been an interesting learning experience for sure.

That's good news, Gunner. Go forward. :t

Gunther
Title: Re: Linus programming
Post by: Guenther78 on November 06, 2014, 10:37:35 PM
Hello,

I just have found another example:
http://programminggroundup.blogspot.de/2007/01/appendix-gui-programming.html (http://programminggroundup.blogspot.de/2007/01/appendix-gui-programming.html)

I have Ubuntu 12.04 and I am going to test it.
Best regards,

Günther
Title: Re: Linus programming
Post by: Gunther on November 07, 2014, 05:13:15 AM
Günther,

Quote from: Guenther78 on November 06, 2014, 10:37:35 PM
I just have found another example:
http://programminggroundup.blogspot.de/2007/01/appendix-gui-programming.html (http://programminggroundup.blogspot.de/2007/01/appendix-gui-programming.html)

interesting link. It's AT&T syntax and that's not very popular by the majority of our forum members. But it's easy to convert. Thank you for the information. :t

Gunther
Title: Re: Linus programming
Post by: Gunner on November 07, 2014, 01:51:33 PM
Ugh, if the year in the URL is any indication, that is way old and probably obsolete!

GTK+ API Documentation and Official GTK site (http://www.gtk.org/documentation.php/)

GTK+ Tutorials over at ZetCode (http://zetcode.com/tutorials/gtktutorial/)

There are tons of samples, tutorials, and open source apps on the net that use GTK+.  It is mostly in C, but it is trivial to convert to Assembly.

Here is something I wrote about a year ago.

https://github.com/GunnerInc/ip-country-info

It takes an IP address and queries IPInfoDB for the Country info and displays that info along with the flag of the country. (NASM, GTK+, libcURL, Linux)
Title: Re: Linus programming
Post by: Gunther on November 07, 2014, 06:38:05 PM
Hi Gunner,

good stuff. Thank you for that.  :t

Gunther