Assembly question

Programming, for all ages and all languages.
Post Reply
no_one
Posts: 17
Joined: Sat Jul 14, 2007 9:47 am

Assembly question

Post 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".
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Assembly question

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Re: Assembly question

Post 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.
niteice
Member
Member
Posts: 59
Joined: Tue Oct 03, 2006 3:49 pm

Post by niteice »

Well, if he's using a PPC Mac, then the book would be completely useless...
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post 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 :)
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post 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.
no_one
Posts: 17
Joined: Sat Jul 14, 2007 9:47 am

Post 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.
Twitch
Member
Member
Posts: 40
Joined: Mon Jun 04, 2007 6:29 pm

Post by Twitch »

I think this night help with mac osx asm http://developer.apple.com/documentatio ... ion_1.html
Post Reply