Page 1 of 1

Assembly question

Posted: Sat Aug 04, 2007 7:10 pm
by no_one
I'm reading the book "Programming from the Ground Up" by Jonathan Barlett. The problem is that it's for Linux and I'm using Mac OS X. The assembly examples that come in the book won't assemble. Is there a way I can test Linux assembly in Mac?

Edit: Sorry, I forgot to put an apropiate title. It should have been "Linux assembly in Mac OS X".

Re: Assembly question

Posted: Sat Aug 04, 2007 8:04 pm
by Brendan
Hi,
no_one wrote:I'm reading the book "Programming from the Ground Up" by Jonathan Barlett. The problem is that it's for Linux and I'm using Mac OS X. The assembly examples that come in the book won't assemble. Is there a way I can test Linux assembly in Mac?
It should be possible to dual boot OS X and Linux. If that's too much of a pain in the neck, try an emulator (Bochs, Qemu, Parallel, Virtual PC, VMware, etc).


Cheers,

Brendan

Re: Assembly question

Posted: Sun Aug 05, 2007 12:38 am
by SpooK
Brendan wrote:Hi,
no_one wrote:I'm reading the book "Programming from the Ground Up" by Jonathan Barlett. The problem is that it's for Linux and I'm using Mac OS X. The assembly examples that come in the book won't assemble. Is there a way I can test Linux assembly in Mac?
It should be possible to dual boot OS X and Linux. If that's too much of a pain in the neck, try an emulator (Bochs, Qemu, Parallel, Virtual PC, VMware, etc).


Cheers,

Brendan
As an alternative to that round-about way, and from what I understand about OS X being based on BSD, you could take your linux programming knowledge and apply it by reading BSD programming. They should be quite similar and may allow you to write natively to your system.

Posted: Sun Aug 05, 2007 2:54 pm
by niteice
Well, if he's using a PPC Mac, then the book would be completely useless...

Posted: Sun Aug 05, 2007 6:32 pm
by SpooK
niteice wrote:Well, if he's using a PPC Mac, then the book would be completely useless...
Nice catch of something basic that should have been stated :)

Posted: Sun Aug 05, 2007 7:27 pm
by Kevin McGuire
Well, if he's using a PPC Mac, then the book would be completely useless...
I would not say useless.

Brendan, stated implicitly that using a port of BOCHS (The Portable X86 Emulator) would allow him to boot Linux(X86) hosted on a PPC machine which could allow him to do what he would like to do. http://bochs.sourceforge.net/doc/docboo ... iling.html

Also it should not be referred to as Linux Assembly, but rather as IA32/X86 Assembly On Linux.

Posted: Sun Aug 05, 2007 7:44 pm
by no_one
It's an Intel iMac. No problem, I installed Ubuntu 7.0.4 in Q and my code works perfectly. Just one thing, I can't save any files. I mean I can but when I reboot they disappear. But probably this doesn't go in this forum.

Posted: Sun Aug 05, 2007 10:36 pm
by Twitch
I think this night help with mac osx asm http://developer.apple.com/documentatio ... ion_1.html