The MASM Forum

Miscellaneous => The Orphanage => Topic started by: Magnum on December 04, 2012, 09:13:57 AM

Title: Compiler that works in Ubuntu ?
Post by: Magnum on December 04, 2012, 09:13:57 AM
I am looking for a Freeware compiler that works under Ubuntu 11.0 but not having much luck so far.
Hexeditor too.

Andy
Title: Re: Compiler that works in Ubuntu ?
Post by: CommonTater on December 04, 2012, 09:32:47 AM
Quote from: Magnum on December 04, 2012, 09:13:57 AM
I am looking for a Freeware compiler that works under Ubuntu 11.0 but not having much luck so far.
Hexeditor too.

Andy

http://manpages.ubuntu.com/manpages/gutsy/man1/as86.1.html
Title: Re: Compiler that works in Ubuntu ?
Post by: Magnum on December 04, 2012, 09:35:57 AM
It's a complete 8086 assembler and loader which can make 32-bit
code for the 386+ processors (under Linux it's used only to create
the 16-bit bootsector and setup binaries).

I may play with it anyway.

Andy
Title: Re: Compiler that works in Ubuntu ?
Post by: Gunther on December 04, 2012, 08:53:52 PM
Andy,

you could also try yasm or nasm. The gcc must be there, because it's the system compiler.

Gunther
Title: Re: Compiler that works in Ubuntu ?
Post by: anta40 on December 05, 2012, 02:03:49 AM
Hi Andy,

What compiler you are looking for?
I've installed several compilers in my Ubuntu box (C/C++, Pascal, Haskell), and as far as I can recall, they work as expected.
Title: Re: Compiler that works in Ubuntu ?
Post by: Magnum on December 05, 2012, 02:15:36 AM
Thanks Anta40.

I am looking to make programs in assembly if they have one for Linux.

I have Ubuntu on a thumbdrive and would like to make some programs for it.

I am trying to figure out how to get the wireless network to work under Ubuntu so I can use their Firefox.

Andy
Title: Re: Compiler that works in Ubuntu ?
Post by: anta40 on December 05, 2012, 02:36:40 AM
Quote from: Magnum on December 05, 2012, 02:15:36 AM
I am looking to make programs in assembly if they have one for Linux.

If you want MASM-style assembler, use jwasm.
But if you don't mind different syntax, try nasm/yasm/fasm.

nasm & yasm are available in the repository:
http://packages.ubuntu.com/precise/yasm
http://packages.ubuntu.com/precise/nasm

so you can easily install them by this 1 line:
Quotesudo apt-get install nasm yasm build-essential

BTW, build-essential is the basic development toolset (gcc, ld, ar, etc).
I have Ubuntu on a thumbdrive and would like to make some programs for it.

Quote from: Magnum on December 05, 2012, 02:15:36 AM
I am trying to figure out how to get the wireless network to work under Ubuntu so I can use their Firefox.

There are several useful tools for that purpose: networkmanager, wpa_supplicant, etc
Sometimes getting the wireless network to work under Linux can be quite tricky, e.g if you're using Broadcom chip.
So wired connection is still needed to install the driver.

Hope that helps.
Title: Re: Compiler that works in Ubuntu ?
Post by: Vortex on December 05, 2012, 05:06:28 AM
Hi Magnum,

If you are looking for an assembler targeting Linux, JWasm is your best choice.
Title: Re: Compiler that works in Ubuntu ?
Post by: Magnum on December 05, 2012, 05:22:17 AM
I installed Ubuntu to my flashdrive, but it is not saving my settings.

You would think the default if someone was installing an O.S. is for it to write to the media.

:t

Andy
Title: Re: Compiler that works in Ubuntu ?
Post by: Greenhorn on December 05, 2012, 05:36:54 AM
Quote from: Vortex on December 05, 2012, 05:06:28 AM
Hi Magnum,

If you are looking for an assembler targeting Linux, JWasm is your best choice.
Full ACK. :)

I recommend Linux Mint (http://www.linuxmint.com/index.php), which is based on Ubuntu, but much better and without the annoying Unity Desktop.
You can create a persistent (http://www.linuxliveusb.com/en/help/faq/persistence) Live Linux on a USB thumb drive easily with LiLi (http://www.linuxliveusb.com/).


Greenhorn
Title: Re: Compiler that works in Ubuntu ?
Post by: Vortex on December 05, 2012, 05:37:02 AM
Hi Magnum,

Did you install Ubuntu as live environment? This is why probably it does not save any setting.
Title: Re: Compiler that works in Ubuntu ?
Post by: Greenhorn on December 05, 2012, 05:43:45 AM
If you are not familiar with ld, you can try JWlink (http://www.japheth.de/JWlink.html) beta 9, which is also available for Linux systems.
Title: Re: Compiler that works in Ubuntu ?
Post by: Magnum on December 05, 2012, 07:53:48 AM
I installed Linux Mint as live persistence.

I haven't figured out how to view and save files to the USB thumbdrive while Mint is running.

Andy
Title: Re: Compiler that works in Ubuntu ?
Post by: Greenhorn on December 05, 2012, 08:10:09 AM
Just put the files into the folder you want to store them. It should work properly.
For example, put some files into your home directory or a subdirectory and reboot the system. It should be still there if you've done all right (http://www.linuxliveusb.com/en/help/faq/persistence/55-how-to-check-if-the-persistence-is-working-).
It should also work for the /bin directory, but I'm not sure here ...

The proof of the pudding is the eating.  :biggrin:

EDIT: And for a hex editor take a look at Bless or GHex in your packet manager.
EDIT2: For network connection just click the network icon in the task bar. You see there all available networks. Choose your network and type in the WPA2 key and pw, if required.


Greenhorn
Title: Re: Compiler that works in Ubuntu ?
Post by: MichaelW on December 05, 2012, 03:51:50 PM
Why no mention of the GNU assembler?
Title: Re: Compiler that works in Ubuntu ?
Post by: anta40 on December 05, 2012, 07:09:02 PM
Quote from: MichaelW on December 05, 2012, 03:51:50 PM
Why no mention of the GNU assembler?

Probably because gas is intended to be feed from compiler output?
I read this somewhere else, can't remember the exact source though.

Of course, nobody stop you from using gas.
Title: Re: Compiler that works in Ubuntu ?
Post by: MichaelW on December 05, 2012, 07:37:29 PM
Quote from: anta40 on December 05, 2012, 07:09:02 PM
Probably because gas is intended to be feed from compiler output?

It was, with the AT&T syntax, but GAS has for a long time supported an Intel syntax, that at least for the Windows versions is based on a MASM 6.0 grammar, so the syntax is very similar to MASM (although there is no high-level syntax). Unfortunately, the macro system is not at all similar and weak by comparison.
Title: Re: Compiler that works in Ubuntu ?
Post by: Gunther on December 06, 2012, 05:45:38 AM
Quote from: MichaelW on December 05, 2012, 07:37:29 PM
It was, with the AT&T syntax, but GAS has for a long time supported an Intel syntax, that at least for the Windows versions is based on a MASM 6.0 grammar, so the syntax is very similar to MASM (although there is no high-level syntax). Unfortunately, the macro system is not at all similar and weak by comparison.

Yes. GAS makes a good job and you've the specific assembly language feeling of the older days. I've seen some code, made by Intel, using GAS.

Gunther