helpProgramming from the Ground Up Book - Support: sr #105971, First Program Won't assemble

 
 

sr #105971: First Program Won't assemble

Submitted by:  None
Submitted on:  Thu 16 Aug 2007 03:58:41 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 4 - ImportantStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Oct 2007 05:52:46 AM UTC, comment #1:

Hi, I've tested the exit.s code on Debian 4.0 and Slackware 12.0 and everything seems to be working fine. It seems to me, from the output you've posted, that you're typing mov1 (mov, one) rather than movl (mov, the letter L). I hope this helped.

Regards,
Mark

Anonymous
Thu 16 Aug 2007 03:58:41 PM UTC, original submission:

I'm very interested in going through this book and learning what it has to teach me. I'm using a MacBook Pro. Although the book says it works with Linux, I first tried to enter the first program exit.s, into a file on my Mac. When that didn't work, I installed Ubuntu, on the Mac under the Parallels Desktop virtualization. When that didn't work, I tried using a shell account I have with my web server.

Ubuntu and the shell account (which is Linux, although I don't know which distribution) all provide the same results when I attempt to assemble the program:

exit.s: Assembler messages:
exit.s:22: Error: no such instruction: `mov1 $1,%eax'
exit.s:26: Error: no such instruction: `mov1 $0,%ebx'

Mac OS X provided similar, although additional, errors:

exit.s:20:Expected comma after segment-name
exit.s:21:Expected comma after segment-name
exit.s:21:Rest of line ignored. 1st junk character valued 32 ( ).
exit.s:23:no such instruction: `mov1 $1,%eax'
exit.s:27:no such instruction: `mov1 $0,%ebx'

Do I need to use an older version of Linux? The book says that everything was tested with Red Hat 8, but I haven't found a download of that (or Fedora 1, which seems to be from the same general era).

Any pointers would be appreciated. I do have, in addition to my Macs, an old PC box that I could conceivably use if virtualization won't work.

Thanks,
Chuck

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #13672:  exit.s added by None (862B)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Thu 16 Aug 2007 03:58:42 PM UTCNoneAttached File-=>Added exit.s, #13672

Back to the top


Powered by Savane 3.1-cleanup